Mutlimedia Keys on Ubuntu 20.04 with Spotify

So I recently installed Ubuntu 20.04, and wanted to get my Spotify set up. My problem is that the Pause/Play, Next and Previous keys are not being picked up when I try to bind them in the Keyboard Shortcuts section. I've tested with xev and it seems to be picking them up, although I can't seem to differentiate between them. The Pause/Play button can control YouTube videos embedded in Discord (I have them disabled in Firefox) but cannot be bound to the playerctl commands. Gsettings shows they are bound to [''], but that doesn't seem to help me.

Edit: There were Keyboard Shorcut mappings for Audio things, and the keys were good for that, just not custom ones for whatever reason. They still don't work with spotify for whatever reason, which is annoying

2 Answers

This is a common issue that people have with Spotify. Fortunately, there is a solution that works 95% of the time.

Follow these steps:

  1. Get Spotify Gnome Integration from GitHub. This can be downloaded as a Zip file if you don't use Git.
  2. (If you downloaded the Zip) Extract the archive.
  3. (From the Terminal) Change to the directory that was created when extracting the Gnome integration files, for example:
    cd ~/Downloads/spotify-gnome
  4. Copy some files using the following command:
    sudo install bin/spotify /usr/local/bin/

Note:

For this to work, you will need python-dbus on your computer. If you don't have this (or if you can't start Spotify anymore), it can be installed like this:

sudo apt-get install python-dbus

Restart Spotify. The media buttons should now work correctly.

Hope this helps 👍🏻

1

The plasma-browser-integration package helped me with this problem.

sudo apt-get install plasma-browser-integration

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like