As long as your multimedia keys have been recognised and have their appropriate keysym assigned, the following explanation will work fine. If not, please see the Ubuntu wiki and my answer for this question.
Your 'XF86Audio' media keys (i.e. play, pause, next track, previous track buttons) usually do not work straightaway with
decibel-audio-player, so you need to use the remote application, which is by default located at
/usr/share/decibel-audio-player/src/remote.py. To find the valid options, just run it with python:
Here is the full list of options available for the command-line application,
Command | Arguments | Description
next | | Jump to the next track
pause | | Pause or continue playing the current track
pl-add | file1 file2... | Append the given files to the playlist
pl-clr | | Clear the playlist
pl-set | file1 file2... | Set the playlist to the given files
play | | Start playing the current track
prev | | Jump to the previous track
shuffle | | Shuffle the playlist
stop | | Stop playback
volume | value (0 -- 100) | Set the volume
So, from the command-line, the python command that pause/plays a track when
decibel-audio-player is already running is:
python /usr/share/decibel-audio-player/src/remote.py pause
Other commands that can be assigned to media buttons (individually) are, for example:
python /usr/share/decibel-audio-player/src/remote.py stop
python /usr/share/decibel-audio-player/src/remote.py next
python /usr/share/decibel-audio-player/src/remote.py prev
Now all you need to do is to assign the appropriate python command to the XF86 keysym that represents, for example, your play/pause on your laptop. Do this by going to shortcut settings, adding a new keyboard shortcut, then placing in the box the appropriate line above and then pressing the appropriate media key.
Repeat this method for however many media keys you have by using a different command and different media key every time.
When you have finished, your keyboard shortcuts application will look something like this, although I am using Xfce, so the settings section will look different for other desktop environments:
I thought this information was worth sharing, as I haven't been able to find any similar tutorials elsewhere, so perhaps it will be useful for someone.