Quick Launch for simple scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
and
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]
Version=1.0
Encoding=UTF-8 ?? needed?
Name=MyShinyScript
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:

#!/bin/sh
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?

Cheers

J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-users/attachments/20071229/89e2c5c8/attachment.htm 


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux