While that works very nicely it creates the ~/.gnupg directory with root ownership preventing other gnupg program, such as Seahorse, from accessing the keys. Seahorse does not even report access problem. It simply does not work well leaving the user oblivious of the underlying problem.
In the past, one can rely on the Encryption plugin for gedit to perform the encryption and decryption operation. But that is not supported in Ubuntu 12.04.
In search for some graphical means to encrypt and decrypt data on clipboard, I believe I have managed to connect all the dots to form a feasible solution. Here are the ingredients:
- Instead Seahorse (I used Synaptic Package Manager)
- Once installed, use Seahorse to import your private and your friends' keys.
- Make sure gnupg2 and gnupg-agent are installed.
- Install Emacs - either from the Ubuntu Software Centre
- Use Synaptic Package Manager to install easypg, an Emacs plug-in or from here.
If you are decrypting material for the first time, the program will prompt for the passphrase and on its graphical dialog box, you can use Details link to open up the dialog box to reveal treatments of the passphrase allowing you to specify how long the passphrase can be discarded. Unfortunately there is no option to discard once used.
Now you are ready to perform the GnuPG operations using Emacs.
For those new to Emacs, here is a brief introduction materials on how best to use Emacs for encryption and decryption of materials via the clipboard:
- Open Emacs
- Use Buffers | *scratch* to switch into the scratch buffer so that what you type or paste into does not get saved into a file. In Emacs even if you do not explicitly save a file, the content is written to a form of temporary file whose name formed from the given file name. Something you want to avoid.
- Type your plain text or paste the cipher text into the buffer.
- Select the entire text block. (Use Edit | Select all).
- Then use Tools | Encryption/Decryption to bring up the sub-menu.
- Select Encrypt Region or Decrypt Region depending on your need at this time.
- If it is to encrypt the region, it will open up a split window on the bottom showing you brief instructions and a list of keys managed by Seahorse.
- Use Tab key to navigate to the key list, then press m to select and u to deselect the key.
- Once the keys are selected, click OK to perform the encryption and follow the prompt.
- If it is to decryption, it will prompt you for your passphrase and then it will cache it.
No comments:
Post a Comment