xsendkeycode on Ubuntu 12.04

After upgrading to Ubuntu 12.04, I’ve discovered that the volume buttons on my Tv Tuner remote failed to work (they were controlling the master volume).

Digging a bit more, it seemed that xsendkeycode program wasn’t present anymore on the system, and .lircrc weren’t actually doing anything:

   prog = irexec
   button = KEY_VOLUMEUP
   config = xsendkeycode 123 1; xsendkeycode 123 0

   prog = irexec
   button = KEY_VOLUMEDOWN
   config = xsendkeycode 122 1; xsendkeycode 122 0

After a little bit of digging, it seems that the lineakd package (providing xsendkeycode) is now missing, being replaced with the new liblineak-0.9-0, which, however, is also unavailable! Ah, the magic of Ubuntu.
As the old saying goes, if you are using Linux, it means you have time …

Package liblineak-0.9-0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'liblineak-0.9-0' has no installation candidate

I bit the bullet and went to search for an older .deb file of the lineakd package, and after some fiddling around – I got my xsendkeycode working:

wget http://launchpadlibrarian.net/32987824/lineakd_0.9-6_i386.deb
dpkg  -i lineakd_0.9-6_i386.deb

dpkg: dependency problems prevent configuration of lineakd:
 lineakd depends on liblineak-0.9-0 (>= 1:0.9); however:
  Package liblineak-0.9-0 is not installed.
dpkg: error processing lineakd (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:

Now, the trouble is that xsendkeycode works, but eventually Ubuntu’s package management detects and inconsisntency and offers to remove the newly installed .deb file.

The solution was to eventually extract the .deb and use the xsendkeycode executable standalone:

su root
cd /tmp
ar vx /usr/local/src/lineakd_0.9-6_i386.deb
tar xf data.tar.gz
cp usr/bin/xsendkeycode /usr/bin

Et voilà!

Leave a Reply