On Sat, 2008-11-22 at 20:31 +0100, Bart Samwel wrote:
> Anyway, I don't think the suspend method is inherently broken, although
> it is broken as it is now. :-) We do things inside X sessions as well
> (such as locking all screens when suspending), so I expect it should be
> possible to get dbus-send to run inside a particular session. For
> instance, by finding the user corresponding to the console X session and
> by sourcing ~username/.dbus/session-dbus/*.

I see. That's interesting -- I did not know of that directory or its
significance. However:

>   dbus-pm)
>           if [ -x /usr/bin/dbus-send ] ; then
> +                getXconsole
> +                . $userhome/.dbus/session-bus/*

I don't think that it going to work. I've got several files in there (probably
stuff left over from some unclean shutdowns) overwriting each other, so it
seems very unlikely that the last file will have the correct values. What would
be the correct procedure here? Trying all of the files until one is found to
work?

Also -- I believe that you only meant that code to be used for testing,
but I can see at least two large problems with it:

1. This program is running as root, right? I would be very careful with
   sourcing arbitrary shell commands from a users home directory then.
2. On a system using home directories on Kerberized NFS, the script
   should be able to handle root not having access to that directory
   at all.

Fredrik Tolf





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to