Unable to determine the address of the message bus
Rod Butcher
rbutcher at hyenainternet.com
Tue Jan 31 05:26:37 PST 2006
Havoc Pennington wrote:
> On Sun, 2006-01-29 at 14:31 +1100, Rod Butcher wrote:
>
>>[root at HYENA1 root]# dbus-launch
>>DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-FStk9jnJvk,guid=1d29dc431fe62f5da51df9e4bb2ee600'
>>DBUS_SESSION_BUS_PID=30161
>>So the variable is set.
>
>
> That doesn't mean it's set, you have to eval that output to get it set.
> Use "printenv" to see what's set.
>
>
>>I read further and discovered that I could launch the app by :
>>dbus-launch <appname> and Woot ! I now have gnome-screensaver running OK.
>>Is this the usual way to run a program that accesses the message bus, or
>>does this mean I still have an incomplete environment ?
>
>
> No, normally there's one bus for the entire X session, run when you log
> in. If you run a separate dbus daemon for each app, things won't work
> especially well (since the apps need to talk to each other, not each be
> in their own little world)
>
>
>>I start X by directly running gdm, which bypasses the xinit stuff.
>
>
> Whoever packaged your gdm should have set it up to run dbus-daemon when
> you log in.
If I've understood you correctly, this needs to be set up when the user
logs on to the linux box, so that the per-session messagebus is
available for both X and non-X apps, is this correct ?
Working on this premise I added a one-line file to /etc/profile.d/
containing :-
eval `dbus-launch --sh-syntax --exit-with-session`
This gets executed whenever I log on to linux, and sets value for
DBUS_SESSION_BUS_ADDRESS , and allows gnome-screensaver to run when I
eventually start X via gdm.
Is this a correct technique, i.e. is the messagebus thus started valid
right across my user session as you mention above ?
thanks
Rod
>
> Havoc
>
>
>
--
------------------------------------------------------------------------------------------------
http://www.distributedcomputing.info - find out how to make your
computer work for the community
More information about the dbus
mailing list