[openbox] trouble with key bindings

Mikael Magnusson mangosoft at comhem.se
Tue Oct 5 11:25:45 EDT 2004


On Tue, 5 Oct 2004, Louis-David Mitterrand wrote:

> 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!

You're welcome, and tell all your friends the OB community is helpful and 
kind! :) (in reference to some recent discussions on this list)

> Your mouse has moved. Windows must be restarted for the change
> to take effect. Reboot now?

I like this one better, "Your computer will be restarted in 15 seconds, 
press OK to reboot now."

--
Mikael Magnusson



More information about the openbox mailing list