Using MPRIS2

From Strawberry Music Player Wiki
Jump to navigation Jump to search

You can use MPRIS2 to control Strawberry from the command line using D-Bus. D-Bus is a message bus that lets applications on Linux talk with each other.

Examples:

See all commands

   qdbus org.mpris.MediaPlayer2.strawberry /org/mpris/MediaPlayer2


See current playing song and metadata

   qdbus org.mpris.MediaPlayer2.strawberry /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata

Control playback

Play:

   qdbus org.mpris.MediaPlayer2.strawberry /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play

Pause:

   qdbus org.mpris.MediaPlayer2.strawberry /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause

Stop:

   qdbus org.mpris.MediaPlayer2.strawberry /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop