Mapping multimedia keys in XFCE for Spotify

Open Menu -> Settings -> Keyboard -> Tab Application Shortcuts.

  • For the Next key: Click Add, then on the Command: field enter dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next, click OK, press your Next Multimedia key on your keyboard.
  • For the Previous key: Click Add, then on the Command: field enter dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous, click OK, press your Previous Multimedia key on your keyboard.
  • For the PlayPause key: Click Add, then on the Command: field enter dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause, click OK, press your PlayPause Multimedia key on your keyboard.
  • For the Stop key: Click Add, then on the Command: field enter dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop, click OK, press your Stop Multimedia key on your keyboard.