[maemo-users] Quick Launch for simple scripts

From: Julian Toler juliantoler at googlemail.com
Date: Sat Dec 29 14:10:21 EET 2007
I am looking for a way to quickly and easily run some simple scripts - the
most immediate example is the one line scripts for switching USB host mode
on and off:
echo host > /sys/devices/platform/musb_hdrc/mode
echo otg > /sys/devices/platform/musb_hdrc/mode

I really don't want to have to fire up the terminal and type these out (and
yes I know tab auto complete can speed this up, but this is still not as
easy as a menu item!)

I am very much a noob so the following idea may be naive and may be shot
down immediately:
I am assuming I could create a menu item that would run a shell script? Not
sure whether these desktop files need to point at executables or whether
executable scripts are also OK?

[Desktop Entry]
Encoding=UTF-8 ?? needed?
Exec=/usr/bin/myscript.sh (or .py or whatever)
Icon=MyNiceIcon (I can create the correct transparent png)
Type=Application ?? needed?
StartupWMClass= ?? needed?
X-Osso-Type=application/x-executable ?? needed?
X-Osso-Service=com.nokia. ?? needed?

I am guessing MyShinyScript would look something like:

echo host > /sys/devices/platform/musb_hdrc/mode
I know I must make the scripts executable with chmod +x

Of course all this is probably going to be superceded by some kind person
who has set up Scratchbox and got their teeth into real programming - a
proper Maemo application which installs a simple host mode on-off utility
would seem to be a logical development, but in the meanwhile, a scripted
hack would be good for me!

Please could somebody tell me if my mad idea will work or whether I should
go home and start proper application development?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-users/attachments/20071229/89e2c5c8/attachment.htm 
More information about the maemo-users mailing list