OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Sharp ROMs => Topic started by: hughsieman on May 02, 2007, 07:22:51 am

Title: Add An Icon To A Tab And Set The App To Open
Post by: hughsieman on May 02, 2007, 07:22:51 am
Hi

I have a quick question please.

I want to create an application icon on a tab which will open up an .html file that is stored on my hdd, in Opera.

I have created the item on the tab, selected the icon I want and then set the application to Opera but how do I tell it which page to open when I click the icon?

Many Thanks
Title: Add An Icon To A Tab And Set The App To Open
Post by: Capn_Fish on May 04, 2007, 07:52:07 am
If when you made the tab you had to enter something like this:

Code: [Select]
exec opera
Try this:

Code: [Select]
exec opera /path/to/file.html
Title: Add An Icon To A Tab And Set The App To Open
Post by: hughsieman on May 04, 2007, 10:38:18 am
Quote
If when you made the tab you had to enter something like this:

Code: [Select]
exec opera
Try this:

Code: [Select]
exec opera /path/to/file.html[div align=\"right\"][a href=\"index.php?act=findpost&pid=160452\"][{POST_SNAPBACK}][/a][/div]

Thanks for the response.

Unfortunately, it will only except a valid application name in the form.

You can type in the application name into the 'Program' textbox or you can select a program from the list but if I try to put 'opera /filepath/filename.html' I get a dialog saying 'This program is not found'.

Cheers

Hughsieman
Title: Add An Icon To A Tab And Set The App To Open
Post by: jfv on May 04, 2007, 11:44:22 am
Don't use "the form". Edit the application.desktop file.
Title: Add An Icon To A Tab And Set The App To Open
Post by: hughsieman on May 11, 2007, 11:57:38 am
Quote
Don't use "the form". Edit the application.desktop file.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160468\"][{POST_SNAPBACK}][/a][/div]

I must remember to hide my profession as a Windows developer when on this forum :-)

I edited the .desktop file but it doesn't work unfortunately. It just opens Opera and doesn't open the page.

I also tried just putting the path in without Opera i.e. :-

Exec = /hdd2/Documents/Web_Files/test.html

But this still just opened Opera without the html page.

Any ideas? I reckon this must be possible to do somehow. I hope so anyway as there are a few local html pages/sites I would like to setup with an icon for easy access.

Cheers

Hughsieman
Title: Add An Icon To A Tab And Set The App To Open
Post by: Meanie on May 11, 2007, 12:03:54 pm
Quote
Quote
Don't use "the form". Edit the application.desktop file.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160468\"][{POST_SNAPBACK}][/a][/div]

I must remember to hide my profession as a Windows developer when on this forum :-)

I edited the .desktop file but it doesn't work unfortunately. It just opens Opera and doesn't open the page.

I also tried just putting the path in without Opera i.e. :-

Exec = /hdd2/Documents/Web_Files/test.html

But this still just opened Opera without the html page.

Any ideas? I reckon this must be possible to do somehow. I hope so anyway as there are a few local html pages/sites I would like to setup with an icon for easy access.

Cheers

