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

Weird dbus problem when not using GDM (but custom scripts)

Hi All, i've had a weird dbus problem: Every program was shouting at me
it could not determine the address of the dbus daemon.

So the first thing i looked at was my hostname and /etc/hosts and it
turned out everything was fine there :-)

So my second guess was that it would probably be that i bypass all the
normal login / gdm stuff and run some custom scripts from inittab:

in inittab (runlevel 3):

export PS1="[\u \h \W]\\$ "
export USER=root
export HOME=/root
unset  SHLVL
exec bash -l -c "exec /usr/bin/xinit /usr/bin/x2.sh &> /root/.xlog"

and /usr/bin/x2.sh:
cd /root
xhost +
xrdb -merge /root/.Xresources
exec gnome-session

Now why run such scripts you might ask .. well i love it that my
computer boots up logged in right away, without any logins .. its
protected by the front door of my house with locks, so need for all that
repetitive password typing, just let me do my business as soon as
posible! :-) Also if i have a need to restart X, its just a
ctrl-alt-backspace away and i'm automaticly right back in a fresh x
session.. just some creature comforts i've grown used to

Well it turns out after some googeling that by using such custom shells
scripts instead of the propper GDM the dbus envirioment settings were
never set that dbus-launch is supposed to set (gnome-session doesn't
start it?)

So i've modified my x2.sh script into:
cd /root
killall -9 dbus-daemon
sleep 1
/usr/bin/dbus-launch --sh-syntax &> /tmp/dbus-env
. /tmp/dbus-env
rm -f /tmp/dbus-env
xhost +
xrdb -merge /root/.Xresources
exec gnome-session

Does this look propper to anyone with some dbus experiance? Everything
does seem to work perfect again, so i think so :-)

Just weird that gnome-session doesn't take care of this, when its
clearly a required part of the gnome session?

Is it worth filing any bugs for this, or am i misunderstanding the

	-- Chris Chabot

Attachment: signature.asc
Description: This is a digitally signed message part

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