You are not logged in.
acpid is really cool; it lets me run a standalone WM on my desktop without having to use sudo for power management. But the netbook has only one suspend button and one power button, and I'd like to be able to manage suspend, hibernate, reboot, and shutdown this way.
Is there a way to bind acpid responses to arbitrary keystrokes, so that I could e.g. reboot with ctrl-alt-delete, or hibernate with ctrl-alt-0?
(Apologies BTW if this has an obvious answer. I did some Googling but didn't find anything.)
Update: from what I've read, it looks like this may not be possible. Too bad... I wonder if there's any other way of binding a keypress to an arbitrary command as root, without invoking sudo.
Last edited by Gullible Jones (2012-05-13 15:49:30)
Offline
acpid can only respond to acpi events. Normal keystroke are not acpievents. You can bind keyboard keys to command with xbindkeys (your window manager or Desktop might also offer this possibility). Of course these commands must somehow run as root. I think you can use dbus-send if you have the proper dbus authorisation (normally when you are logged locally) but I am not a dbus specialist. Make some research or post a question about dbus specifically.
Last edited by olive (2012-05-15 06:40:42)
Offline
Have your tried using xmodmap to generate the keycodes from the keys you are missing with other keys. If that fails, xdotool should be able to simulate those key presses, then you can bind an xdotool command to whatever key you want.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
What is the reason to not want to use sudo?
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline