Author Topic: making a script launchable  (Read 2684 times)

rrashkin

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://pwp.t-3.cc/rrashkin
making a script launchable
« on: December 15, 2003, 03:44:20 pm »
I have some Java apps that I have been perfectly happy launching manually from a terminal (I don\'t need to clutter up my apps tab with only seldom used icons).  I wrote a script in /home/zaurus to make them easier to get to.  Essentially I use bash \"select\" to choose either SD or CF (I have apps on both), \"cd\" to the right .../java/ directory and source another bash script to choose among the classes there.  As I said, I was happy to do it that way until I read the following in the HowTo section of this forum:

Quote
The more flexible way
To make it so that you can tap a script in the Document/Files tab and it will launch in the terminal, follow the instructions below:  

1) Install the latest version of Embedded Konsole
2) Edit the file /home/QtPalmtop/etc/mime.types and if it does not have an entry for \"application/x-sh\" then add the following line  

 application/x-sh      sh

3) Edit the Embedded Konsole desktop icon file, which is usually /home/QtPalmtop/apps/Applications/embeddedkonsole.desktop, and add the following lines:  

 MimeType = application/x-sh
 MimeTypeIcons = konsole/Terminal

4) Restart Qtopia
5) Create a shell script anywhere where it will be visible on the Documents/Files tab, give the it the filename extension \'.sh\', and make sure it is executable with the command:  

 chmod a+x myscript.sh

Then when you tap the script file in the Documents/Files tab it will launch within the Konsole application. It is important that you give the script file a \'.sh\' filename extension as that is how it is associated with the Mime Type application/x-sh and that in turn is associated with the Embedded Konsole application.

I thought that sounded like it would be worth a try.  Now I can \"launch\" my script from the file menu but it just brings up the terminal; it does not run my script (i.e., give me the menu).  Just in case it matters, this is the script, javapps.sh (it runs fine from the terminal if I type \". javapps.sh\")
Code: [Select]
. chprmpt

select dir in cf card;

do

cd /mnt/$dir/QtPalmtop/java

break;

done

. appmenu.sh


Any hints what I\'m doing wrong?
Bob Rashkin
rrashkin@csc.com
SL5500/Sharp3.1
Targus IR keyboard

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
making a script launchable
« Reply #1 on: December 15, 2003, 05:43:45 pm »
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

rrashkin

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://pwp.t-3.cc/rrashkin
making a script launchable
« Reply #2 on: December 16, 2003, 09:43:28 am »
Do I need to un-install the previous terminal application first?
Bob Rashkin
rrashkin@csc.com
SL5500/Sharp3.1
Targus IR keyboard

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
making a script launchable
« Reply #3 on: December 16, 2003, 11:31:08 am »
Yes
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender