How to use media buttons for mplayer?
Create a named pipe like this:
mkfifo ~/.mplayer/pipe
Then, put the following line in ~/.mplayer/config
:
input=file=/home/<username>/.mplayer/pipe
or you can run mplayer
with input argument:
mplayer -input file=/home/<username>/.mplayer/pipe
Now use System Setting->Keyboard->Shortcut and add a shortcut with the command parameter as (see mplayer -input cmdlist
for the command list):
echo "<mplayer command>" > /home/<username>/.mplayer/pipe
e.g. echo "pt_step 1" > /home/<username>/.mplayer/pipe
for next track.
and then assign a key to this shortcut.