View source for User:Pike/Shell tools
From Openmoko
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Return to User:Pike/Shell tools.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Return to User:Pike/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 - and link those from /usr/share/applications, as in
Exec=vala-terminal -e "/root/bin/somescript.sh; exit"
No big magic here. YMMV.
Very usefull when using wifi or a navigator, or a alarm :-D
#!/bin/sh echo "never sleeping again" mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage \ org.freesmartphone.Usage.SetResourcePolicy \ Display enabled sleep 5
#!/bin/sh echo "Sleeping when I want" mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage \ org.freesmartphone.Usage.SetResourcePolicy \ Display auto sleep 5
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
#!/bin/sh # keep the screen alive # power down wifi mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage \ org.freesmartphone.Usage.SetResourcePolicy \ WiFi disabled sleep 5
#!/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
#!/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
#!/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 &