Stephen Browne wrote:
> Ghee,
>
> applications that require/use dbus do not explicitly do a dbus-launch
> (except gnome-session which does test for the env var first) they rely
> on libdbus to do it for them if necessary.
>   

This is not always the case.  We encountered a situation where we 
wanted, during early session startup, to start an event-driven 
(non-dbus-related) daemon that would run gnome-screensaver-command at a 
later time.  We discovered that if dbus-launch were not run manually 
before the daemon was started, the dbus environment would not yet have 
been established and inherited by gnome-screensaver-command when 
eventually it was run.  Later something (such as gnome-screensaver) 
would wind up indirectly creating the desktop dbus environment, but that 
was to late for the already-running daemon and when eventually the 
daemon invoked gnome-screensaver-command it had no known dbus 
environment so started a conflicting one which wouldn't interoperate 
with the desktop.

So, in this case, we were indeed forced to run dbus-launch manually 
before starting the launcher.

I have to say I haven't been following this thread in detail, so this 
may have no bearing on your conclusions, but it's not safe to assume 
that dbus-launch never needs to be manually run.

-Bob

> When a dbus client app tries to connect to a session bus, libdbus will
> look for a running daemon (by checking for the env var) and if doesn't
> find one will auto launch it using 
>     dbus-launch --autolaunch
>
> So if we are seeing an autoluanched daemon then it is because libdbus
> isn't finding the running dameon or it was started before your exec of
> dbus-launch in the startup scripts.
>
> HTH,
>
> Stephen.
>
> On Wed, 2008-10-01 at 12:57, Ghee Teo wrote:
>
>   
>> Hi,
>>
>> I noticed that there more than one set of dbus-launch/dbus-daemon in 
>> OpenSolairs b97 + vermillion 100.
>> Based on the ordering of pids, the most likely app that launches 
>> dbus-daemon is iiimd, however I can't
>> confirm it since I don't know where the source is, and not sure the 
>> exact sequence it start.
>>
>> We need to have a coherence approach to start dbus session, we should 
>> only have one session dbus
>> per user session for memory/efficiency. So the approach is 2 folds:
>>
>> - We should start dbus session as early as possible when user login, 
>> Brian Cameron made suggestion to
>> put it in /etc/X11/xinit/xinitrc.d, I am clarifying how does this work.
>>
>> - Application should check whether there is DBUS_SESSION_BUS_ADDRESS 
>> defined before
>> doing an explicit dbus-launch.
>>
>> Comments/Feebacks are welcome.
>>
>> Thanks,
>>
>> -Ghee
>>
>>
>> _______________________________________________
>> desktop-discuss mailing list
>> desktop-discuss at opensolaris.org
>>     
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> desktop-discuss mailing list
> desktop-discuss at opensolaris.org
>   


Reply via email to