Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Desktop Command Execution Widget scripts

    Reply
    Page 19 of 42 | Prev | 9   17     18   19   20     21   29 | Next | Last
    mrmoosehead | # 181 | 2010-03-09, 12:38 | Report

    Did anyone ever get as far as compiling a list of useful scripts? A wiki or the like?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    kd_alex | # 182 | 2010-03-10, 01:25 | Report

    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!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Addison | # 183 | 2010-03-11, 02:38 | Report

    Is this something that might also work under Diablo?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    kd_alex | # 184 | 2010-03-12, 01:56 | Report

    If by Diablo you mean Maemo 4.X, I have no idea. I am using Maemo 5.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mjec | # 185 | 2010-03-12, 07:34 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by mjec; 2010-03-13 at 05:13.
    The Following User Says Thank You to mjec For This Useful Post:
    Alan_Peery

     
    mjec | # 186 | 2010-03-12, 07:54 | Report

    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).

    Edit | Forward | Quote | Quick Reply | Thanks

     
    x-lette | # 187 | 2010-03-12, 11:36 | Report

    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!".

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to x-lette For This Useful Post:
    Alan_Peery

     
    Rob1n | # 188 | 2010-03-12, 11:58 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to Rob1n For This Useful Post:
    Alan_Peery, mjec

     
    fpp | # 189 | 2010-03-12, 12:11 | Report

    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 ? :-)

    Edit | Forward | Quote | Quick Reply | Thanks

     
    rooted | # 190 | 2010-03-14, 14:20 | Report

    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!

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to rooted For This Useful Post:
    Alan_Peery, cpscotti, jakiman, mrmoosehead

     
    Page 19 of 42 | Prev | 9   17     18   19   20     21   29 | Next | Last
vBulletin® Version 3.8.8
Normal Logout