Hughsieman
[div align=\"right\"][a href=\"index.php?act=findpost&pid=161075\"][{POST_SNAPBACK}][/a][/div]


normally, you can just add the argument in the .desktop file, but SharpROM is using very very old version of qtopia which ignores arguments. what you need to do is create a script which runs your app and loads the doc you can and put the name of the script into the desktop file instead....
Title: Add An Icon To A Tab And Set The App To Open
Post by: hughsieman on May 11, 2007, 02:20:53 pm
Quote
normally, you can just add the argument in the .desktop file, but SharpROM is using very very old version of qtopia which ignores arguments. what you need to do is create a script which runs your app and loads the doc you can and put the name of the script into the desktop file instead....
[div align=\"right\"][a href=\"index.php?act=findpost&pid=161077\"][{POST_SNAPBACK}][/a][/div]

Cheers Meanie, sorry to be a pain though, please would you be able to give me an example of what to stick in a script file to open a particular web page in Opera.

Thanks again
Title: Add An Icon To A Tab And Set The App To Open
Post by: Cresho on May 11, 2007, 05:56:10 pm
this is simple.  sorry for my bad grammer because i am in a car being driven around while typing this on my Z.

first, download and install simple-edit_1.0.3_arm.ipk (do not run under root!)

open  simple edit and create a file called "myapplication.sh" in documents

use this code and save it
remember to modify the directory since this is my directory i use.
Code: [Select]
#!/bin/bash
exec opera file://localhost/hdd3/Documents/Book_Files/cd_image/start/index.html
exit 0
copy this file into the /home/QtPalmtop/bin directory and the permissions should be fine since you created the file under zaurus.  if it does not execute/ then get back to us and ill show you how to apply user right to allow file execution.  I did this on my zaurus and works just fine
now crate the icon in the tab manager and put the file name exactly like the file you created in the directory and there you have it.  you will need to hold the icon down and remove the magnify option since opera runs in full screen.
Title: Add An Icon To A Tab And Set The App To Open
Post by: hughsieman on May 12, 2007, 08:02:04 am
Thanks very much for that, I've created a few links to pages and they worked great once I added execute permissions.

One more question please if I may? I want to create another icon to load a console app.

I have tried variations on what you gave me above but have been unable to get the link to work. I want to open QKonsole and then start hexedit. What do I need to put in the script to do this?

Thanks again.
Title: Add An Icon To A Tab And Set The App To Open
Post by: pengunassasin on May 13, 2007, 11:38:14 am
Quote
Thanks very much for that, I've created a few links to pages and they worked great once I added execute permissions.

One more question please if I may? I want to create another icon to load a console app.

I have tried variations on what you gave me above but have been unable to get the link to work. I want to open QKonsole and then start hexedit. What do I need to put in the script to do this?

Thanks again.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=161150\"][{POST_SNAPBACK}][/a][/div]
hmmMMMmmMMMMm
I tried doing this a while ago.... theres a Way to do this.
i BELIVE qkonsole has a command line option on what shell to use. you can set this to something like "foo.sh" where foo.sh has the line "bash -e /path/to/app"

that help?
Title: Add An Icon To A Tab And Set The App To Open
Post by: Jon_J on May 13, 2007, 12:03:19 pm
Here is how I placed a Ms word document on my Applications tab and caused it to open in Hancom Word with an icon.
1. I created a text file with the below text, named it "docstart.sh" and placed it into /home/QtPalmtop/bin, then made it executable. (I used Tree!Explorer to set it to executable).
Code: [Select]
HancomMobileWord /hdd3/poker-run-pda.docMake sure the path to your file or document (as above example) is correct.
2. Then using the "Tab setting" app, I created a new icon in "Applications"
Click on one of the applications in the Tab setting utility, then click the blank sheet of paper icon. This creates a new icon for an application.
In this dialog, give your icon a name. Then select an icon for it. Then next to "Program", click the 3 dots ...
Browse for your newly created *.sh file. (In my case, it was named docstart.sh).
Click "OK" and close the Tab settings utility by clicking "OK" to each prompt.
You should now have a new icon on your Applications tab.
If this doesn't work for you, go back and check all your steps.

I think the Tab settings "Select Program" WILL NOT find your "docstart.sh" file unless you have set it to executable.
I also think using the *.sh extension on your file may help in some way.
I used a Ms Word document because it is already associated to Hancom Word.
Title: Add An Icon To A Tab And Set The App To Open
Post by: hughsieman on May 16, 2007, 04:24:42 pm
Thanks very much for the help on this. I have been able to create some links to local web pages, Word docs and others but I cannot create a link to open hexedit in a konsole window as I mentioned above.

Just been playing around with it again with no luck so if anyone can put me out of my misery it would be very much appreciated as I reckon the solution is probably easy.

Cheers