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

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



Woops quick correction to the x2.sh script before anybody is thinking of
ever using it, the killall killed the --system dbus to.

I've changed my x2.sh to:
#!/bin/bash
cd /root
kill -9 $DBUS_SESSION_BUS_PID &>/dev/null
/usr/bin/dbus-launch --sh-syntax &> /tmp/dbus-env
echo -e "export DBUS_SESSION_BUS_PID\n" >> /tmp/dbus-env
. /tmp/dbus-env
rm -f /tmp/dbus-env
xhost +
xrdb -merge /root/.Xresources
exec gnome-session

Should work a lot better when not killing the system global dbus :-)

On Thu, 2006-01-12 at 13:42 +0100, Chris Chabot wrote:
> 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):
> 1:2345:respawn:/usr/bin/x1.sh
> 
> /usr/bin/x1.sh:
> #!/bin/bash
> export
> PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
> 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:
> #!/bin/bash
> 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:
> #!/bin/bash
> 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
> situation?
> 
> 	-- Chris Chabot
> 
> -- 
> fedora-devel-list mailing list
> fedora-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/fedora-devel-list

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]