[gdm-list] Forcing logout from root user



Hello,

I'm not sure this is exactly the right place to ask this, so if it isn't
please point me in the right direction.

I've been trying to figure out how the root user can logout a non-root
user, with a confirmation window.

The reason for this is that I am trying to integrate a hardware event,
monitored by acpid, with gnome.  The problem is that these events are all
handled by processes that run as root (for obvious reasons...), but the
'impact' is on a normal user.

The stereotypical example of this is someone pushing a power-off button.
acpid would recieve an event and run a script as root.  But as root,
calling gnome-session-save does not work due to ICEauthority (and possibly
Xauthority) restrictions.

I've tried pointing the ICEAUTHORITY env variable at the current owner of
x-session-manager (this is a single X-user machine), but that did not
work, I still get 'Cannot connect to display errors'.  Even su-ing to that
use does not help, as that spawns a shell which does not inherit the X
config data.

At this point, I don't really understand all the layers here that are
preventing what would seem to be a relatively simple thing, perhaps
someone can point me in the right direction.

Oh, and I also looked at Gnome Power Manager to try to figure out if it
could handle custom commands, but, as far as I can tell, everything is
hard coded.  

Thx.

Chris.


--
linux, up 163 days





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