I've added Spotify
launcher to Gnome Shell Dash so it's now a favorite app.
How do I add next / prev / play-pause / stop commands to Spotify
context menu ?
For those who still find this unclear, the goal here is to have something like this:
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityI've added Spotify
launcher to Gnome Shell Dash so it's now a favorite app.
How do I add next / prev / play-pause / stop commands to Spotify
context menu ?
For those who still find this unclear, the goal here is to have something like this:
After spending some time looking around for the answer I finally managed to make it work.
Just edit your spotify.desktop
file under /usr/share/applications
[Desktop Entry]
Name=Spotify
GenericName=Music Player
Comment=Spotify streaming music client
Icon=spotify-client
Exec=spotify %U
TryExec=spotify
Terminal=false
Type=Application
Categories=Audio;Music;Player;AudioVideo;
MimeType=x-scheme-handler/spotify;
Actions=PlayPause;Next;Previous;Stop
[Desktop Action PlayPause]
Name=Play-Pause
Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
[Desktop Action Next]
Name=Next
Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
[Desktop Action Previous]
Name=Previous
Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
[Desktop Action Stop]
Name=Stop
Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop
/usr/share/applications
; ideally, you'd make a copy under ~/.local/share/applications/
- that way you have your own launcher that will remain unchanged (note that you'll have to either add #!/usr/bin/env xdg-open
at the top and make it executable or double-click it and chose "mark as trusted" when prompted...)
– don_crissti
Oct 21 '16 at 12:34