Active Topics

 



Notices


Reply
Thread Tools
Posts: 1,427 | Thanked: 2,077 times | Joined on Aug 2009 @ Sydney
#171
I'm trying to create a "switch" using this widget to lower the LCD brightness instantly just by clicking on the widget.

Using following command:
Code:
echo 2 > /sys/class/backlight/acx565akm/brightness
But it does nothing when used with the widget. Can I make it work?
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#172
wouldn't you need root rights for that? so probably adding
'| sudo gainroot'
to the end? just a guess though. and would need rootsh installed.
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Posts: 1,427 | Thanked: 2,077 times | Joined on Aug 2009 @ Sydney
#173
I tried that but it didn't make any difference.... =(
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#174
Originally Posted by jakiman View Post
I tried that but it didn't make any difference.... =(
meh was just a guess .... i'm no expert on linux though - hopefully some clever bod will look into it for you
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Posts: 247 | Thanked: 91 times | Joined on Jan 2008 @ London/M4 Corridor
#175
Originally Posted by jakiman View Post
Code:
echo 2 > /sys/class/backlight/acx565akm/brightness
Originally Posted by noobmonkey View Post
wouldn't you need root rights for that? so probably adding
'| sudo gainroot'
to the end? just a guess though. and would need rootsh installed.
You want edit /etc/sudoers, and add an appropriate line. Be careful, this is the file that makes "sudo gainroot" and a lot of other things work.
__________________
--
If you don't know who the Eletronic Frontier
Foundation are, you should. Check out
http://www.eff.org.
 

The Following User Says Thank You to Alan_Peery For This Useful Post:
Posts: 539 | Thanked: 165 times | Joined on Feb 2010 @ Berlin, Germany
#176
Originally Posted by Alan_Peery View Post
You want edit /etc/sudoers, and add an appropriate line. Be careful, this is the file that makes "sudo gainroot" and a lot of other things work.
And me I guess you should then put the 'sudo' to the beginning of the line (or even call 'su' instead). Piping the empty output of a not allowed command to 'sudo gainroot' seems quite useless to me.

sudo echo 2 > /sys/class/backlight/acx565akm/brightness
 
Posts: 156 | Thanked: 90 times | Joined on Jan 2010
#177
What you really need is rootsh in front of command - it executes it with root priv. if you have rootsh installed. So:

rootsh echo 2 > ...
 
Posts: 112 | Thanked: 122 times | Joined on Dec 2009 @ London, United Kingdom
#178
Originally Posted by rooted View Post
Wow, what a bug. So obvious, but unnoticed till now. Anyway, when DCE widget resized to bigger height (with no. of lines) the widget itself is bigger, but the tapping area stays the same. This means that if you tap the widget in the lower area, it doesn't register it. Please fix this, because I'm using it for buttons: disconnect/connect/lock screen (via dbus) and I need some bigger buttons.
Yeah... it is a "known buggy". Will be fixed on the next version. (together with the overwritting on =])

PS: I'm very busy and so the next version is expected to some time in the end of march when I'll have more time.
__________________
Happy n900 owner!
Check my apps: n900fly, accdisplay and the "desktop command execution" widget!
 

The Following User Says Thank You to cpscotti For This Useful Post:
kd_alex's Avatar
Posts: 116 | Thanked: 19 times | Joined on Mar 2010
#179
I use the LIRC program which has a socket issue whenever the phone is restarted. The issue is resolved by running the following command lines:

sudo gainroot
/etc/init.d/lirc start

Is there anyway to use this widget to run these so I do not have to open a terminal when I want to use LIRC?? Maybe two widgets using an echo command for both?
 
Posts: 539 | Thanked: 165 times | Joined on Feb 2010 @ Berlin, Germany
#180
Similary to #177 you might want to use
rootsh /etc/init.d/lirc start
as commandline. Obviously you will need to have rootsh installed.
 
Reply


 
Forum Jump


All times are GMT. The time now is 08:03.