Results 1 to 3 of 3

Thread: execute command with keybind

  1. #1
    Join Date
    Apr 2011
    Location
    Berlin
    Beans
    12

    execute command with keybind

    Hi all,

    I got a keyboard-backlight, wich now on 11.10 by default is deactivated. It's able to activate it with
    Code:
    echo 1 | tee -a /sys/devices/platform/sony-laptop/kbd_backlight
    I would prefer to set a keybind for that. So I wrote in .config/openbox/rc.xml
    Code:
    <keyboard>
      .......
        <keybind key="Help">
          <action name="Execute">
            <execute>/bin/sh -c 'echo 1 | tee -a /sys/devices/platform/sony-laptop/kbd_backlight'</execute>
          </action>
        </keybind>
      .......
    </keyboard>
    but that doesn't seem to work.

    I got the write permission for that file and the solution above works very well on Archlinux. What am I making wrong here?

    I'm using ubuntu 11.10 with xfce.

    Thanks and greets.

  2. #2
    Join Date
    Feb 2008
    Beans
    1,145
    Distro
    Xubuntu

    Re: execute command with keybind

    Well, the problem there is that you're using xfwm rather than openbox. If that were my problem, I'd make a bash script somewhere with this in it:

    Code:
    echo 1 | tee -a /sys/devices/platform/sony-laptop/kbd_backlight
    And then set the script as the "Command" in the Settings / Keyboard / Application Shortcuts dialog.
    Help yourself: Ubuntu Docs - Ubuntu Packages

  3. #3
    Join Date
    Apr 2011
    Location
    Berlin
    Beans
    12

    Re: execute command with keybind

    Yes, that´s the way and you are the man. Thank you very much.

    Didn´t know, that I don´t use openbox.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •