Starting Exaile from the media button

Section: Linux

While fiddling with the multimedia buttons on my keyboard I realised that the multimedia button wasn't bringing up the media player. After much head scratching and mainly fruitless searches I finally found the solution.

The problem

Using Gnome's Keyboard Shortcuts configuration app I set "Media Player" to 0xed (the hex-code it entered when I pressed the button with the musical note below it) but the media player then wouldn't load. Setting the shortcuts for the volume up/down, mute, play/pause, email, browser and "other" worked, but not the music player.

Much of my searching turned up mention of how to make play/pause work, or that the Media Player was once bound to Rhythmbox, but even before I uninstalled Rhythmbox the shortcut didn't work. Obviously this was either an issue people hadn't mentioned or the other issues were drowning out the relevant answers.

The media button was working (since I could assign it to other shortcuts and they worked) but nothing was logging any errors or warnings. Eventually after reading that previous versions of Gnome had been hard-coded to work with Rhythmbox, but not having any success with making exaile pretend it was Rhythmbox I found the solution.

The solution - configuration

In Gnome 2.20 (and possibly earlier versions) there is a "Preferred Applications" configurator under System > Preferences. This used to contain settings for preferred browser and email client but now contains preferred media player under the "Multimedia" tab.

For some reason my preferred media player was set to an empty option, which explained why the application wasn't starting from the shortcut. Having set it to "custom" and entered "exaile" in the command box the multimedia keys and the media application key in particular all now work.