1

I'm using unity desktop on Ubuntu 19.04

But the media shortcut not work I search and do this solution:

media keys no longer work in Ubuntu 17.10

Keyboard shortcuts don't work on Ubuntu 18.04 with Unity

Now I try to do it with command lines:

Play:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play

Pause:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause

Play/Pause toggle:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause

Previous:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous

Next:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next

but I have this error :

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.spotify was not provided by any .service files

wtf,I search in repo: https://packages.ubuntu.com/search?suite=disco&arch=any&mode=filename&searchon=contents&keywords=org.mpris.MediaPlayer2

and do this:

sudo apt-get install mopidy-mpris mpdris2 -y 

Now why the commands not work? Is the medias key not work related to this command?

How can I fix this issue?

1 Answer 1

1

You must install mpd Music Player Daemon:

reference

$ sudo apt-get update
$ sudo apt-get install mpd sonata
1
  • It's not working for me. The above mentioned commands do work when typed into the terminal though (Ubuntu 18.04 with unity desktop installed)
    – mcExchange
    Aug 19, 2019 at 13:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .