maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Desktop Command Execution Widget scripts (https://talk.maemo.org/showthread.php?t=39177)

rolan900d 2010-04-23 12:52

Re: Desktop Command Execution Widget scripts
 
I had these issues as well but these were mainly due to trying to ad sudo gainroot to the script...

Example:

I want homunculus to start from root...
I couldn't make a script that worked so all hell broke loose and I got errors about hildon-desktop closing down

stayloa 2010-04-23 13:16

Re: Desktop Command Execution Widget scripts
 
Ahh, this actually ties in with something I was doing.

The first time I installed it was working perfectly, until I tried to start cuteexplorer as root... Think I used:

sudo gainroot; cuteexplorer - had no idea if that was right but it didn't like it! I've since uninstalled and reinstalled and now I can't get it to load up even once which is a shame. Any solution?

rooted 2010-04-23 13:43

Re: Desktop Command Execution Widget scripts
 
To both of you:

echo "command" | sudo gainroot

stayloa 2010-04-23 14:57

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by rooted (Post 624444)
To both of you:

echo "command" | sudo gainroot

Ahh I wish I'd known that before I killed the app...!! It doesn't let me do anything with it if I reinstall now...This is why linux n00bs shouldn't play with these things. *points finger at himself*

Any idea what the app could have done to hildon-desktop though? Seemingly everytime I reinstall it, something has been leftover from the previous install...

I will be flashing when/if 1.2 comes out but would prefer to not before that.

rooted 2010-04-23 17:31

Re: Desktop Command Execution Widget scripts
 
Try purging the app first (package mgmt link in my sig).

Jinux 2010-04-23 17:40

Re: Desktop Command Execution Widget scripts
 
Here's a little python script I use to get the verse of the day from BibleGateway

Code:

import feedparser
try:
        feed_in = feedparser.parse('http://www.biblegateway.com/votd/get/?format=atom')
        try:
                feed = str(feed_in.entries[0].title)
                print feed
        except:
                print 'No Content'
except:
        print 'Not Connected'

You need the feedparser module which can be gotten from Here

nokian-series 2010-04-25 00:34

Re: Desktop Command Execution Widget scripts
 
Hi all,
Please i'll apreciate a little help with QBW scripting.

Yes, i know if i do echo "command" | sudo gainroot, it will work.
But..and if it is not a "command" ?

Just like this..I want to make 2 profiles with my personalized OC settings (day\night profile). I'll put here the code for one of them:

/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/cpu0/cpufreq/ondemand/ignore_nice_load
/usr/sbin/kernel-load

How can i make it run with QBW?
If i run it at Xterm, with root, it works.
If i try it with QBW, it doesent work.

I've tried this too, but..nothing..

/usr/sbin/kernel-load /usr/share/kernel-power-settings/ideal
rm -f /etc/default/kernel-power | sudo gainroot
ln -s /usr/share/kernel-power-settings/ideal /etc/default/kernel-power | sudo gainroot
echo "echo 125000 250000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/avoid_frequencies" | sudo gainroot
echo "echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load" | sudo gainroot
/usr/sbin/kernel-load |sudo gainroot

Can please anyone help me? it works like i want on Xterminal.but cant 'export' it to Queen Beecon Widget..help please... (actualy, it acept the code, with no errors but it doesent change any values.

No!No!No!Yes! 2010-04-25 00:48

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by nokian-series (Post 626511)
Hi all,
Please i'll apreciate a little help with QBW scripting.

Yes, i know if i do echo "command" | sudo gainroot, it will work.
But..and if it is not a "command" ?

Just like this..I want to make 2 profiles with my personalized OC settings (day\night profile). I'll put here the code for one of them:

/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

How can i make it run with QBW?
If i run it at Xterm, with root, it works.
If i try it with QBW, it doesent work.

I've tried this too, but..nothing..

/usr/sbin/kernel-load /usr/share/kernel-power-settings/ideal
rm -f /etc/default/kernel-power | sudo gainroot
ln -s /usr/share/kernel-power-settings/ideal /etc/default/kernel-power | sudo gainroot
echo "echo 125000 250000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/avoid_frequencies" | sudo gainroot
echo "echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load" | sudo gainroot
/usr/sbin/kernel-load |sudo gainroot

Can please anyone help me? it works like i want on Xterminal.but cant 'export' it to Queen Beecon Widget..help please... (actualy, it acept the code, with no errors but it doesent change any values.

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.

nokian-series 2010-04-25 01:11

Re: Desktop Command Execution Widget scripts
 
It dont have the result i've expected.
(if i do it from xterminal, line by line, it works ... )


Quote:

Originally Posted by No!No!No!Yes! (Post 626517)
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.


nokian-series 2010-04-25 10:13

Re: Desktop Command Execution Widget scripts
 
Is there another way to execute that commands with 'root' ?! Or i'm doing anything wrong with that method of script.sh ?

Jinux 2010-04-25 10:19

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by nokian-series (Post 626810)
Is there another way to execute that commands with 'root' ?! Or i'm doing anything wrong with that method of script.sh ?

Why not just put "sudo gainroot" at the top of the script before all the commands? No need to pipe it then...

x-lette 2010-04-25 10:38

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by Jinux (Post 626814)
Why not just put "sudo gainroot" at the top of the script before all the commands? No need to pipe it then...

Because it won't work. You need to execute the script itself as root. Putting sudo gainroot in first line will break the script.

x-lette 2010-04-25 10:41

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by nokian-series (Post 626528)
It dont have the result i've expected.
(if i do it from xterminal, line by line, it works ... )

OK, could you also tell us what it actually does and what you'd expect it to do?

What happens if you call the script from commandline? As user with the given pipe to sudo gainroot and as root by calling the script directly.

Is the script executable? Check it!

nokian-series 2010-04-25 19:14

Re: Desktop Command Execution Widget scripts
 
Ok, i got it..to many lines i think.
I've worked arround the problem, do what i want by different way..it works too..so..thank you all, that tip of script.sh was very good!

rooted 2010-05-03 05:38

Re: Desktop Command Execution Widget scripts
 
There is a bug in 1.1. When you tap the widget to refresh it changes color to blue to indicate a tap. It was working ok before, but now in 1.1 it stays blue in ca. 50% of the cases.

gilou3000 2010-05-13 15:57

Re: Desktop Command Execution Widget scripts
 
Hello

I just got in trouble: I install a 'Lock' widget with the 'Lock screen and keys' command. But forgot to disable the setting which activate it on current desktop.

So now I am stuck in a loop were the phone immediatly re-lock when I unlock it (using the slider stuff).

Any idea?

where are the setting file? I would like to remove the Lock widget by hand...

Any help appreciated

Gilles

gilou3000 2010-05-13 16:05

Re: Desktop Command Execution Widget scripts
 
ok, I manage to get rid of the problem by quickly unlocking the phone and going into widget setting and so on.

But I still would like to know were the widget definitions are.

And by the way this is a great soft...

Gilles


Quote:

Originally Posted by gilou3000 (Post 657023)
Hello

I just got in trouble: I install a 'Lock' widget with the 'Lock screen and keys' command. But forgot to disable the setting which activate it on current desktop.

So now I am stuck in a loop were the phone immediatly re-lock when I unlock it (using the slider stuff).

Any idea?

where are the setting file? I would like to remove the Lock widget by hand...

Any help appreciated

Gilles


twoboxen 2010-05-13 16:07

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by gilou3000 (Post 657023)
Hello

I just got in trouble: I install a 'Lock' widget with the 'Lock screen and keys' command. But forgot to disable the setting which activate it on current desktop.

So now I am stuck in a loop were the phone immediatly re-lock when I unlock it (using the slider stuff).

Any idea?

where are the setting file? I would like to remove the Lock widget by hand...

Any help appreciated

Gilles

ssh in, edit the config file to remove the offending widget. done.

EDIT:
the config file is /home/user/.desktop_cmd_exec

Unhuman 2010-05-19 15:33

Re: Desktop Command Execution Widget scripts
 
The set max cpu frequency doesn't seem to work for me? The command doesn't work from the terminal either. Isn't it out of date a bit? I have titan's kernel installed. Command seems to work in terminal only if I do sudo gainroot first and then insert the command (without "rootsh"). Is there a way to insert "sudo gainroot" in the script? I tried a couple of ideas,but everything failed miserably with a crash :X

rooted 2010-05-19 15:52

Re: Desktop Command Execution Widget scripts
 
Fixed. Please test and post feedback.

Unhuman 2010-05-19 17:51

Re: Desktop Command Execution Widget scripts
 
Works flawlessly now. Thank you ;)

NightShift79 2010-05-21 16:30

Re: Desktop Command Execution Widget scripts
 
is there any script i can use to toggle the Caller ID?
Also i would like to translate this widget to german. How can I do this ?

Chrome 2010-05-30 15:49

Re: Desktop Command Execution Widget scripts
 
I used a stupid script the following problem happened: http://talk.maemo.org/showthread.php...015#post690015

Can anyone help me :D

cpscotti 2010-06-03 18:30

Re: Desktop Command Execution Widget scripts
 
Removing ~/.desktop_cmd_exec should do the trick.

MaltedVomit 2010-06-09 22:07

Re: Desktop Command Execution Widget scripts
 
Hi would it be possible to writ a script to open a local html file with chromium and have it enter full screen mode?

SR90 2010-06-17 21:09

Re: Desktop Command Execution Widget scripts
 
Please Help
I have added th command for Lock screen and keys dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"locked" | echo ""
now everytime I add a desktop command execution widget my phone locks its screen and keys , i have deleted the command and uninstalled the program but sill sometimes it does lock its screen by itself , even if i install the app again , the command shows on my desktop , is it a way to totally delete the application and the command via xterminal since i think it is not uninstalled completely , Thanks in advance

rooted 2010-06-17 21:47

Re: Desktop Command Execution Widget scripts
 
To SR90:

Quote:

Originally Posted by cpscotti (Post 698153)
Removing ~/.desktop_cmd_exec should do the trick.

10char

naturegodtm 2010-06-18 02:38

Re: Desktop Command Execution Widget scripts
 
hi guyes i bought it yesterday . But i cant find this symbol " | " for the grep in the keyboard. any suggestions?

noipv4 2010-06-18 03:15

Re: Desktop Command Execution Widget scripts
 
Blue arrow button (left hand, second from bottom) and then Sym/Ctrl button (right on top of blue arrow). Your on screen menu with '|' pipe will be visible. :) It's a hangover form Symbian I suppose.

naturegodtm 2010-06-21 05:16

Re: Desktop Command Execution Widget scripts
 
thank u very much. well is there any method to replace a button from the keyboard ?

jbw89 2010-06-22 12:04

Re: Desktop Command Execution Widget scripts
 
heey everybody

i have a really big problem with desktop command widget! I was putting some commands in (battery cpu signal etc) until i got to lock/unlockscreen, I past the code of it en saved it, then it automatic it locks the screen, when i unlock it, i have like a milly second, to respons, (when i was in the menu or a app it keeps acting normal)
I've tried to delete en instal de widget again, but when i adding widgetes, it repeat what i did (remembers from last time) so also de lock command an then i get te same story!
I got really angry because i wanted more widget to my desktop

Thanks alot guys for reading!

nicolai 2010-06-22 12:12

Re: Desktop Command Execution Widget scripts
 
Hi,

you can edit (or delete) the file /home/user/.desktop_cmd_exec.
This is where your scripts for this widget are saved.

regards
nicolai

jbw89 2010-06-22 12:31

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by nicolai (Post 724838)
Hi,

you can edit (or delete) the file /home/user/.desktop_cmd_exec.
This is where your scripts for this widget are saved.

regards
nicolai

thanks for the quick respons, but how do i get there? dont really get your intensions,
do i have to go to file manager?
a little noob over here:p

nicolai 2010-06-22 12:40

Re: Desktop Command Execution Widget scripts
 
open xterm and enter
Code:

rm /home/user/.desktop_cmd_exec

jbw89 2010-06-22 12:44

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by nicolai (Post 724869)
open xterm and enter
Code:

rm /home/user/.desktop_cmd_exec

Thanks but it says

rm: cannot remove '/home/user/.desktop_cmd_exec': No such file or directory

jbw89 2010-06-22 12:45

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by jbw89 (Post 724873)
Thanks but it says

rm: cannot remove '/home/user/.desktop_cmd_exec': No such file or directory

Ooo ****, i maked a mistake
thanks alot man it worked! Your a maemo hero:p
Thnkx!!

g0mib0y 2010-06-29 11:23

Re: Desktop Command Execution Widget scripts
 
HOW DO I GET THE | ? Where is it on they keyboard? I have a Swedish device

moudy91 2010-07-13 06:28

Desktop Command Execution Widget scripts
 
dear all
i did make a mistake in this widget but now every time i click to add a new desktop command execution widget my n90 get lock screen, i want to delete all the widget script from my phone so i will use it and put it on my desktop more then 5 or 6 commands.
so any help please.:(

AlMehdi 2010-07-13 06:31

Re: Desktop Command Execution Widget scripts
 
Quote:

Originally Posted by g0mib0y (Post 733870)
HOW DO I GET THE | ? Where is it on they keyboard? I have a Swedish device

By first press "Shift" and then "Sym" on the keyboard.

moudy91 2010-07-13 06:33

Re: Desktop Command Execution Widget scripts
 
i did install emelFM2 and this app It allows me to do anything what i want with any file on my device, including system files maybe it will helps me to search the widget desktop command execution script to fix my problem.
so any help ????


All times are GMT. The time now is 06:37.

vBulletin® Version 3.8.8