Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I add a d-bus command as a global shortcut in Gnome (classic)? I can do it in KDE, it gives an option to add a new shortcut as a d-bus command. I do not want to write a script just for this.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Never mind, found it. Use qdbus as the command line interface:

qdbus <Remote Application> <Remote object> <Function> 

I was trying to control spotify. The playPause command would be :

qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
share|improve this answer
    
dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause if we are in Gnome-Shell –  user813182 Mar 26 '13 at 5:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.