OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Add An Icon To A Tab And Set The App To Open, with a specific file.
hughsieman
post May 2 2007, 03:22 AM
Post #1





Group: Members
Posts: 28
Joined: 28-December 06
Member No.: 13,514



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
Go to the top of the page
 
+Quote Post
Capn_Fish
post May 4 2007, 03:52 AM
Post #2





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



If when you made the tab you had to enter something like this:

CODE
exec opera


Try this:

CODE
exec opera /path/to/file.html
Go to the top of the page
 
+Quote Post
hughsieman
post May 4 2007, 06:38 AM
Post #3





Group: Members
Posts: 28
Joined: 28-December 06
Member No.: 13,514



QUOTE(Capn_Fish @ May 4 2007, 12:52 PM)
If when you made the tab you had to enter something like this:

CODE
exec opera


Try this:

CODE
exec opera /path/to/file.html

*


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
Go to the top of the page
 
+Quote Post
jfv
post May 4 2007, 07:44 AM
Post #4





Group: Members
Posts: 438
Joined: 24-June 03
Member No.: 202



Don't use "the form". Edit the application.desktop file.
Go to the top of the page
 
+Quote Post
hughsieman
post May 11 2007, 07:57 AM
Post #5





Group: Members
Posts: 28
Joined: 28-December 06
Member No.: 13,514



QUOTE(jfv @ May 4 2007, 04:44 PM)
Don't use "the form". Edit the application.desktop file.
*


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
Go to the top of the page
 
+Quote Post
Meanie
post May 11 2007, 08:03 AM
Post #6





Group: Members
Posts: 2,808
Joined: 21-March 05
From: Sydney, Australia
Member No.: 6,686



QUOTE(hughsieman @ May 12 2007, 01:57 AM)
QUOTE(jfv @ May 4 2007, 04:44 PM)
Don't use "the form". Edit the application.desktop file.
*


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
*




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....
Go to the top of the page
 
+Quote Post
hughsieman
post May 11 2007, 10:20 AM
Post #7





Group: Members
Posts: 28
Joined: 28-December 06
Member No.: 13,514



QUOTE(Meanie @ May 11 2007, 05:03 PM)
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....
*


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
Go to the top of the page
 
+Quote Post
Cresho
post May 11 2007, 01:56 PM
Post #8





Group: Moderators
Posts: 1,619
Joined: 29-October 03
From: Los Angeles
Member No.: 809



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
#!/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.

This post has been edited by Cresho: May 11 2007, 02:22 PM
Go to the top of the page
 
+Quote Post
hughsieman
post May 12 2007, 04:02 AM
Post #9





Group: Members
Posts: 28
Joined: 28-December 06
Member No.: 13,514



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.
Go to the top of the page
 
+Quote Post
pengunassasin
post May 13 2007, 07:38 AM
Post #10





Group: Members
Posts: 19
Joined: 29-April 07
From: earth... lets generalize.
Member No.: 16,129



QUOTE(hughsieman @ May 12 2007, 05:02 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.
*

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?
Go to the top of the page
 
+Quote Post
Jon_J
post May 13 2007, 08:03 AM
Post #11





Group: Members
Posts: 1,843
Joined: 31-December 05
From: Illinois USA
Member No.: 8,821



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
HancomMobileWord /hdd3/poker-run-pda.doc
Make 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.
Attached File(s)
Attached File  Cacko_applications_5_13_07.png ( 190.27K ) Number of downloads: 31
 
Go to the top of the page
 
+Quote Post
hughsieman
post May 16 2007, 12:24 PM
Post #12





Group: Members
Posts: 28
Joined: 28-December 06
Member No.: 13,514



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th October 2014 - 11:45 PM