[openbox] trouble with key bindings
    Louis-David Mitterrand 
    vindex at apartia.org
       
    Tue Oct  5 11:09:22 EDT 2004
    
    
  
On Tue, Oct 05, 2004 at 04:43:05PM +0200, Mikael Magnusson wrote:
> On Tue, 5 Oct 2004, Louis-David Mitterrand wrote:
> >
> >	<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?
> 
> The pause bind should work, assuming your command is correct. Have you 
> tried 1) another command or 2) another key?
> Regarding your break bind, you need to put the modifier and the key you 
> press if you want a shifted or control-ed key, ie C-Pause or possibly 
> C-Break.
My bad. I shoulda checked first:
- with another command,
- output from .xessions-errors
You are correct that the Pause key works and the Break requires a C-
modifier.
Also running su from openbox won't work as it complains in
.xession-errors:
	su: must be run from a terminal
So I now use sudo as a poster kindly suggested and now all is fine and
dandy:
<keybind key="Pause">
      <action name="Execute"><execute>sudo /etc/init.d/laptop-mode start</execute></action>
  </keybind>
  <keybind key="C-Break">
      <action name="Execute"><execute>sudo /etc/init.d/laptop-mode stop</execute></action>
  </keybind>
Thanks to all for your (incredibly fast) help, have a nice day!
-- 
Your mouse has moved. Windows must be restarted for the change
to take effect. Reboot now?
    
    
More information about the openbox
mailing list