Active Topics

 



Notices


Reply
Thread Tools
Posts: 52 | Thanked: 24 times | Joined on Feb 2010 @ West Yorks
#181
Did anyone ever get as far as compiling a list of useful scripts? A wiki or the like?
 
kd_alex's Avatar
Posts: 116 | Thanked: 19 times | Joined on Mar 2010
#182
Originally Posted by x-lette View Post
Similary to #177 you might want to use
rootsh /etc/init.d/lirc start
as commandline. Obviously you will need to have rootsh installed.
I tried this. On the widget i get invalid command. I tried this command in the X-terminal to get this response:

'rootsh is now deprecated for it poses too much of a security risk. However, you can still obtain a root shell by running the commands root or sudo root.'

What if I make a script file to perform the task in two steps (I.e. gain root, execute lirc start) and then have the widget run the script file? I'll try that.

Thanks for the idea!
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#183
Is this something that might also work under Diablo?
 
kd_alex's Avatar
Posts: 116 | Thanked: 19 times | Joined on Mar 2010
#184
If by Diablo you mean Maemo 4.X, I have no idea. I am using Maemo 5.
 
Posts: 10 | Thanked: 5 times | Joined on Jan 2010 @ Tasmania, Australia
#185
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.
Always use sudo visudo for this.

Update: see Rob1n's post for a better way to do this using /etc/sudoers.d

Just going right ahead and editing it can be extremely dangerous; messing up the file on a limited permissions system like the N900 can cause brickage.

You probably want to add the command to the sudoers file and then have

echo "" && sudo echo 2 > /sys/class/backlight/acx565akm/brightness

as your DCE script. We begin with echo "" as DCEW doesn't like getting no output.

Last edited by mjec; 2010-03-13 at 05:13.
 

The Following User Says Thank You to mjec For This Useful Post:
Posts: 10 | Thanked: 5 times | Joined on Jan 2010 @ Tasmania, Australia
#186
Apologies for the double post

Originally Posted by thesnake505 View Post
hay guys, i was wondering if there is a list, like a wiki page of comands that will work with dsew widget?
also is it possible to get "top" working, iv had a qucik go, including following some advice to try

top -b

however all i get is invalid command

cheers snake
To get the top two applications I use top -bn 1 | grep -v top | head -n 5 | tail -n 2. This will always exclude top itself. You should also give due consideration to having a .toprc file (see the top man page for details). Beware though: having this widget uses a surprising amount of CPU, so only refresh occasionally (i.e. probably not on switch and every minute).

To get more you have to change n for both head and tail (i.e. for top three apps it's head -n 6 | tail -n 3, for top one is head -n 4 | tail -n 1).
 
Posts: 539 | Thanked: 165 times | Joined on Feb 2010 @ Berlin, Germany
#187
Originally Posted by mjec View Post
You probably want to add the command to the sudoers file and then have

echo "" && sudo echo 2 > /sys/class/backlight/acx565akm/brightness

as your DCE script. We begin with echo "" as DCEW doesn't like getting no output.
Might be more useful having the empty echo as a result of the actual command. This way you get noticed in case something goes wrong:

sudo echo 2 > /sys/class/backlight/acx565akm/brightness && echo "" || echo "Error!"

In case everything was OK the output is empty, if there was any error, the output will be "Errror!".
 

The Following User Says Thank You to x-lette For This Useful Post:
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#188
Originally Posted by mjec View Post
Always use sudo visudo for this.

Just going right ahead and editing it can be extremely dangerous; messing up the file on a limited permissions system like the N900 can cause brickage.
You don't actually want to be editing sudoers directly at all on the N900. You should add a new config file into the /etc/sudoers.d directory and call update-sudoers instead.
 

The Following 2 Users Say Thank You to Rob1n For This Useful Post:
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#189
Originally Posted by cpscotti View Post
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.
Good news... and what do you think of my request (and a couple of others) to allow icons as well as text for the widget caption ? :-)
__________________
maemo blog
 
Posts: 156 | Thanked: 90 times | Joined on Jan 2010
#190
http://wiki.maemo.org/Desktop_Comman...Widget_scripts

You're welcome. It needs only to be put in appropriate categories and missing and/or new scripts must be added!
 

The Following 4 Users Say Thank You to rooted For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 07:57.