Reply
Thread Tools
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#11
hm, toggling it back and forth several times wasn't a good idea, the thing for locking the screen isn't comming back anymore, need reboot :/
 
jflatt's Avatar
Posts: 534 | Thanked: 723 times | Joined on Oct 2009
#12
Cool! I was just thinking about doing the same to use it as an alarm clock, so I don't have to reach over and turn it on to see what time it is.
 
Posts: 562 | Thanked: 1,732 times | Joined on Jan 2010 @ NYC
#13
I’ve seen some post of people getting this to work, but it doesn’t seem to work for me. I’m trying to get some command line code to run from the desktop (or run from the power button menu).

Here’s what I have so far

Desktop button, which is located at /usr/share/applications/hildon/
Code:
[Desktop Entry]
Encoding=UTF-8
Type=Application
Terminal=true
Name=LowBrite
Exec=/usr/bin/lowBrite2.sh
Icon=
X-Window-Icon=
X-Osso-type=application/x-excutable
I've also tried:
without - Terminal=true
without - X-Window-Icon=
without - X-Osso-type=application/x-excutable[/code]

Here's the sh file, which is located at /usr/bin/:
Code:
#!/bin/sh

sudo gainroot sh -c 'echo 1 > /sys/class/backlight/acx565akm/brightness'
I've also tried:
echo 'echo 1 > /sys/class/backlight/acx565akm/brightness'
echo "echo 1 > /sys/class/backlight/acx565akm/brightness"
"echo 1 > /sys/class/backlight/acx565akm/brightness"
echo 1 > /sys/class/backlight/acx565akm/brightness


I applied chmod +x lowBrite2.sh

What am I doing wrong? And of course the icon/link has just disappeared from the launcher and desktop.

If anyone can help I would be most appreciative

thanks
x

Last edited by xman; 2010-09-05 at 18:21. Reason: Corrected reversed file locations
 
Posts: 2,006 | Thanked: 3,351 times | Joined on Jun 2010 @ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
#14
Quick reply....
Shortcut looks for /usr/bin/lowBrite2.sh
while it should look for /usr/share/applications/hildon/lowBrite2.sh

Is it correct?
 

The Following User Says Thank You to Wikiwide For This Useful Post:
Posts: 41 | Thanked: 15 times | Joined on Jan 2010 @ Finland, Aaland Islands
#15
@xman, use
Code:
Exec=/usr/bin/osso-xterm "/usr/bin/lowBrite2.sh"
Unfortunately there seems to be no way of launching it "hidden" so you will se a terminal window flash by when you press the button.
Not that it's the end of the world, just think it would look neater if it didn't...

Does this happen with QB, anyone know?
 

The Following User Says Thank You to snookh For This Useful Post:
Posts: 562 | Thanked: 1,732 times | Joined on Jan 2010 @ NYC
#16
Sorry guys I reversed the file locals, but I just corrected them.

@Wikiwide - Thanks, good catch, but after looking at your suggestion I realized I post a boo boo

@snookh - Thanks, tried your suggestion. However it says "Internal error, Application 'x terminal' closed"

I'm thinking that it's not working because it needs root access to run the script, no?

What do you guys think about the actually scripts I posted? I can get it to work if I'm root and run it while in xterm. I've got things like TOP to run from the desktop, so something is missing or I missed (more likely).

Thanks

x

Last edited by xman; 2010-09-05 at 19:19.
 
Posts: 2,006 | Thanked: 3,351 times | Joined on Jun 2010 @ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
#17
sudo gainroot sh -c 'echo 1 > /sys/class/backlight/acx565akm/brightness'
doesn't work for me in X Terminal.

sudo gainroot
echo 1 > /sys/class/backlight/acx565akm/brightness
does work in X Terminal.
 

The Following User Says Thank You to Wikiwide For This Useful Post:
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#18
gainroot is already a command, i don't think you can add even more commands like that, perhaps you can just sudo command instead, not all commands work though (i think the commands that work with sudo need to be added to a list in some file i don't remember which one nor where it is)
 

The Following 2 Users Say Thank You to TiagoTiago For This Useful Post:
Posts: 562 | Thanked: 1,732 times | Joined on Jan 2010 @ NYC
#19
@Wikiwide, thanks I tried your suggestion but nothing happen.

@TiagoTiago, Thanks... we can to a similar possible answer.

So after playing with more combinations I came up with the following:

Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Name=LowBrite
Exec=sudo sh -c 'echo 1 > /sys/class/backlight/acx565akm/brightness'
Icon=
YES, this one's working! Now the only problem is that it takes a longtime before a blank window with the script title name on it goes away. Though the light level changes almost instantly. Any ideas?
 

The Following User Says Thank You to xman For This Useful Post:
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#20
Originally Posted by Wikiwide View Post
sudo gainroot sh -c 'echo 1 > /sys/class/backlight/acx565akm/brightness'
doesn't work for me in X Terminal.

sudo gainroot
echo 1 > /sys/class/backlight/acx565akm/brightness
does work in X Terminal.
what about
Code:
echo 1 > /sys/class/backlight/acx565akm/brightness | sudo gainroot
(my usb port fell off so can't test it by myself....)
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 

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


 
Forum Jump


All times are GMT. The time now is 17:04.