Category Archives: Applications

GPG Asymmetric Encryption

So you have your keys all set up, you’ve found a dozen people to sign them and you’ve entered the web of trust. Now you have an extremely confidential file, let’s say your tax records, and you want to send them to your accountant.

The first step is to find your accountants key. You know from talking to him earlier that he publishes to the same keyserver as you, but he forgot to give you his key id. To find him we have to run a GPG search as follows:

$ gpg --search-keys "Mister Accountant"
gpg: searching for "Mister Accountant" from hkp server
(1)    Mister Accountant 
 1024 bit DSA key 63ABD9EC, created: 2007-11-07
(2)    Mister Accountant 
 1024 bit DSA key 01129335, created: 2006-09-11
(3)    Mister Jones 
 1024 bit DSA key DFAAA99E, created: 2006-02-18
Keys 1-3 of 3 for "".  Enter number(s), N)ext, or Q)uit >

You’ll notice from the output that multiple results have been returned. Two of them even have the same uid. So how to we know which one to use? At the moment we don’t really. We know what his email address is from his business card so let’s download both those matching keys. You can either enter multiple numbers on that screen or use this command:

$ gpg --recv-keys 63ABD9EC 01129335
gpg: key 63ABD9EC: public key "Mister Accountant " imported
gpg: key 01129335: public key "Mister Accountant " imported
gpg: Total number processed: 2
gpg:               imported: 2

Now we have both keys we need to establish which one really belong to our accountant. To do this we’ll examine the signatures on the keys. For that we use the following commands:

$ gpg --list-sigs 63ABD9EC
pub   1024D/63ABD9EC 2006-09-11
uid                  Mister Accountant 
sig          A3B14DFA 2006-09-11  Daniel Hall 
sig 3        63ABD9EC 2006-09-11  Mister Accountant 
sub   2048g/DAA19215 2006-09-11
sig          63ABD9EC 2006-09-11  Mister Accountant 

[daniel@rosella ~]$ gpg --list-sigs 01129335
pub   1024D/01129335 2007-11-07
uid                  Daniel Hall 
sig 3        01129335 2007-11-07  Daniel Hall 
sub   2048g/BBBBBBBB 2007-11-07
sig          01129335 2007-11-07  Daniel Hall 

You now see that your good friend Daniel, who you trust has signed one of the keys, but nobody has signed the other. This means that as long as you trust Daniel then you can trust that key to be Mister Accountant. So now comes the easiest part of the process. Now you encrypt the file. In this case we also want to sign it so that our accountant knows these documents come from us. We just run the command:

$ gpg -e -R 63ABD9EC --sign 

Again you can add the armour option to output the file as ASCII which is suitable for attaching to an email, or for those of us who are ultra secretive hiding inside a JPEG file. If you want to try your hand at hiding things in JPEG files install SteGUI or steghide.

Random Thought: Did you know the first compiler was written by a woman? Read the story of the first compiler.

Gnome Terminal

Gnome terminal is probably one of the most unappreciated applications applications I use. Not a single day would go by where I don’t start an instance of Gnome Terminal. The same could also be said about Firefox except that I appreciate Firefox and recognise its usefulness. So here is the first of my posts on applications that I think deserve a much better appreciation.Gnome Terminal Icon

Gnome Terminal is a terminal emulator and it is the application I use 99% of the time to access the command line interface of my Linux PCs. The version I’m currently using comes with 2.26.2 and its version number matches that. Gnome Terminal can run my shells, SSH to another machine, start a terminal program or tail log files. The main reason that I use it so often would be because I prefer to use Gnome as my desktop environment.

I imagine that if I used KDE then this post would be about Konsole instead, if I used XFCE then it’d be Terminal and other environments have their own respective terminal emulators. Gnome terminal does your run of the mill terminal emulation just like any other terminal emulator but it also offers several other features.

My favourite feature has got to be transparency, without a compositing windows manager it looks pretty average but with one it give you true transparency. I don’t know exactly why, and I can only remember needing to look through terminals a couple of time, but I think that transparent terminals make me more productive. It certainly feels more productive (unlike wobbly windows, desktop on a cube and maximise and minimise animations).

So take a moment to appreciate your terminal, whether your using xterm, Gnome Terminal, Konsole, Terminal or aterm, chances are you use it many times a day. As one of the most used applications on my machine I know it is also one of the most unappreciated. It certainly deserves better, imagine what the impact of a bug (even small) would be. So here’s to Gnome Terminal, supporting my Linux hacking day in day out.

Random Thought: Is the worlds first infinite loop still going?

Firefox Personas

Does anybody reading this remember Hotbar for IE 5 and 6? Remember how it came with dozens and dozens of adware and spyware apps. For anyone who doesn’t remember this was back when Bonzi Buddy spoke to us to distract you from the fact he was tracking everything you did online. When anybody who was somebody had a Geocities pages and was ‘programming’ in HTML. When marquees scrolled past and all Javascript did was make flashy pictures follow your cursor around. Yes that’s right I’m talking about the Web 1.0 days.

Firefox Persona LogoPersonas for Firefox does essentially what Hotbar did for IE, except it doesn’t pollute your PC with all sorts of nefarious software. This comparison isn’t quite fair though. Personas has drawn on the experiences of Web 2.0 to provide a simpler immersive themed atmosphere.

A Persona is an extremely simple way to theme your browser. There are five parts that make up a Firefox Persona. The header image is shown behind the menu bar, the navigation toolbar, the bookmarks toolbar and any other toolbars you have up the top. You set it as a 3000x200pixel image. The footer (a 3000x100px image) is shown behind the status bar and if show the search bar. You also set a text colour and an accent colour for any text that will be shown in front of your backgrounds. Finally you set a name for your theme as you upload it to Mozilla.

The best thing Personas has over themes is that you don’t have to restart Firefox in order to apply them. This leads to some especially neat features, for example while browsing for a new persona for your browser when you mouse over a persona it gets applied as a preview. This means effectively when you are looking for themes you get to see exactly what they’ll looks like before you pick them. You can get Personas from Mozilla labs, or at its dedicated website. Also see Mozilla’s blog post about Personas.

Random Thought: The Linux kernel must have a bad heart, every time it panics it dies.


This application I use almost as much as my terminal application. Also this application means that I now hardly ever type SSH any more. No more remembering my username on each host, remembering the options that host accepts and no more configuring each and every environment to update the xterm title to include the hostname.

At workΒ  I have 109 hosts setup in my SSHmenu, this seems overwhelming but using menus and submenus i can hide away most of the clutter. I don’t ever have to remember the username I have on that host, any other hosts I have to go via on the way or even whether I can X forward from that machine. All that is abstracted away by a simple menu. SSHmenu will also set the title, size and colours of the terminal so you can ever have different colours for different hosts. Production hosts red, development blue and testing servers green for example.

The innate beauty of SSHmenu is that it is so easily hackable. On the SSHmenu website there is even a hacking guide. Normally it does SSH but there are instructions on how to add telnet support, and if you were savvy enough it would only be a small step to add rdesktop or dsh support.

If you manage or use more than 30 servers I’d highly recommend you check out SSHmenu. On Fedora its a simple ‘yum install gnome-applet-sshmenu‘.

See Also

Random Thought: Why does my software that says Windows XP or better not work on Linux?