View Single Post
Posts: 169 | Thanked: 41 times | Joined on Apr 2010 @ Portugal
#289
It dont have the result i've expected.
(if i do it from xterminal, line by line, it works ... )


Originally Posted by No!No!No!Yes! View Post
You cannot paste it directly into QBW.
You need to connect to X-Terminal for that and then...:
Code:
 ~ $
cd /home/user
cat > myscript.sh
<here you paste the script>
#!/bin/sh
/usr/sbin/kernel-load /usr/share/kernel-power-settings/ideal
rm -f /etc/default/kernel-power
ln -s /usr/share/kernel-power-settings/ideal /etc/default/kernel-power
echo 125000 250000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/avoid_frequencies
echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load
/usr/sbin/kernel-load

<then you press CTRL-D and you get the prompt again>

~ $ chmod 755 myscript.sh
Now you can "AddCmd": echo "/home/user/myscript.sh" | sudo gainroot

... and see what happens.