Accessing Session Bus through the superuser

Thiago Macieira thiago at kde.org
Mon Mar 17 05:02:32 PDT 2008


On Monday 17 March 2008 12:48:40 Colin Walters wrote:
> On Mon, Mar 17, 2008 at 3:38 AM, Thiago Macieira <thiago at kde.org> wrote:
> >  That's not a good practice. Instead, let the user connect to the system
> >  bus and receive the notifications there. Do not push messages into the
> >  session bus.
>
> Right.  Now the fact that a lot of people want the functionality to
> broadcast notifications to the logged in session makes me think we
> should probably add it to the system.  But that's not a topic for this
> list.

I think it is. And I also think that there already is a bus where system-wide 
notifications should be sent: the system bus.

I still don't know of any good use-case to allow the root user -- or any user 
for that matter -- to connect to a user's session bus. Besides, that always 
brings the questions: which users? And which busses?

> >  I don't either. The environment variable you set with the D-Bus
> > session's bus address did not take effect. Review your script to see if
> > setting the environment is working.
>
> Most likely the existing session bus rejected authentication because
> the root uid is not equal to the desktop user's uid.

I don't think so. It's trying to run dbus-launch, which it only does if 
DBUS_SESSION_BUS_ADDRESS is empty or "autostart:".

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080317/ef34d7f9/attachment.pgp 


More information about the dbus mailing list