View Single Post
Copernicus's Avatar
Posts: 1,986 | Thanked: 7,698 times | Joined on Dec 2010 @ Dayton, Ohio
#6
Originally Posted by sevep View Post
could someone run by me again how to make this executable so it will work with a Queen BeeCon shortcut on the desktop.
Hmm, I've actually not used Queen BeeCon before (I'm an n900 newbie), but I can tell you how to make an executable shell script.

First, you need a shell script. I played around a bit with Firefox, and discovered that if you don't already have it running, you need to give it a few seconds to start up before you start cramming additional websites down its throat. So, I added a "sleep" command to create a pause between requests to execute fennec:

Code:
/usr/bin/fennec http://www.cnn.com &
sleep 5
/usr/bin/fennec http://www.npr.org &
Save this in a text file, with a name you like, say, "OpenWebPages". You can then run the commands in the file by passing it to a shell, e.g. "sh OpenWebPages". However, you can use the magic #! flag to invoke a shell from within the text file itself; when Unix is presented with an executable text file whose first two characters are #!, it runs the program following those two characters and passes the rest of the lines as input to it. So, my amended shell script would now be:

Code:
#!/usr/bin/sh
/usr/bin/fennec http://www.cnn.com &
sleep 5
/usr/bin/fennec http://www.npr.org &
Then, you need to make the text file executable (I use "chmod +x OpenWebPages"), and you can now run it by just typing "OpenWebPages" at the xterm prompt.

I don't know if that's enough for Queen BeeCon to make use of it. There is also apparently a "Desktop Command Execution Widget" out there that can run arbitrary shell scripts from the desktop, but I haven't tried it. After digging around a bit, I found that you can also just write your own Hildon "desktop" file fairly easily, and thus make anything you want visible as an icon on the desktop. This seemed more appealing to me, so I gave it a try. (I stole my info from this thread: http://talk.maemo.org/showthread.php?t=58613 )

Here's the desktop file I used:

Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=true
Name=OpenWebPages
Exec=/home/user/OpenWebPages
Icon=Terminal
X-Osso-Type=application/x-executable
Unfortunately, I don't yet know what most of these entries signify, so I'm not 100% sure this is the best way to write a "desktop" file, but this did work for me. What you need to do is copy this file (named OpenWebPages.desktop, I'm not entirely sure you need to give it the name of your executable followed by .desktop, but the rest of the files follow that convention) into /usr/share/applications/hildon. (You'll need root access to do this.) Then, you should be able to to go to the desktop menu and choose "add shortcut", and your OpenWebPages executable should be visible as one of the icons there.

Hope this helps!
 

The Following User Says Thank You to Copernicus For This Useful Post: