Shutdown and Reboot in XFCE4: disabled again

Good day.

I've been happy with FreeBSD 8.1 Release and XFCE4 until tomorrow when I performed ports upgrade. This procedure went Okay but it caused XFCE4 buttons/options 'Reboot', 'Shut down' became disabled somehow.

Please note I have PolicyKit.conf already setup correctly, hald, dbus enabled in /etc/rc.conf and this scenario worked for me before.

Are there any notable changes in configurations/port upgrades I am not aware of which might help me?

Please help. I have already seen "How to Shutdown and reboot in XFCE4" thread but nothing helped me.
 
Oops, i just figured out that HALD has not been started during boot time.
But I sure have it in /etc/rc.conf:
Code:
hald_enable="YES"
dbus_enable="YES"

When FreeBSD is booting I see 'hald started', 'dbus started' messages as usually.

Why it doesn't start then? I tried to start HALD manually and it worked, i.e. the XFCE4 buttons 'shutdown', 'reboot' became enabled.

Any advices on how to start HALD automatically and what's wrong with my approach?

updated:

Not fully sure, but I guess my problem is the same as the one, presented in this, 2 days-old, bug report.
 
varnie said:
updated:
not fully sure, but i guess my problem is the same as the one, presented in this, 2 days-olded, bug report.
Have a look at the version of dbus that's installed:
[cmd=]pkg_info -Ex dbus[/cmd]

If it's version 1.2.24_2 then it's not the same problem as the PR.
 
On this moment I have dbus-1.4.0 version, so I need to downgrade it.
Trying to downgrade currently...
 
varnie said:
On this moment I have dbus-1.4.0 version, so I need to downgrade it.
Tried to downgrade but I cannot see dbus-1.2.24_2 version on anonimous SVN (I am using portdowngrade utility). How to perform this correctly?

dbus-1.4.0 is working fine here. Sounds like it works for you also, but the permissions are broken. Or maybe settings in /usr/local/etc/PolicyKit/PolicyKit.conf.
 
Try adding to /etc/rc.conf:
Code:
hald_flags="--verbose=yes --use-syslog"

And restart hald and then dbus. Check /var/log/messages for any errors.
 
The dbus upgrade gave me some grief as well: auto-mounting of USB drives didn't work (though I think reboot/shutdown still worked). Ran an upward/downward-recursive rebuild/reinstall of dbus, which fixed it. Sounds like a possible candidate for an entry in /usr/ports/UPDATING.
 
As for dbus-1.4.0: sometimes it works, sometimes it does not.
I downgraded it to the previous version, and thus fixed this problem. Fingers crossed...
 
Yeah, my USB stick/disk auto-mounting didn't work again yesterday. Hit and miss.
 
After upgrading to dbus-1.4.0 I removed dbus from /etc/rc.conf as it looks like it is automatically started by hald.

It seems ok after a few reboots: my keyboard and my mouse keep working with slim and dbus processes remain present.
 
formateur_fou said:
After upgrading to dbus-1.4.0 I removed dbus from /etc/rc.conf as it looks like it is automatically started by hald.

It seems ok after a few reboots: my keyboard and my mouse keep working with slim and dbus processes remain present.

I did the same as you and it works. Thank you.
One question more: do you get a message when you start FreeBSD:
/etc/rc:WARNING: $dbus_enable is not set properly
Thanks.
 
lumiwa said:
I did the same as you and it works. Thank you.
One question more: do you get a message when you start FreeBSD:
/etc/rc:WARNING: $dbus_enable is not set properly
Thanks.

Yes I have this message too, and usb sticks don't automount properly anymore if I let hald start dbus.

So, I switched back to my previous /etc/rc.conf with dbus and hald both enabled. Until a solution is found, I start hald manually when it fails, which is only once in a while.
 
good news, there were some updates in hal, so now everything works fine. I just upgraded to hal-0.5.14_10 and dbus-1.4.0 and it seems these updates have fixed the bug! There is a conversation regarding that bug here if one cares.
 
I didn't have trouble with shutdown/reboot, but I did have auto-mounting problems. For me, it's still broken after the hal-0.5.14_10 update. Is it the same for anyone else?
 
Automounting of USB sticks was hit and miss in the past couple of days (more miss than hit). I just managed to automount a USB stick successfully after the hald update of today. We'll see.
 
polkit-1

The pkg-message under /usr/ports/x11-wm/xfce4-session, it describes a PolicyKit Authorities file.

Create a file /usr/local/etc/polkit-1/localauthority/50-local.d/power.pkla containing the following:

Code:
#To be able to shutdown or reboot your system, you'll have to add a .pkla file
#in /usr/local/etc/polkit-1/localauthority/50-local.d directory. Which looks
#like this (replace PUTYOURGROUPHERE by your group):

[Restart]
Identity=unix-group:PUTYOURGROUPHERE
Action=org.freedesktop.consolekit.system.restart
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Shutdown]
Identity=unix-group:PUTYOURGROUPHERE
Action=org.freedesktop.consolekit.system.stop
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Suspend]
Identity=unix-group:PUTYOURGROUPHERE
Action=org.freedesktop.upower.suspend
ResultAny=yes
ResultInactive=yes
ResultActive=yes

I found that /usr/local/etc/PolicyKit/policykit.conf did not require any updates after the .pkla file was created.

Perhaps there needs to be a update made to the x11-wm/xfce4 port message, and make it a pkg-message instead of an # ECHO in the Makefile.
 
These alone are not enough, the session must be started with consolekit also:
~/.xinitrc
Code:
exec startxfce4 --with-ck-launch
 
Back
Top