Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running the Spotify Linux Beta. My keyboard is a Logitech Illuminated something wired keyboard.

My keyboard hotkeys work with Banshee, but not with Spotify, even though controlling Spotify via the "Volume" widget in the top right of the upper panel works fine.

share|improve this question
    
Same error with Simfy client :) (simfy.de) –  fnkr Oct 10 '11 at 12:32
add comment

2 Answers

up vote 4 down vote accepted

I did the following using this guide: http://www.mabishu.com/blog/2010/11/15/playing-with-d-bus-interface-of-spotify-for-linux/

You will need to install mdbus2:

sudo apt-get install mdbus2

Now you can try out to play/pause:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause

To bind this to a key you need for example AutoKey.

sudo apt-get install autokey-gtk

Create a new script and use this code:

system.exec_command("dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause", getOutput=False)

and bind it to whatever key you want to use.

Of course you can use the same method to create hotkeys for next and previous :)

This command will show you which methods that is available:

mdbus2 org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2

Though, I don't know what will happen if you use both banshee and spotify with the same hotkey!

share|improve this answer
    
Thank you Victor, I will try this when I get home from work. –  joar Dec 9 '11 at 13:48
add comment

Disclaimer: I work for Spotify

This was a known missing feature of the linux client, but we added it in version 0.9.4. So while this thread is rather old, it's worth noting that it should now work. If you continue to experience problems with the media keys, then please post a message on the community forums.

share|improve this answer
    
Please do not post duplicate answers on different questions. It just creates more work for the moderators. If the questions are so similar that the same answer works on each, then the later of the two is likely a duplicate and should be flagged as such. –  RolandiXor Nov 8 '13 at 17:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.