Hi Fredrik, Fredrik Tolf wrote: > The dbus-pm suspend method in the suspendorhibernate script (which is enabled > by default) is inherently broken and, I think, should be removed altogether. > > It uses the dbus-send program with the --session option, but since it does not > run in the desktop user's session, it will never actually find the right > session, and furthermore, will sometimes even create a new session. > > Every time I suspend my laptop, it will create a new DBus session as root and > start gnome-power-manager inside it, running as root, so that I need to kill > it every time it wakes up again. > > For some reason, this appears not to be a problem when running Gnome, however. > I can only assume that two g-p-m's can manage to lock out each other or > something.
That is indeed true, two g-p-m's can coexist peacefully. I only tested this stuff with g-p-m which is why I didn't find this problem. Thanks for pointing this out! 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/*. Could you try the following change to suspendorhibernate: dbus-pm) if [ -x /usr/bin/dbus-send ] ; then + getXconsole + . $userhome/.dbus/session-bus/* # Call the power management daemon (which, if it is # running, we probably don't know about, since we send That *might* just do the trick. Or it might not, of course. :-) Cheers, Bart -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]