Using Debian packages on Ubuntu

Ubuntu 13.04 ships a patched XChat package that has the shortcut key for "clear text", Ctrl+L removed. This was done because the Ubuntu people thought that it's too hard for people to remember the difference between a browser's Ctrl+L (focus address bar) and XChat's Ctrl+L (clear text).

Unfortunately, they blindly removed the shortcut without adding an alternative one in 2.8.8-7ubuntu2. This means that I cannot empty the chat window with my keyboard anymore.

Ubuntu people, I hate you for that.

Reverting to the Debian package

Luckily for me, the Ubuntu madness has not spread into Debian, and their XChat package still has the shortcut key.

Ubuntu is based on Debian, which means that it's relatively easy to use packages from Debian in Ubuntu as long as their dependencies match.

Step by step

At first we need to add the Debian package sources to our system's package list:

$ cat /etc/apt/sources.list.d/debian-stable-wheezy.list
deb wheezy main non-free contrib
deb-src wheezy main non-free contrib

Then we need to tell the system not to use those packages except the ones we explicitely want to have. This is being done in /etc/apt/preferences:

Package: *
Pin: origin
Pin-Priority: -100

Package: xchat xchat-common
Pin: origin
Pin-Priority: 600

Now all configuration has been made and we can update the package list and xchat:

$ apt-get install debian-keyring debian-archive-keyring
$ apt-get update
$ apt-get upgrade

That's all. You have a shiny 2.8.8-7.1 with a "clear text" shortcut now.

Written by Christian Weiske.

Comments? Please send an e-mail.