Curing Skype's Ugliness on Ubuntu

Tuesday, April 04

For anyone interested in installing Skype on Ubuntu linux and making it not look like shit, here’s how I did it (ubuntu breezy + gnome, that is).

Download and install Skype using dpkg,

$ wget http://www.skype.com/go/getskype-linux-deb
$ sudo dpkg -i skype_1.2.0.18-2_i386.deb

Go ahead and launch Skype from the Applications/Internet menu (or by typing skype on the console) and notice how ugly it looks while shaking your head in dissapointment. Now close it and prepare for its extreme makeover.

Qt is a cross platform development framework on which Skype is dependent and version 3.2 should already be installed. You will however need to install the qtconfig manager, a theme called ‘polymer’, and using qtconfig, apply said theme. Unless, of course, you are into the ugly look, in which case I urge you to avoid reading on.

$ sudo apt-get install qt3-qtconfig
$ wget http://www.informatik.tu-cottbus.de/~mkrause/debian/polymer/polymer_0.3.2-1_i386.deb
$ sudo dpkg -i polymer_0.3.2-1_i386.deb

When dpkg is finished its dance, launch the qtconfig program in the following manner,

$ qtconfig

Other than making sure you select ‘Polymer’ as the GUI Style under the Appearance tab, you are free tweak things to your heart’s content. I set my font to 9pt sans-serif.

Launch Skype again for the reveal and say a quiet thank-you to these guides:

How have I managed to avoid Skype for this long, I wonder.

GPG Quickstart Guide

Sunday, October 23

This is a quickstart, so let’s not waste any time. The first thing your going to need is a GPG Key, so fire up the terminal and from the command line, type:

$ gpg --gen-key

This will launch the GPG key-generation program. First you’ll be asked to select what kind of key you want: (1) DSA and Elgamal (default), (2) DSA (sign only), (5) RSA (sign only). If you want to sign and encrypt messages, DSA and Elgamal is what you want and is the default, so we’ll use that.

Next you’ll be asked to choose a keysize. A large keysize is more secure than a small one, but also takes longer for your computer to encrypt/decrypt data. The default value of 1024 is adequate, so we’ll use that. If you’re really paranoid, you can use 2048, which is currently gpg’s maximum.

You’ll then be asked to set an expiry date for your key. While expiry dates can be used for stronger security, you probably want your key to be valid indefinitely. Choose 0 (the default) to create a key that never expires and confirm your selection.

You need a user ID to identify your key. You’ll be asked for your Real Name, Comment and Email Address which will result in a user ID in this form: “Real Name (comment) <email@example.com>”. Go ahead an type in your user ID details and confirm your entry.

Finally you have to enter a passphrase. A passphrase is like a password, but is longer, can contain spaces, and is supposed to be impossible to guess. Think of a passphrase as a super-password. Use a long sentence, or a line from one of your favorite songs, spaces and punctuation included. Oh, and if you ever forget your passphrase, there is NO way to get it back.

All done? Congratulations! You now have a public and secret key in your keyring. To see all your keys, use the list-keys command:

$ gpg --list-keys

Create a revocation certificate

If you ever need to revoke this key (because, say, you forgot your long and difficult-to-guess passphrase), it helps to have a revocation certificate prepared. Right after creating a key is a good time to prepare a revocation, so let’s do it now.

$ gpg --gen-revoke packagethief > ~/revcert.asc

You’ll have to answer a few questions (the default answers are fine) and enter the passphrase you chose for your key. The above command will create your revocation certificate in the file revcert.asc. Now, keep in mind that if someone gets a hold of this revcert, they’ll be able to revoke your key and render all your encrypted messages unreadable. You probably don’t want this, so it’s a good idea to hide this somewhere OFF your computer. You could put it on another volume, save it to a disk and keep in somewhere safe, or just print it and keep it locked away in your filing cabinet. At the very least, you want to make sure that nobody except you can read it, so let’s change the permissions:

$ chmod u-w,go-r ~/revcert.asc
$ ls -l ~/revcert.asc
-r--------   1 packaget  packaget  260 Oct 23 10:30 revcert.asc

Now you (the owner) are the only one who can read the file. Note that we’ve even removed write permissions for the owner.

Using your key from within your mail program

Since most folks use a GUI-based email client like Thunderbird or Mail.app, here are some add-ins that you can use with your mail client to provide GPG functionality. These make it really easy to use GPG with your mail, adding sign/encrypt options to the Compose window and automatic decryption for encrypted messages.

  • Enigmail is an extension for Mozilla Thunderbird. If you use Thunderbird or Mozilla/Netscape, this is the cheese.
  • GPGMail is a plug-in for Apple’s Mail.app. Although its authors claim that “GPGMail is a complete hack, relying on Mail’s internal private API,” I’ve been using it for several months without issue. The latest version even has an installer.

The difference between signing and encrypting

Signing an email message using your key helps prove that the message came from you. This isn’t the same as encrypting the message, but is a common way to assert the authenticity of the sender. Your message is still sent in plain text and anyone can read it, but they can also use your GPG signature to verify your identity. I tend to sign most of the messages I send.

Encrypting is another story. To encrypt a message, you need the public key of the person to whom you are sending the encrypted message. When you use someone’s public key to encrypt a message, only the person who has the corresponding secret key can decrypt it. So, if I wanted to send an encrypted message to ‘John’, I would need his public key.

