13

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.

  • Multimedia keys work out of the box now. If your problem is that they work but only when Spotify is the focused application, see this question instead. – tanius Jul 10 '16 at 13:49
19

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.

  • Works fine in 12.10. This is the workaround I didn't know in my answer :-) – André Stannek Oct 19 '12 at 13:49
  • Working in 13.04 as of 4/23/2013 - also supports notify osd quite well, and setup was much easier than spotify-notify (mentioned below as an answer) – Eric Nemchik Apr 23 '13 at 15:08
  • It seems that a side effective is that the underlying library that is required for this serves ads. I'm currently sitting in Spotify's screen with it telling me that it can't load "onboarding-popup" once I installed this. If I had to take a guess it's a part of the gir1.2-telepathyglib-0.12 library that I had to install to get this working. – Mark Tomlin Apr 25 '13 at 8:12
  • Works good, just download and copy to correct directory like written in the documentation. – TIIUNDER Aug 16 '13 at 8:13
  • Spotify Gnome is no longer needed for Media keys to work – it should work out of the box now! From the README: "This project is no longer required in order to use media keys with Spotify on Gnome. It will not receive any updates going forward." – tanius Jul 10 '16 at 13:47
6

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, I can confirm that this is no longer working in spotify-client-qt, which is quite sad, as it looks so nice. – joseeantonior May 21 '14 at 3:45
  • 1
    @joseeantonior it is definitely working for me (version 0.9.10 on Ubuntu 13.10). Sometimes however they stop working, when this happens I usually restart the client and they work again. What distro are you using? – Nik Reiman May 21 '14 at 8:18
  • They are now working. Looks like a system restart was needed for everything to work in order. I'm using Ubuntu Trusty, with Spotify version 0.9.10.17.g4129e1c9 – joseeantonior May 24 '14 at 21:39
  • 2
    hello, I am from the future. version 1:1.0.64.407.g9bd02c2d-26, ubuntu 16.06, those keys are not doing anything and never have. Clementine for example does fine. – phil294 Oct 17 '17 at 0:26
  • 2
    @NikReiman this isn't working even on 1.0.96.181.gf6bc1b6b on Ubuntu 16.04. I had to go with nickf's solution. Don't know what you guys fixed at Spotify, but doens't seem like you fixed this. – Alex Burdusel Jan 24 at 9:34
4

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

  • 2
    fyi the page says the author is no longer maintaining this package, and the answer above for Spotify-Gnome works just fine, is easier to install, and does everything this recommendation does - still a good find though! – Eric Nemchik Apr 23 '13 at 15:10
2

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

  • It worked for me just fine when I was using 12.10, when I updated to 13.04 Beta, it no longer worked. I wonder what changed to break this, or if it was a beta update that I got from Spotify that broke it. – Mark Tomlin Apr 25 '13 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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