maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   Create *.desktop entry for a file (https://talk.maemo.org/showthread.php?t=83294)

cynik606 2012-03-27 22:43

Create *.desktop entry for a file
 
Hi All,
Can somebody help me with create luncher icon for a file?
I want to get a shortcut on the luncher screen which will open a file from MyDocs.
I now that it must be created *.desktop file in /usr/share/applications but what should contain?

Code:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=???
Terminal=false
Name=MyFile
Exec=???
Icon=path_to_png_file
X-Window-Icon=???
X-HildonDesk-ShowInToolbar=true ???
X-Osso-Type=application/x-executable ????


K9999 2012-03-28 01:16

Re: Create *.desktop entry for a file
 
I don't know about N9 if it has filebox cuz this is how I do it on N900

PHP Code:

[Desktop Entry]
Encoding=UTF-8
Version
=0.13
Type
=Application
Name
=MyFile
Exec
=filebox '/home/user/.......path to file'
Icon=myicon 


cynik606 2012-03-28 05:55

Re: Create *.desktop entry for a file
 
And if I will say that the file is html file it will change something?

K9999 2012-03-28 06:26

Re: Create *.desktop entry for a file
 
that code I mentioned earlier is to open a certain folder/file. but if you wanna open an html link or a picture then it is different. you need to call the browser. you're aiming to open an html file?

=====

if that's the case, let's say you wanna make a google link shortcut. you'll have to change the Exec line too look like this:
PHP Code:

Exec=/usr/bin/browser_dbuscmd.sh load_url http://www.google.com 

This is the case with N900

cynik606 2012-03-28 12:52

Re: Create *.desktop entry for a file
 
OK, I have to call Internet Browser but it must open my (local) HTML file located on MyDocs. How to inform the path to a file?

bocephus 2012-03-28 12:58

Re: Create *.desktop entry for a file
 
As usual, check the Wiki before asking a question. It has a good run-down on .desktop files and the different applicable entries.

cynik606 2012-03-28 15:32

Re: Create *.desktop entry for a file
 
Quote:

Originally Posted by bocephus (Post 1185095)
As usual, check the Wiki before asking a question. It has a good run-down on .desktop files and the different applicable entries.

I didn't find this information, that's why I'm asking here...

cddiede 2012-03-28 15:59

Re: Create *.desktop entry for a file
 
Quote:

Originally Posted by cynik606 (Post 1185094)
OK, I have to call Internet Browser but it must open my (local) HTML file located on MyDocs. How to inform the path to a file?

Exec=/usr/bin/browser_dbuscmd.sh load_url file:///home/user/MyDocs/<html file name>

erendorn 2012-03-28 16:42

Re: Create *.desktop entry for a file
 
have you tried typing the url of your file ( file:///home/user/MyDocs/<html file name> ) in the browser and then "add to home" like any website?

catbus 2012-03-28 18:07

Re: Create *.desktop entry for a file
 
Hi

Sorry, I borrow this topic... Can someone tell how to make launcher for multible instances of application... like terminal?

I'd like to make different laucher for terminal with top but if i have terminal allready running that does not work...

Thank You


All times are GMT. The time now is 07:21.

vBulletin® Version 3.8.8