I am using LinuxMint 18 with Cinnamon and trying to encrypt a file by using a custom command from right click menu.
I know nemo-actions
.
- I copied
sample.nemo-action
asencrypt.nemo-action
and edited it. - I created a script named
encrypt.sh
and put my commands to it - I put both files to
~/.local/share/nemo/actions
- I used
nemo -q
(orkillall nemo
) thennemo
to restart nemo in order to see my options.
Here are my files.
Content of encrypt.nemo_action
[Nemo Action]
Active=true
Name=Encrypt "%N"
Comment=Encrypt the file with a passphrase
Exec=<encrypt.sh "%F">
Icon-Name=folder
Selection=s
Extensions=any;
Quote=double
EscapeSpaces=true
Content of encrypt.sh
#!/bin/bash
zenity --password | gpg --passphrase-fd 0 --output "$1.gpg" --symmetric "$1"
zenity --info --text="$1.gpg"
Now, the problem is, when I run this script in terminal, it does its job perfectly. But when I run it from right click menu, zenity prompt shows up, I enter the passphrase, then info dialog shows up, but there is no output file. Why? What am I doing wrong?
Note: Yes, I know seahorse
.