! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
hal shutdown helper
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-session
Component:
General

Comments

Description Jani Monoses 2006-07-17 08:00:02 CEST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Ubuntu/edgy Firefox/1.5.0.4
Build Identifier: 

This is an alternate shutdown helper that uses HAL. It should work on most new linux distros and allow shutdown/reboot as normal user w/o requiring a password.

It is the non-intrusive part of the patch found xubuntu xfce4-session which additionally allows suspend/hibernate but touches other files as well.



Reproducible: Always
Comment 1 Jani Monoses 2006-07-17 08:00:29 CEST
Created attachment 666 
patch
Comment 2 Jani Monoses 2006-07-17 08:01:51 CEST
Created attachment 667 
the new file
Comment 3 Benedikt Meurer editbugs 2006-08-12 18:13:57 CEST
Created attachment 725 
Automatically use HAL if available

Well, here's another one that uses HAL if available (determined via Ping()). But HAL has one major drawback: It's impossible to tell whether the user is allowed to Shutdown/Reboot, which is a no-go for upstream xfce4-session for now.

Do you know any way to fix/work-around that?
Comment 4 Jani Monoses 2006-08-12 19:49:27 CEST
The way it is set up in ubuntu, and I assume debian, fedora and others have something similar, is by policy settings in /etc/dbus-1/system.d/hal.conf
So root and users determined to be at the foreground console (using pam_foregorund.so) are allowed to send messages to the PowerManagement service which has the reboot/shutdown/suspend/hibernate methods.
(libhal provides can_suspend() and can_hibernate() but those determine whether the system supports the operations not whether the user is allowed to invoke them)

I don't know if/how HAL can detect what it is allowed to do on behalf of the current user besides actually trying the method call, but because of most distros integrate the desktop with the base system it is supposed to just work in the normal case. So it is not an upstream xfce4-session issue to figure this out, it's enough IMHO if it allows distros to conditionally build and take care of the system details themselves, just like with the old redhat-specific shutdown helper : it's in upstream xfce4-session but it is no guarrantee that it will work on all systems.
Comment 5 Benedikt Meurer editbugs 2006-08-14 20:36:38 CEST
Committed with revision 22759.

2006-08-14	Benedikt Meurer <benny@xfce.org>

	* xfce4-session/xfsm-shutdown-helper-hal.c, AUTHORS, NEWS, README,
	  configure.in.in, xfce4-session/Makefile.am: Add support for HAL
	  to shutdown/reboot the computer, based on the Xubuntu patch by
	  Jani Monoses <jani@ubuntu.com>. Bug #2046.

Bug #2046

Reported by:
Jani Monoses
Reported on: 2006-07-17
Last modified on: 2009-07-14

People

Assignee:
Benedikt Meurer
CC List:
0 users

Version

Attachments

patch (1.89 KB, patch)
2006-07-17 08:00 CEST , Jani Monoses
no flags
the new file (3.25 KB, text/plain)
2006-07-17 08:01 CEST , Jani Monoses
no flags
Automatically use HAL if available (5.51 KB, patch)
2006-08-12 18:13 CEST , Benedikt Meurer
no flags

Additional information