View Single Post
quingu's Avatar
Posts: 271 | Thanked: 124 times | Joined on May 2006 @ Aperture Science, Inc.
#8
Hi, I'm trying to run a commandline directly from systemui.xml.

Code:
sudo gainroot
echo 2 > /sys/class/backlight/acx565akm/brightness
This command can be shortened to one line:
Code:
echo "echo 2 > /sys/class/backlight/acx565akm/brightness" | sudo gainroot
So what I put in my systemui.xml was basically this:
Code:
  <menuitem priority="3" name="Brightness">
    <icon>terminal</icon>
      <callback service="com.nokia.xterm" 
        path="/com/nokia/xterm" 
        interface="com.nokia.xterm" method="run_command" 
        bus="session" autostart="true">
      <argument type="string">echo "echo 2 > /sys/class/backlight/acx565akm/brightness" | sudo gainroot</argument>
    </callback>
  </menuitem>
But this only gives me an empty xterm window (content is the same as if you started xterm via app menu).
What to do?
__________________
Handcrafted Ambient / Chillout Music, free to download: nomoton
 

The Following User Says Thank You to quingu For This Useful Post: