XFCE with Slim produces dbus errors....

Hi All,

Am having a rather annoying time at the moment, and could do with some (more) assistance please.

I have upgraded via ports to XFCE4.10. I also have Slim installed. It was all working OK prior to the upgrade, so this may be relevant...

When I sucessfully log in through Slim, it presents me with Xorg OK but no windows manager (XFCE).

If I run /usr/local/bin/startxfce4 from a terminal session then XFCE starts OK and as expected.

Looking in the /var/log/slim.log it shows the following:
slim: open_session: Unable to open session: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

The weird bit is that in /etc/rc.conf I have
Code:
dbus_enabled="YES"
hald_enabled="YES"
But if I jump to a console terminal after logging into Slim, and run [CMD=""]ls -la /var/run/dbus/system_bus_socket[/CMD] the file does not exist!

Also running [CMD=""]ps -e|grep dbus[/CMD] just returns the grep command its self, e.g. dbus is not running.

I have confirmed that I have the correct ~.xinitrc and /usr/local/etc/slim.conf files as per Ports PR 170381.

Just as a quick test, if I reboot and let Slim load, but before logging on, jump to a console terminal and enter [CMD=""]service dbus onestart[/CMD], then the socket file and service exist according to [CMD=""]ls[/CMD] and [CMD=""]ps[/CMD] resepectively, and then flip back to the Xorg terminal and log on, all is OK!!

So the problem I recon is that dbus is not starting automatically, even though it is in /etc/rc.conf. By the way, not sure if relevant, should I have something in /etc/groups for dbus (got one for haldaemon, but not dbus)....

Had a look in dmesg, but nothing of noteworthiness.

How would I begin to debug the dbus service starting?

Thanks again,

James
 
Try using this in ~/.xinitrc:
Code:
exec ck-launch-session dbus-launch --exit-with-session startxfce4
 
Hi

It seems that there are some issues with slim and dbus when slim is started in /etc/ttys

I had some troubles with dbus in a slim + lxde config.

My dbus problems* was resolved by setting "off" to the /etc/ttys slim line and by putting slim_enable="YES" into /etc/rc.conf

Hope it helps

Jerem

* -dbus-daemon used 100% of cpu
-dbus errors when I used some applications like evince (I had to run them with dbus-launch --exit-with-session application)
 
Hi All,

Right getting somewhere:

SirDice: adding that line to the top of ~/.xinitrc did not have any effect, but it was good to find out you can start apps bound to a GUI session that way!

Slim is being started by an /etc/rc.conf line stating
Code:
dbus_enabled="YES"
hald_enabled="YES"
slim_enabled="YES"

I only have [CMD=""]xdm[/CMD] defined in /etc/ttys and it is set to off anyways.

I have however, narrowed it down a bit, I think...

Firstly I altered the /usr/local/etc/rc.d/dbus file to include the following:
Code:
echo "dbus status:" > /tmp/out2.txt
echo ${dbus_enable} >> /tmp/out2.txt
echo "gnome status:" >> /tmp/out2.txt
echo ${gnome_enable} >> /tmp/out2.txt
dbus_enable=${dbus_enable-${gnome_enable}}
dbus_flags=${dbus_flags-"--system"}
echo "dbus final status:" >> /tmp/out2.txt
echo ${dbus_enable} >> /tmp/out2.txt

If this is not a valid way of dumping the variable contents to a file, then please show me the light!

This showed that the
Code:
${gnome_enable}
flag was always set to "NO"; does
Code:
${dbus_enable-${gnome_enable}}
mean that gnome_enable will take presedence if set to "NO" and dbus will never run?

The initial
Code:
${dbus_enabled}
was a blank string, even though in /etc/rc.conf the following was set:
Code:
dbus_enabled="YES"

The final ${dbus_enabled} was set to "NO" hence I belive this is why dbus is not loading. To confirm this I also moved the /usr/local/bin/dbus-daemon file out of the way and replaced it with a simple
Code:
echo blah >/tmp/test.txt
but I believe the file is not being called, as /tmp/test.txt was not written.

So, can anybody answer these quesions please:

1) What does ${dbus_enable-${gnome_enable}} mean?

2) Why is ${dbus_enable} blank in the first place?

3) How can I debug the /etc/rc application?

4) Is the /etc/rc application made as part of "buildworld"?

If this is too off-topic now for Windows Managers / XFCE, should I repost to a better topic (Ports / Devel) or can a moderator move the post?

Thanks as always,

James.
 
Hi All,

JamesElstone said:
The weird bit is that in /etc/rc.conf I have
Code:
dbus_enabled="YES"
hald_enabled="YES"

The problem was staring me in the face:
Code:
dbus_enable[B]d[/B]="YES"
does not equal
Code:
dbus_enable="YES"
:r

Problem solved; Many thanks to all - your comments and commitment to this forum is a help in itself. :e

James
 
You can get around this problem in another way by specifying the window manager you want to launch from slim with:

Code:
$ exec dbus-launch --exit-with-session my_window_manager

in .xinitrc.
 
Back
Top