[openbox] trouble with key bindings
Holly Bostick
motub at planet.nl
Tue Oct 5 10:40:48 EDT 2004
Louis-David Mitterrand wrote:
> Hello,
>
> I am trying to bind the Pause and Break keys on my laptop to start and
> stop laptop mode. I copied the keycodes from xev:
>
<snip>
>
> And added them to my rc.xml file:
>
> <keybind key="Pause">
> <action name="Execute"><execute>su -c "/etc/init.d/laptop-mode start"</execute></action>
> </keybind>
> <keybind key="Break">
> <action name="Execute"><execute>su -c "/etc/init.d/laptop-mode stop"</execute></action>
>
> But the key presses are not recognized.
>
> Did I miss something?
>
> Thanks,
Well, what I notice is that the "su" normally command requires a
password to be entered. And since you are not running the command in a
terminal, you cannot enter one, so you cannot su, and the command would
stop dead.
I would suggest setting up sudo to execute these particular commands
without a password so that they can be executed from within the rc.xml.
Read man sudo and man sudoers for more information on how to proceed.
Hope this helps,
Holly
More information about the openbox
mailing list