Sending dbus events to a session bus as another user [SOLVED]

Carl van Tonder simplyw00x at gmail.com
Mon Apr 9 16:53:27 PDT 2007


Havoc and list,

Your tip about using *both* the uid and the DBUS_SESSION_BUS_ADDRESS was the
key. I tried the other suggestion of setting display, but all users
seem to have that set to 0.0 anyway. The following, however, works
like a slave:
| formail -fc -x Subject |  sed -e 's/carl.*2007  //' | sed -e
's/<.*>//' | sed -e 's/^/\"/g' | sed -e 's/$/\"/g' | xargs -t
notify-send-root  "New Mail"

Thanks to all; I'll post a tutorial on ubuntuforums shortly, because
this is CRAZY cool.

Regards,

Carl.

On Sun, Apr 08, 2007 at 06:40:07PM -0400, Havoc Pennington wrote:
> Hi,
> 
> Basically you need the notify process to have your uid and have the 
> right DBUS_SESSION_BUS_ADDRESS. If you do both of those (not that they 
> are necessarily easy) then it should work.
> 
> If it doesn't work, then recent versions of "man dbus-daemon" (use the 
> website version if your local one is older) have some docs on how to get 
> verbose debug output.
> 
> Havoc
> 
> 
> 
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus

-- 
Carl van Tonder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070410/222c6f3c/attachment.pgp


More information about the dbus mailing list