Add Compress and Extract here Action to Nemo File Manager as Context Menu
Nemo is the amazing file manager of Cinnamon’s desktop environment. It’s a further development of Gnome’s Nautilus file manager with easy customization options. Adding a context menu to unpack and compress folders and files is a simple task.
Add action compress and extract to Nemo
Adding the context menu action for compress and extract in Nemo will show in this tutorial. We open a terminal and copy & paste the following content into the path see below and save it as file compress.nemo_action
[Nemo Action]
Active=true
Name=Extract here
Comment=Extract here
Exec=file-roller -h %F
Icon-Name=gnome-mime-application-x-compress
Selection=Any
Extensions=zip;7z;ar;cbz;cpio;exe;iso;jar;tar;tar;7z;tar.Z;tar.bz2;tar.gz;tar.lz;tar.lzma;tar.xz;
Nemo shows compress and extract here
Then a right click on an archive file shows the context menu with compress and extract here.
Nemo context action menu (right-click)
Action context compress extract for any user
This enable the action context menu compress and extract to Nemo for the current user only, if you prefer the ability for any user, then move the file compress.nemo_action and extracthere.nemo_action into /usr/share/nemo/actions, you need root privileges to can do it.
The common compression tools are preinstalled on most distos. 7-Zip is another all in one compression tool and very popular by Sysops, this can be installed with the following command.
Send e-mail in the terminal shell using mail or mailx command
Sending e-mail in command line from a server is very useful, for example, when performing e-mail from shell scripts or web applications.
send e-mail in the command line
This tutorial shows how to use the mail and mailx command on Linux to send e-mail from the command line. We use the Heirloom mailx project that is a collection of traditional Unix utilities.
How to use the mail command on Fedora
For this to be possible, with the mailx package, often also mailutils, they must be present on the host, the deployment on Fedora and CentOS is as follows:
sudo yum install -y mail
Using mailx utility on Debian/Ubuntu
For Debian and Linux Mint or other Debian forkes, the following apt-get command can be performed:
sudo apt-get install heirloom-mailx
The CLI command mail is now applicable in the shell:
mail -s "Hello World" email@example.com
When you try to send an e-mail, you will probably get an error first!
No configuration file found at /home/joe/.esmtprc or /etc/esmtprc
The error is solved by creating the esmtprc configuration file, using vi or nano or the editor of choice:
vi /.esmtprc
Add an SMTP gateway, which allows us to accept e-mail from our host.
hostname = smtp.example.com:25
This configuration allows the user to send e-mail through smtp.example.com. If all users are to be authorized, the /etc/esmtprc file must be created and edited.
Is there another mistake! a relay host must be allowed:
SMTP server problem Connection refused
Set up a postfix smtp relay
Emails should be accepted by our host, e.g. gateway smtp.example.com forward 25 e-mails over TCP port.
On the SMTP gateway, if it is postfix, the main configuration have to modify, to do it will use sudo with edit main.cf.
sudo vi /etc/postfix/main.cf
For mynetworks, the host IP or hostname that is allowed to send emails is added.
mynetworks =
127.0.0.0/8
[::1]/128
192.168.2.3
In this example, 192.168.2.3 is our host to be sent from this email.
Apply changes of the Postfix main configuration:
sudo postfix reload
Example: Send e-mail in the command-line
echo "message here" | mail -s "subject" email@example.com < dump.sql.gz
Sending a previously created SQL dump should be delivered after the backup.
Heirloom mailx is a mail user agent for Unix systems. Highlights are:
Derived from Berkeley Mail 8.1. An interface like the original Berkeley one is still optionally available. Is a free implementation of the System V mailx command and features an interface like that by default.
Is intended to comply to the mailx command specifications of IEEE Std 1003.2-1992 (POSIX.2) and IEEE Std 1003.1-2004 with XSI extensions (SUSv3). Supports the MIME specifications. Mailx command can send mail and receive attachments and code and decode international character strings.
If the system libraries provide appropriate support, conversion between different character encodings is performed. In combination with a UTF-8 terminal, nearly all international languages are supported. External converter programs can be automatically invoked e. g. to view messages in HTML format. Supports IMAP.
In combination with either OpenSSL or Mozilla NSS, IMAPS can also be used. With IMAP, folder hierarchies can be stored and managed on remote servers. This is particularly useful for people who use more than one computer to access their mail. Of course, it is also possible to use IMAP just for fetching mails and storing them locally.
Supports caching and disconnected operation of IMAP folders.
This speeds up operation while in online mode. It also makes it possible to transparently view and edit IMAP mailboxes without an active connection to the server. Supports POP3 to read messages on a remote server. In combination with OpenSSL or NSS, POP3S can also be used. Mailx can read and delete individual messages, thus POP3 accounts can almost be accessed like local mail folders.
Supports SMTP to send messages directly to a remote server.
A local sendmail interface setup is thus not necessary. In combination with OpenSSL or NSS, both the STARTTLS method and SMTPS can be used. SMTP AUTH is also supported. Supports S/MIME for signed and encrypted email (in combination with OpenSSL or NSS). In combination with NSS, certificates for S/MIME and SSL/TLS can be shared with Mozilla applications, and can be managed using them.
Can display message threads and supports operations on them. This is especially useful for handling mailing lists. It is also possible to sort messages by various other criteria. Provides a Bayesian junk mail filter mostly according to Paul Graham’s article “Better Bayesian Filtering”.
Chained tokens according to Jonathan A. Zdziarski’s “Advanced Language Classification using Chained Tokens” can optionally be used. Features a lot of detail improvements over previous implementations of Mail/mailx, such as IMAP-style search methods and flags for any types of folders, killing and scoring of messages, maildir folder support, an option to set the From: address directly, and the generation of References:
header fields to avoid annoyances on mailing lists. Can be used as a mail batch language in nearly the same way as it is used interactively. So it is possible to use mailx as a mailbox filter, for fetching mails, or for sending files as attachments. Is extensively described in its manual page mailx(1), which provides both introductory material and complete reference documentation.