Showing posts with label gedit. Show all posts
Showing posts with label gedit. Show all posts

14 June 2013

451. Seahorse plugins on gnome 3.4 -- PGP encrypting/decrypting in nautilus

Once upon a time it was possible to de/encrypt in gedit, and life was good. Then GNOME 3 came along, and the seahorse plugin for edit disappeared. (presumably you might be able to write a script to use with the External Tools gedit plugin).

It re-emerged as a plugin for Nautilus instead.

I'm showing version 3.4.0 since I'm on GNOME 3.4, and who knows what API has broken in between this and 3.8...anyway, look at https://git.gnome.org/browse/seahorse-nautilus/ for different versions.

There are probably more build dependencies than the ones I'm listing.

sudo apt-get install libcryptui-dev libnautilus-extension-dev libgpgme11-dev checkinstall autoconf automake checkinstall
wget https://git.gnome.org/browse/seahorse-nautilus/snapshot/seahorse-nautilus-3.4.0.tar.gz
tar xvf seahorse-nautilus-3.4.0.tar.gz 
cd seahorse-nautilus-3.4.0/
./autogen.sh
GnuPG Version: gpg (GnuPG) 1.4.12 GPGME Version: 1.2.0 Notification Support: yes Now type `make' to compile seahorse-nautilus
sudo checkinstall --fstrans=no
- Maintainer: [ root@beryllium ] 1 - Summary: [ seahorse-nautilus 3.4.0 ] 2 - Name: [ seahorse-nautilus ] 3 - Version: [ 3.4.0 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ amd64 ] 8 - Source location: [ seahorse-nautilus-3.4.0 ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ seahorse-nautilus ] 12 - Conflicts: [ ] 13 - Replaces: [ ]

Encrypting:
Open nautilus, select a text file and right click:




Decrypting:
Simple:

Although in my case I had kde-full installed, which pulled in kgpg:

If you're having other issues with decrypting, check that the mime associations are correct:

xdg-mime query filetype plaintext.file.pgp 
application/pgp-encrypted

26 February 2013

345. Replacing gEdit with Kate

For some reason I can't get gEdit to auto-spellcheck as I type anymore. There's simply no option to do it. Funnily enough, my favourite editor vim does it without any issues -- but while I like vim and use it for most of my data processing, I prefer to edit e.g. html in gEdit. Habit, I suppose.

Anyway, while gEdit is great for everything else, it's given me an excuse to familiarise myself a bit more with Kate which I take is the KDE counterpart to gEdit. A counterpart that's on steroids like a lot of KDE applications (that's not necessarily a good thing -- see e.g. vim vs emacs -- but each to their own)

Another cool thing with kate is that you can run it in a vim compatibility mode. (Sure, there's also gVim for the real deal, but gVIM looks ugly on my computer and I'm a shallow person.)

1. Installation
sudo apt-get install kate

2. Associations
Edit ~/.local/share/applications/defaults.list
 text/plain=kate.desktop
 text/x-python=kate.desktop
 text/x-sql=kate.desktop
 text/html=kate.desktop
 text/dat=kate.desktop
 text/xml=kate.desktop

You can associate kate with as many formats are you want this way.

Create ~/.local/share/applications/kate.desktop
[Desktop Entry]
Name=kate
Comment=kate text editor
Exec=/usr/bin/kate
Type=Application
Categories=Office;Accessories;
Set dynamic word wrap, enable vim, override

3. Desktop
In gnome, either navigate through your menu to 'Main Menu' (under 'system tools') or, if you're running a stock gnome 3 without a menu, go to the overview mode (what you end up with when you put the mouse in the top left corner) and type in main menu.

Either way, go to accessories and tick the box next to Kate.

4. Set up kate
Start kate, go to settings, configure kate and set your defaults:
Enable vi mode

Set up automatic spell check

Activate Dynamic Word Wrap

And enjoy: