Author Topic: Add An Icon To A Tab And Set The App To Open  (Read 5237 times)

hughsieman

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add An Icon To A Tab And Set The App To Open
« 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

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Add An Icon To A Tab And Set The App To Open
« Reply #1 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
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

hughsieman

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add An Icon To A Tab And Set The App To Open
« Reply #2 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
« Last Edit: May 04, 2007, 10:38:51 am by hughsieman »

jfv

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
Add An Icon To A Tab And Set The App To Open
« Reply #3 on: May 04, 2007, 11:44:22 am »
Don't use "the form". Edit the application.desktop file.
SL 5000 D  and C860 Sharp ROM
Too many accessories...

hughsieman

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add An Icon To A Tab And Set The App To Open
« Reply #4 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

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Add An Icon To A Tab And Set The App To Open
« Reply #5 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....
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

hughsieman

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add An Icon To A Tab And Set The App To Open
« Reply #6 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

Cresho

  • Hero Member
  • *****
  • Posts: 1609
    • View Profile
    • http://home.earthlink.net/~cresho/
Add An Icon To A Tab And Set The App To Open
« Reply #7 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.
« Last Edit: May 11, 2007, 06:22:00 pm by Cresho »
Zaurus C-3200 (internal 8gb seagate drive) with buuf icon theme, cacko 1.23 full,  and also Meanie's pdaxqtrom-Debian/Open Office
Zaurus SL-5500 Sharp Rom 3.13 with steel theme
pretec pocket pc wi fi
ambicom bt2000-cf bluetooth-made in taiwan
simpletech 1gb cf
pny 1gb sd
patriot 2gb
ocz or patriot 4gb sd(failed after 2 weeks)only on z
creative csw-5300 speakers in stereo
DigiLife DDV-1000 for video, Audio, Picture recording playable on the zaurus
Mustek DV4500-video recorder, pictures, voice record on sd for z

zaurusthemes.biz | ZaurusVideo | Zaurus Software

hughsieman

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add An Icon To A Tab And Set The App To Open
« Reply #8 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.

pengunassasin

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://
Add An Icon To A Tab And Set The App To Open
« Reply #9 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?
Cacko/Crow rom from Schwag (rom --.--) on an SL-5500 with
AmbiCom 802.11b wifi card (CF) + 1gb SanDisl SD Card (/home/) Usb-storage_1.0.0_arm and sudo_2.3_unofficial for mounting /home/ as a removable ext2 disk
ext2ifs for WinXP QTopia Desktop 2 (some version)
HancomOffice (Word, Sheet, Presenter) from Stock SHARP rom (ripped by hand!)

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Add An Icon To A Tab And Set The App To Open
« Reply #10 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.
« Last Edit: May 13, 2007, 12:24:50 pm by Jon_J »
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

hughsieman

  • Newbie
  • *
  • Posts: 28
    • View Profile
Add An Icon To A Tab And Set The App To Open
« Reply #11 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