Even though Spotify shows up in the indicator-sound just fine (Controlling it works from there) using multimedia keys on your keyboard does nothing.
When I open up Rhythmbox they're able to control the music there, so the keyboard settings seem ok.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Try out Spotify Gnome
Spotify-Gnome is a program that provides Gnome media key support for the Spotify Linux client. It supports the play/pause, stop, next, and previous signals, and is compatible with both Gnome 2 and Gnome 3.
For people still having this problem: my issue was my Chrome caught all incoming media keys and so they did not reach the Spotify app. You can fix this by going to
chrome://flags/#hardware-media-key-handling in the Chrome address bar and setting the
Hardware Media Key Handling to
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.
You can use spotify-notify. Not only does it provide notify-osd notifications, but it also has support for media keys.
What distro/desktop environment are you using? I am on XFCE, and there is an issue with the keybinds (I believe XFCE interprets them differently than the other DE's).
I found a GitHub page giving the solution which worked for me on Ubuntu 17.04 with XFCE: https://gist.github.com/jbonney/5743509
Here is the steps (explained in a little more detail than the GitHub page):
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
This should fix it! This worked for me. You may be able to skip the Stop button, and don't confuse it for the Play/Pause button. I almost did.
Like I said, I think XFCE has some issue with the keys. I think XFCE interprets
XF86AudioPlay because of the
XF at the beginning, and Spotify doesn't recognize it. That would make sense because it works in other DE's without issue, but XFCE breaks it without being set up. Either way, this works for me, so I hope it worked for you!