How to get global media keys support for Tomahawk in XFCE4

Although there seems to be no native support for controlling a media player via the MPRIS specification in XFCE, you can still set up global shortcuts to use the media keys on your keyboard to control Tomahawk regardless of which application currently has focus.

To add the shortcuts, go into the XFCE settings menu and open the Keyboard settings. Select there the Applications shortcuts tab(see image below). Now add an entry each for the following combinations of Command and Shortcut (you will need to enter first the command, then press the respective key):

After setting this, it should look like the following (many thanks to Lorenz for the screenshot):

XFCE4 Applications shortcuts dialog

Small note: This will work with every MPRIS2-compatible media player, you just need to replace “tomahawk” with the matching name.