[openbox] trouble with key bindings

Louis-David Mitterrand vindex at apartia.org
Tue Oct 5 10:43:52 EDT 2004


On Tue, Oct 05, 2004 at 04:40:48PM +0200, Holly Bostick wrote:
> 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.

Thanks for you suggestion, but my user can su without a password on that
system. And the problem does not lie there: openbox does not capture the
keypressess.

-- 
Everything I like is either illegal, immoral, or fattening. -- I can't
remember who said this.



More information about the openbox mailing list