View Single Post
Posts: 44 | Thanked: 15 times | Joined on Jan 2009 @ China
#1
Hi,
I've been trying to write scripts to run the Garnet VM. I've been following the directions from Mara's post on creating executable scripts:

http://www.internettablettalk.com/wi..._using_OS_2008

My problem: after copying the *.sh files over to /home/user/MyDocs, the chmod +x doesn't seem to do anything. I assumed that *.desktop files would be created automatically, but I seem to be mistaken. After I execute "chmod" for each file, there are no visible changes in the /home/user/MyDocs folder.

I typed up the scripts using TextWrangler (a donateware text editor on the Mac that is friendly to programmers). I've started off by creating these scripts to backup, restore and launch the Garnet VM:

To Launch (saved as GLaunch.sh):
Code:
/usr/bin/gvm/gvm -S --rotated=no --fullscreen=no --deviceid=D050 --serialnum XXXXXXXXXXXX-X --hotsyncid=XXX XXX
Note: D050 is the device ID for a Palm TX, the serialnum argument did not list an "=" after the argument in TA-T3's post, so I didn't add one. The serial number is supposed to be 12 digits; I took mine off of my Palm TX (found via FileEZ) which as 12 digits followed by a dash and one letter.

To Backup the gvm.store (saved as GBackup.sh):
Code:
tar cvf /media/mmc2/gvm-backup.tar .gvm
To Restore gvm.store from the backup (saved as GRestore.sh):
Code:
tar xvf /media/mmc2/gvm-backup.tar
I copied these three files to the /home/user/MyDocs folder using emelfm2. Then:

1. I opened XTerm and did "sudo gainroot"
2. I did "cd /home/user/MyDocs"
3. I did "ls" to make sure the script files were present
4. I did "chmod +x *.sh" for each of the script files (where "*" is the name of each of the files
5. I then did "ls" again to see if there were any changes in the directories, but there were none. I even checked to see if there were hidden files (checking the green "H" in emelfm2).

I started to manually create *.desktop files for these scripts, but I realized that I didn't know the syntax for such files. I've taken the following example from one of burmashave's posts. For someone who is more experienced, will this do?

Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Script
Name=GLaunch
Exec=/home/user/MyDocs/GLaunch.sh
Comment=to launch GVM using set parameters
So, can someone help me figure out:
1. Why the chmod command doesn't seem to be working for me
2. Can I just create *.desktop files manually as above and transfer these to /usr/share/applications/hildon and have the executable show up in "Extras"?
3. If the *.desktop file looks okay, will it then execute my chmod'd *.sh files as they are now?

Thanks!

By the way, I'm running Diablo on an n810.

Update:
Well, I went ahead and double-checked the form for a *.desktop file on the wiki and wrote one in TextWrangler and copied it over to /usr/shared/applications/hildon. Sure enough, it showed up in Extras, but, when I clicked on it, nothing happened. Here is the code I used for the GLaunch.desktop file:

[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Name=GLaunch
Exec=/home/user/MyDocs/GLaunch.sh
X-Osso-Type=application/x-executable
Comment=to launch GVM using set parameters

Last edited by Palmleavr; 2009-03-21 at 17:53. Reason: update