DSL: Add GPG buttons to emelfm

I’ve added buttons to emelfm for GPG encryption/decryption. Both buttons work on whichever file(s) you have highlighted in whichever panel you have active.

The encryption button works only for individual files. If you need to encrypt multiple files together for the same purpose, it’s easy enough to tarball a group of files in emelfm and then encrypt the tarball. Click on the files you want tarred and/or zipped, right click, choose user-pack, add a file name, and make your selection for zipping or tarring. Then just encrypt the file that results from it.

The decryption button will work for single files and groups of files (just ctrl-click the ones you want decrypted en masse). Decrypted files output to the same directory.

User dsl should be changed to whatever name you use for your keys; it’s fine if you have a key set up for dsl. Take the s out of the -esr options if you don’t want the encrypted file signed (I did that since I use this primarily for single files meant to be shared); you could also set up a separate button if you only want to sign files by removing the e (encrypt) option (page edited 20070325 to include separate entry for that). Change the colors if you want or leave the scroll bars on your aterm. You can also see if there are other options you want by entering “gpg –help | less” in a terminal window.

Steps
1. Open emelfm.
2. Click the configure button (middle panel).
3. Click buttons.
4. Click add.
5. Enter the name you want the button to have. Just “encrypt” fits without spreading the panel, but you may want additional buttons if you encrypt with multiple keys (unless you link to a script that prompts you for each key’s name or something).
6. Add the command below (just the aterm… line).
7. Click okay.
8. Repeat the same process (4-7) for your decrypt button.
9. Click okay to close (and save!) the configure dialog box.
10. Try it out.

TO SIGN AND ENCRYPT A SINGLE FILE:
aterm +sb -fg red -cr red -T “GNU Privacy Guard – ENCRYPT” -e gpg -esr dsl %f

TO SIGN A SINGLE FILE:
aterm +sb -fg orange -cr orange -T “GNU Privacy Guard – SIGN” -e gpg -sr dsl %f

TO DECRYPT ANY NUMBER OF FILES:
aterm +sb -fg green -T “GNU Privacy Guard – DECRYPT” -e gpg –decrypt-files %f

Advertisements

%d bloggers like this: