Thread: Desktop Entry
View Single Post
Posts: 805 | Thanked: 1,605 times | Joined on Feb 2010 @ Gdynia, Poland
#8
Steps to debug:
0. install leafpad if you don't have it, it's great text editor
1. open terminal
2. type "sudo gainroot"
3. type "leafpad /opt/openwebsite.sh"
4. write contents (or paste from here):
Code:
#!/bin/sh
`/usr/bin/browser --url=$1 &`
5. Exit and save
6. type "chmod a+x /opt/openwebsite.sh"
7. close terminal
8. open new terminal (so that you are now user again, not root)
9. check if it works so far, type:
Code:
/opt/openwebsite.sh "http://www.google.com
It should open website in new browser window. If it doesn't you either don't have execution rights of /opt/openwebsite.sh (note that any file in /home/user/MyDocs or /media/mmc1 cannot have execution rights as these partitions are FAT-type) or have a typo in your script
10. If it worked correctly, close terminal again
11. open new terminal
12. type "sudo gainroot" to become root
13. type "leafpad /usr/share/applications/hildon/test.desktop"
14. type or copy and paste the contents of the file:
Code:
[Desktop Entry]
Version=1.0
Name=cimb
Type=Application
Comment=Shortcut to some website
Exec=/opt/openwebsite.sh "http://www.google.com"
Icon=cimb
15. Exit and save
16. Close terminal
17. Open applications menu, find "Test app" icon.
18. Tap it, check if it works. If it doesn't - try replacing in test.desktop file
Code:
/opt/openwebsite.sh "http://www.google.com"
to
Code:
/opt/openwebsite.sh\ "http://www.google.com"
(so basically adding "\" in front of space) and check if it works.
19. If it worked, play with test.desktop file and modify it to suit your needs.

It works on my phone If it does not on yours, tell me how far did you go untill something failed
 

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