16

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.

ish
  • 141,990

7 Answers7

21

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.

nickf
  • 554
14

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 https://community.spotify.com/t5/Desktop-Windows/Play-Pause-keyboard-button-doesn-t-work-on-Spotify/m-p/4730810/highlight/true#M75206

Ken
  • 241
  • 2
  • 3
8

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.

Nik Reiman
  • 1,216
4

You can use spotify-notify. Not only does it provide notify-osd notifications, but it also has support for media keys.

Ryan
  • 558
4

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):

  1. Go to Settings Manager
  2. Go to Keyboard
  3. Go to the tab labeled Application Shortcuts
  4. Click Add
  5. 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
  6. 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!

0

The latest Spotify snap version supports multimedia keys. Note: for me they started to work only after reboot

0

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 :-)