Last active
June 1, 2017 14:35
-
-
Save biboudis/7550240 to your computer and use it in GitHub Desktop.
Playing with dbus.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# qdbus lists all service names of services that are running and you can manipulate at the moment. | |
qdbus | |
# control dbus | |
qdbus org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next | |
qdbus org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous | |
# and use --literal if you need to print the reply in plain text | |
qdbus --literal org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Playlists.ActivatePlaylist /org/mpris/MediaPlayer2/Playlists/20 | |
# there are other interactive tools, like mdbus2 which provides more rich experience | |
mdbus2 | clementine | |
# check what happens when you exchange dbus messages with the listening mode | |
mdbus2 --listen | |
# or examine supported bus names for clementine | |
mdbus2 org.mpris.MediaPlayer2.clementine | |
# and then examine a specific interface that you would like | |
mdbus2 org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment