dbus-send from within xbindkeys has no effect

Kerrick Staley mail at kerrickstaley.com
Sun Jul 22 16:58:11 PDT 2012


When the command

dbus-send --print-reply --dest=org.gnome.Shell /org/gnome/Shell
org.freedesktop.DBus.Properties.Set string:org.gnome.Shell
string:OverviewActive variant:boolean:true

is invoked by xbindkeys, it has no effect (other than printing a reply
message). When invoked from within an interactive sh session, however, it
works properly. Does xbindkeys execute the command differently from the way
it's executed in an interactive session? If so, then why does this break
dbus-send?


My .xbindkeysrc file looks like

"dbus-send --print-reply --dest=org.gnome.Shell /org/gnome/Shell
org.freedesktop.DBus.Properties.Set string:org.gnome.Shell
string:OverviewActive variant:boolean:true"
b:9


The dbus-monitor output is different when invoking from xbindkeys vs.
invoking via an interactive session. I ran "dbus-monitor |
grep --after-context=7 Set". The output with xbindkeys was:

method call sender=:1.592 -> dest=org.gnome.Shell serial=2
path=/org/gnome/Shell; interface=org.freedesktop.DBus.Properties; member=Set
   string "org.gnome.Shell"
   string "OverviewActive"
   variant       boolean true
method return sender=:1.16 -> dest=:1.592 reply_serial=2
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=621
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus;
member=NameOwnerChanged
   string ":1.592"
   string ":1.592"

and the output with an interactive sh was:

method call sender=:1.590 -> dest=org.gnome.Shell serial=2
path=/org/gnome/Shell; interface=org.freedesktop.DBus.Properties; member=Set
   string "org.gnome.Shell"
   string "OverviewActive"
   variant       boolean true
method call sender=:1.16 -> dest=org.freedesktop.DBus serial=5799
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string
"type='signal',interface='ca.desrt.dconf.Writer',path='/ca/desrt/dconf/Writer/user',arg0path='/org/gnome/shell/overrides/'"
method call sender=:1.16 -> dest=org.freedesktop.DBus serial=5800
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string
"type='signal',interface='ca.desrt.dconf.Writer',path='/ca/desrt/dconf/Writer/user',arg0path='/org/gnome/shell/overrides/'"


-Kerrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20120722/27880835/attachment.html>


More information about the dbus mailing list