User:Pike/Shell tools
From Openmoko
(New page: =Shell Tools= So many GUIs to do so many things - and they all crash or do the wrong thing - and what i need is always so simple. So lately I keep a bunch of shell scripts to do the job ...) |
(→Shell Tools) |
||
(2 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
=Shell Tools= | =Shell Tools= | ||
− | So many GUIs to do so many things - and they all crash or do the wrong thing - and what i need is always | + | So many GUIs to do so many things - and they all crash or do the wrong thing - and what i need is always sooooo simple. So lately I keep a bunch of shell scripts to do the job - and link those from /usr/share/applications, using |
− | + | ||
− | So lately I keep a bunch of shell scripts to do the job - and link those from /usr/share/applications, | + | |
<pre> | <pre> | ||
Exec=vala-terminal -e "/root/bin/somescript.sh; exit" | Exec=vala-terminal -e "/root/bin/somescript.sh; exit" | ||
</pre> | </pre> | ||
− | No big magic here. YMMV. | + | No big magic here. YMMV. Tweek as needed. |
==keeping the phone from falling asleep== | ==keeping the phone from falling asleep== | ||
Line 58: | Line 56: | ||
<pre> | <pre> | ||
#!/bin/sh | #!/bin/sh | ||
− | |||
− | |||
# power down wifi | # power down wifi | ||
Line 97: | Line 93: | ||
==change paroli bg== | ==change paroli bg== | ||
+ | Actually, I've only done this once. Saving it here for reference. | ||
+ | |||
<pre> | <pre> | ||
#!/bin/sh | #!/bin/sh |
Latest revision as of 16:06, 27 August 2009
Contents |
[edit] Shell Tools
So many GUIs to do so many things - and they all crash or do the wrong thing - and what i need is always sooooo simple. So lately I keep a bunch of shell scripts to do the job - and link those from /usr/share/applications, using
Exec=vala-terminal -e "/root/bin/somescript.sh; exit"
No big magic here. YMMV. Tweek as needed.
[edit] keeping the phone from falling asleep
Very usefull when using wifi or a navigator, or a alarm :-D
[edit] sleep-off.sh
#!/bin/sh echo "never sleeping again" mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage \ org.freesmartphone.Usage.SetResourcePolicy \ Display enabled sleep 5
[edit] sleep-on.sh
#!/bin/sh echo "Sleeping when I want" mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage \ org.freesmartphone.Usage.SetResourcePolicy \ Display auto sleep 5
[edit] wifi management
[edit] wifi-home.sh
This ofcourse requires you have configure your network/interfaces ..
#!/bin/sh # power up wifi mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage \ org.freesmartphone.Usage.SetResourcePolicy \ WiFi enabled # bounce eth0 iwconfig eth0 essid your_essid_here ifdown eth0; ifup eth0 sleep 30
[edit] wifi-off.sh
#!/bin/sh # power down wifi mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage \ org.freesmartphone.Usage.SetResourcePolicy \ WiFi disabled sleep 5
[edit] gprs management
[edit] gprs-on.sh
#!/bin/sh echo enabling gprs .. APN="internet" USERNAME=" " PASSWORD=" " BUSNAME="org.freesmartphone.ogsmd" OBJECTPATH="/org/freesmartphone/GSM/Device" METHODNAME="org.freesmartphone.GSM.PDP.ActivateContext" mdbus -s $BUSNAME $OBJECTPATH $METHODNAME $APN "$USERNAME" "$PASSWORD" sleep 5
[edit] gprs-off.sh
#!/bin/sh echo "Disabling gprs" BUSNAME="org.freesmartphone.ogsmd" OBJECTPATH="/org/freesmartphone/GSM/Device" METHODNAME="org.freesmartphone.GSM.PDP.DeactivateContext" mdbus -s $BUSNAME $OBJECTPATH $METHODNAME sleep 5
[edit] change paroli bg
Actually, I've only done this once. Saving it here for reference.
#!/bin/sh BLAH=/usr/share/paroli/applications/paroli-launcher2/edje/default/images/bg.png echo "put your bg in $BLAH" cd /usr/share/paroli/applications/paroli-launcher2 edje_cc -id edje/default/images -id ../common-for-edje/images -fd ../common-for-edje/fonts \ edje/default/paroli-launcher.edc -o paroli-launcher.edj chmod +r paroli-launcher.edj pkill paroli DISPLAY=:0 paroli &