DBUS Startup Question



Pardon me if this is off topic, but this has been nagging me.
When I use the recommended startup script from a terminal prompt:

#### garnome.sh startup script ####
#!/bin/bash

GARNOME=/opt/gnome/2.16.0

PATH=$GARNOME/bin:$PATH
LD_LIBRARY_PATH=$GARNOME/lib:$LD_LIBRARY_PATH
PYTHONPATH=$GARNOME/lib/python2.4/site-packages:$GARNOME/lib/python2.4/site-packages/gtk-2.0
PKG_CONFIG_PATH=$GARNOME/lib/pkgconfig:/usr/lib/pkgconfig
GDK_USE_XFT=1
XDG_DATA_DIRS=$GARNOME/share
XDG_CONFIG_DIRS=$GARNOME/etc/xdg
MANPATH=$GARNOME/man:$MANPATH
DBUS_LAUNCH="$GARNOME/bin/dbus-launch --exit-with-session"

export PATH LD_LIBRARY_PATH PYTHONPATH PKG_CONFIG_PATH \
       GDK_USE_XFT XDG_DATA_DIRS XDG_CONFIG_DIRS MANPATH DBUS_LAUNCH

exec startx $DBUS_LAUNCH $GARNOME/bin/gnome-session
#### end garnome.sh startup script ####
everything works fine.

If, OTOH, I do what is offered in the DBUS documentation and do:

#### dbus startup script ####
# set up dbus
if [ -z "$DBUS_SESSION_BUS_ADDRESS"  ]; then
        eval `dbus-launch --sh-syntax --exit-with-session`
fi
#### end dbus startup script ####

I do this because I sometimes want to use enlightenment or other wm which
also need DBUS_SESSION_ADDRESS. Then, I source the garnome script with the
exec statement commented, 

$ . garnome.sh

I would be set to run gnome whenever I want by typing:

$ startx gnome-session

However, this results in an error on startup when gnome-settings-daemon is
run. It can't connect with the message bus.

If I manually run 

$ startx $DBUS_LAUNCH gnome-session

all is fine. This is necessary for KDE to use a gnome application,
enlightenment or anything else.

My question is WHY? What's the difference between the two methods?

-- 
Peter




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]