On Tue, 13 Nov 2012, Christophe-Marie Duquesne wrote:
> dbus-send --print-reply \
> --system \
> --dest=org.freedesktop.UPower \
> /org/freedesktop/UPower \
> org.freedesktop.UPower.Suspend
But this is not pm-utils, right? I've been reading some crusade against
pm-utils recently on mailing lists so I'm interested in this magic
UPower.
Personally I still need quirks, still need to remove psmouse module
before suspend (or face freeze), still need to reset HD power management
values (because they get defaulted on suspend) etc.
What ever some freedesktop guys are saying recently about "quirks being
kernel problems not userspace to fix" is nonsense. Portable computers
should be portable right now, not in 9 months when bugs in kernel or
firmware get fixed.
Back to the primary topic, sudo,
> awful.util.spawn_with_shell("sudo pm-suspend")
> However, when I hit the keys, nothing happens.
You could miss /usr/sbin in your PATH, and you need NOPASSWD in your
sudoers for this to have any chance of working as is.
Been using this for a long time (#150 is just my keycode):
awful.key({}, "#150", function () awful.util.spawn("sudo /usr/sbin/pm-suspend")
end),
--
Adrian C. (anrxc) | anrxc..sysphere.org | PGP ID: D20A0618
PGP FP: 02A5 628A D8EE 2A93 996E 929F D5CB 31B7 D20A 0618
--
To unsubscribe, send mail to [email protected].