[patch] Make dbus-launch always (if possible) save session?information in X11

Thiago Macieira thiago at kde.org
Tue Nov 20 03:15:08 PST 2007


Em Tuesday 20 November 2007 10:06:06 Simon McVittie escreveu:
> On Tue, 20 Nov 2007 at 07:49:37 +0100, Thiago Macieira wrote:
> > And it shouldn't start a new bus if that information is available.
> >
> > That will make overriding a bit difficult (i.e., intentionally launching
> > a second bus daemon).
>
> If you do this, please provide some reliable way to start a new session
> bus - perhaps `dbus-launch --new` or `dbus-new-session` - for running
> regression tests on things that use D-Bus. Telepathy, for instance,
> would really benefit from this.

From what I remember from the old discussion, I guess we have two things to 
consider here:

	whether dbus-launch should save bus information for autolaunch
	whether dbus-launch should try to reuse autolaunch information

My guess is that we should default to both behaviours. We can then add flags 
to turn them off. It can even be the same flag.

That is, in most cases a bus being launched wants to be reused and you want to 
reuse a bus if there already is one. If you want to launch a new, private 
bus, you probably don't want it reused for other purposes.

A simple way of achieving that is to change the triad:
	user - machine ID - X11 display
to a four-way tuple:
	user - machine ID - X11 display - cookie

where the cookie is by default empty. If you *really* need a new, private bus 
for your purposes, you can enable that cookie (via environment variable) and 
benefit from autolaunching.

Then again, that sounds overly complicated...

-- 
  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/20071120/8b189501/attachment.pgp 


More information about the dbus mailing list