Cool - will grab it and give it a whirl!<br>Cheers<br>Julian<br><br><div><span class="gmail_quote">On 29/12/2007, <b class="gmail_sendername">David Hautbois</b> <<a href="mailto:david.hautbois@free.fr">david.hautbois@free.fr
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi<br>Try Kerez :<br><a href="http://david.hautbois.free.fr/joomla/index.php?option=com_content&task=view&id=44&Itemid=43">
http://david.hautbois.free.fr/joomla/index.php?option=com_content&task=view&id=44&Itemid=43</a><br><br>David.<br><br><br>Julian Toler wrote:<br>> I am looking for a way to quickly and easily run some simple scripts -
<br>> the most immediate example is the one line scripts for switching USB<br>> host mode on and off:<br>> echo host > /sys/devices/platform/musb_hdrc/mode<br>> and<br>> echo otg > /sys/devices/platform/musb_hdrc/mode
<br>><br>> I really don't want to have to fire up the terminal and type these out<br>> (and yes I know tab auto complete can speed this up, but this is still<br>> not as easy as a menu item!)<br>><br>> I am very much a noob so the following idea may be naive and may be
<br>> shot down immediately:<br>> I am assuming I could create a menu item that would run a shell<br>> script? Not sure whether these desktop files need to point at<br>> executables or whether executable scripts are also OK?
<br>><br>> [Desktop Entry]<br>> Version=1.0<br>> Encoding=UTF-8 ?? needed?<br>> Name=MyShinyScript<br>> Exec=/usr/bin/myscript.sh (or .py or whatever)<br>> Icon=MyNiceIcon (I can create the correct transparent png)
<br>> Type=Application ?? needed?<br>> StartupWMClass= ?? needed?<br>> X-Osso-Type=application/x-executable ?? needed?<br>> X-Osso-Service=com.nokia. ?? needed?<br>><br>> I am guessing MyShinyScript would look something like:
<br>><br>> #!/bin/sh<br>> echo host > /sys/devices/platform/musb_hdrc/mode<br>> I know I must make the scripts executable with chmod +x<br>><br>> Of course all this is probably going to be superceded by some kind
<br>> person who has set up Scratchbox and got their teeth into real<br>> programming - a proper Maemo application which installs a simple host<br>> mode on-off utility would seem to be a logical development, but in the
<br>> meanwhile, a scripted hack would be good for me!<br>><br>> Please could somebody tell me if my mad idea will work or whether I<br>> should go home and start proper application development?<br>><br>> Cheers
<br>><br>> J<br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> maemo-users mailing list<br>> <a href="mailto:maemo-users@maemo.org">
maemo-users@maemo.org</a><br>> <a href="https://lists.maemo.org/mailman/listinfo/maemo-users">https://lists.maemo.org/mailman/listinfo/maemo-users</a><br>><br><br><br>--<br>Web site : <a href="http://david.hautbois.free.fr">
http://david.hautbois.free.fr</a><br>Tablet users map : <a href="http://david.hautbois.free.fr/maps/index.php">http://david.hautbois.free.fr/maps/index.php</a><br><br><br></blockquote></div><br>