Active Topics

 


Reply
Thread Tools
Posts: 44 | Thanked: 15 times | Joined on Jan 2009 @ China
#1
Hi,
I'm trying to execute the suggestions by more senior members in order to install/use multiple GVM installations* on my n810 and also to set up shortcuts to launch individual Palm apps. I'd also like to do a script to set the Hotsync ID (since it often gets lost after a Hotsync).

My question:
What script editor would people recommend? How should line breaks be set?

I have TextWrangler (donateware) on my Powerbook G4 and it has worked well with Supermemo files, but it gives 3 options for line breaks: CR (Mac), LF (Unix) and CRLF (Windows). I assume LF would be the correct choice for scripts in Maemo.

I've also read that some people use nano to edit--what's that? Another poster mentioned vim. My Application Manager says that I have vim installed, but I can't find an icon to launch it in the launch menu.

[If I understand the procedure:
1. I should create the script file and save it as a *.sh file where "*" is, of course, the name of your file.
2. copy the *.sh file to the /home/user folder
3. become root, i.e.: sudo gainroot [with Becomeroot, rootSH or OpenSSH installed]
4. change to the correct directory with: cd /home/user
5. execute a command to change the *.sh files to *.desktop files: chmod +x *.sh
6. copy the new *.desktop file to the "Extra's" directory: copy to /usr/share/applications/hildon
7. Use Control Panel-->Panels-->Organize to move the application to the panel of my choice

For one-line scripts, I've found options listed by bunanson here:

http://www.internettablettalk.com/fo...9&postcount=10

Both bunanson and Mara have posted directions for saving scripts as applications. Mara's are here:

http://www.internettablettalk.com/fo...0&postcount=12

For creating multiple GVM installations, I found burmashave's code here:

http://www.internettablettalk.com/fo...ad.php?t=15518

TA-t3's instructions for launching individual Palm apps (bypassing the GVM launcher) via shortcuts:

http://www.internettablettalk.com/fo...ad.php?t=12297

Thanks!]
 
jmjanzen's Avatar
Posts: 192 | Thanked: 60 times | Joined on Sep 2008 @ Wichita, KS
#2
it looks like you've figured out many pieces to this puzzle, but you're missing a few that i can offer:

".desktop" files are not scripts. they're shortcuts to scripts/programs. the format of these files is explained in the wiki.
"chmod +x" merely makes a script file executable. it's a necessary step, but it won't change your .sh file into a .desktop file. you don't want to do that anyway. you just want to create a .desktop file that links/points to your .sh/script file.

oh, and as far as text editors go, i use the one that's built into emelfm2. then again, i don't do much scripting.... you should download emelfm2 regardless. it's the best file manager out there. very powerful, once you figure out what each button does.
 

The Following User Says Thank You to jmjanzen For This Useful Post:
pelago's Avatar
Posts: 2,121 | Thanked: 1,540 times | Joined on Mar 2008 @ Oxford, UK
#3
nano and vim and text mode (X-Terminal) editors. You probably would prefer a graphical mode one while starting out. Leafpad might be a good choice.
 

The Following User Says Thank You to pelago For This Useful Post:
Posts: 678 | Thanked: 197 times | Joined on Jul 2007 @ San Jose CA
#4
Originally Posted by Palmleavr View Post

My question:
What script editor would people recommend? How should line breaks be set?

....

1. I assume LF would be the correct choice for scripts in Maemo.

....

2. My Application Manager says that I have vim installed, but I can't find an icon to launch it in the launch menu.
1. Correct. LF is used for unix text files.

2. vim is invoked by using in a command line. (vim is a vi editor compatible.)
You have to go to a xterm and type: vim <filename>

Google "vi commands" and test vim out!
 

The Following User Says Thank You to nhanquy For This Useful Post:
Posts: 44 | Thanked: 15 times | Joined on Jan 2009 @ China
#5
jmjanzen, pelago, nhanquy, thank you!

I will try the script + shortcut thing soon, but I have another question:

I looked at the format of the .desktop file in the wiki and saw nothing about the icon. Is there a way to assign a user-defined icon to each script shortcut?
 
Reply

Tags
editor, garnet, mac, palm, scripts


 
Forum Jump


All times are GMT. The time now is 11:41.