Obtaining your public key

To obtain your public key (a big block of ASCII characters that looks like garbage text), use gpg -a --export from the command line:

$ gpg -a --export packagethief

This will print your key to the screen (the -a option tells GPG to output in ASCII text). Sometimes it’s more useful to have this in a text file so you don’t have to copy/paste it. To do so, just redirect the output to a file:

$ gpg -a --export packagethief > ~/pubkey.txt

This will save your key in the file pubkey.txt in your home directory. You can now publish your key (say, on your website), so that others can use it to send you encrypted messages.

Changing your passphrase

Until today, I didn’t even know you could do this. You change the passphrase for a key by editing it. Not everything is editable (for example, you can’t change your user ID), but changing your passphrase is the kind of thing you might want to do from time to time.

$ gpg --edit-key packagethief
Command> passwd

You’ll be asked for your existing passphrase before you’ll be able to type a new one. To exit and save your changes, type quit at the prompt.

Related resources

My public key

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.1 (Darwin)

mQGiBENbnh4RBAC7s8cQhyDkow6IgfIYpkflFQ5lmK8Hlcm8AR3Jcg2IsltBY+ZG
jU/GyEwBJEsyyYxSZjy3/DVOsHMg2MGNNXE6TH0FQhpHnwgMgz2WQuyupSOnWz3o
5AI5ozBLS8+8CO8yufez6VNDsMr2nSJpwDgqCb2AN82nCkXJwtVWmZkPXwCgiOSN
fldP3ZtF6QyQXnrsCNxNUskD/jpLeCOk/VrZI2UJ8jKGMeyNZP7p/2CSo78ZpcYF
uu6Jtgtnrm2+F77ST7F5FGKTlioqeEi7Fw7j1Ve318bKfIn3hHB9E643mf6oD8FC
wb6ATIIsv2u50yqFt6k9F/oHnc6gddunTcM5ulX4+56dJXlFVL7c+PPsdkFsjLZY
kOmAA/4iQ5kmt8Fuwsep2Gs7fCQ+Wn6GmiGNwLjj/AC1IWwHdhHygPtS4xGshzvu
L5VEuxeA0/zwoEh1gNqAIe2SGFKysbXSmD8vnW+wvWJ0a9aAaCag8Wi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Hb4=
=sLot
-----END PGP PUBLIC KEY BLOCK-----

Azure is the new Kubrick

Friday, October 21

This blog is running the young and as yet unspoiled typo blogging package. Just when it seems like the default theme, Azure, is poised to become the new Kubrick, Typo is having a theme contest to catalyze an explosion of new, unique, and free designs. This is unquestionably a Good Thing.

This theme is called Scribbish. Installing it is easy. Assuming you’re in your typo directory,


$ cd themes
$ curl -O http://smg.textdriven.com/scribbish.tar.gz
$ tar zxvf scribbish.tar.gz
$ rm scribbish.tar.gz

You should now be able to select “Scribbish” under the “Themes” tab in the typo backend.

So far I’ve tested it in Safari 2.01 and Firefox Beta 1.5 on OS X, and Firefox 1.0.7 on Ubuntu 5.10 Breezy Badger. Does it work in Internet Explorer on Windows? If so, consider it submitted.

Database-agnostic dumps from mysql 1

Friday, October 21

MySql ships with a program called mysqldump for dumping table definitions and data from a database.

Usage: mysqldump [OPTIONS] database [tables]

There are a several of [OPTIONS], but when I want a nice, compact dump that I can use to create a schema definition, I use the following:

$ mysqldump -dr schema.ddl some_db --compact --compatible=mysql323,no_table_options --add-drop-table

This command results in a fairly database-agnositic schema definition in schema.ddl. There are no comments, no proprietary table or field definitions, and no data. The first option, -d, tells mysqldump to skip the data; -r tells it to output to schema.ddl; the rest of the options are verbose.

Creating new databases from this schema is painless. First, use the mysqladmin program to create a new, empty database:

$ mysqladmin create another_db;

Next, use the mysql client to execute the sql from schema.ddl:

$ mysql another_db < schema.ddl

Notes: For all three programs (mysqldump, mysqladmin, mysql), you can specify a user/pass with -u someuser -p . The commands executed will run as this user. Oh, and the -p option needn’t take an argument—you’ll be prompted for your password if you omit it.)

Setting up SSH keys is easy

Sunday, October 16

You can use SSH Keys to avoid having to enter your password when you log in to a remote machine. Think of your key as being your computer’s unique thumbprint. When you ssh into another computer, your thumbprint is checked against a list of pre-authorized thumbprints and if a match is found, you’re allowed in—no password required.

If you’ve never done this before, you’ll need to create a DSA key pair (the thumbprint). You only need to do this once.

$ ssh-keygen -d

Just hit enter to accept the defaults, and leave the passphrase blank. Your public key will be saved to the file ~/.ssh/id_dsa.pub

Now that you have a key, all you have to do is copy it to the authorized_keys file on the machine you want to log in to.

$ scp ~/.ssh/id_dsa.pub username@example.com:~/.ssh/authorized_keys

Nice. Now you’ll be able to log in without your password, which is really helpful when you want to do things like schedule backups using rsync, or if you’re lazy.

Just don’t lose your laptop.