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.
17 Answers
Try out Spotify Gnome
5Spotify-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 Disabled
Based on
1Disclaimer: 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.
6You can use spotify-notify. Not only does it provide notify-osd notifications, but it also has support for media keys.
1What 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:
Here is the steps (explained in a little more detail than the GitHub page):
- Go to Settings Manager
- Go to Keyboard
- Go to the tab labeled Application Shortcuts
- Click Add
- Based on what keybind you need to add, use these commands
- Play/Pause:
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause - Stop:
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop - Next:
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next - Previous:
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
- Play/Pause:
- Then press corresponding key. Each key should bring up a certain code for each. They go as follows:
- Play/Pause:
XF86AudioPlay - Stop:
XF86AudioStop - Next:
XF86AudioNext - Previous:
XF86AudioPrev
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!
The mulitmedia keys have nothing to do with the sound indicator. Reactions to those keys have to be implemented in spotify itself. I don't think there is a workaround. After all the spotify linux client is still beta so there is hope that this feature will be added in a foreseeable time :-)
1The latest Spotify snap version supports multimedia keys. Note: for me they started to work only after reboot