I am looking for the specs necessary to build a .desktop file to be used in Ubuntu 11.10.

Many terminal applications or even GUI application do not show on Open with other application tab anymore and I want to create a .desktop file that makes that application be listed on the list again.

I know that you can create a .desktop file and place it in ~/.local/share/applications but I do not know what all those settings mean.

Is there a guide that allows me to customize my .desktop files to my needs?

link|improve this question

1  
if you just want to solve your association problems, you may use mimeopen -d /path/to/file to set a custom executable. See askubuntu.com/q/82182/15110 – cweiske Nov 23 '11 at 22:30
feedback

1 Answer

up vote 13 down vote accepted

An example of a .desktop file to select vim terminal editor for your files in the Open with other application dialog is

[Desktop Entry]
Encoding=UTF-8
Name=Vim Text Editor (Console)
Comment=Edit text files in a console using Vim
Exec=vim %u
Terminal=true
Type=Application
Icon=/usr/share/pixmaps/vim.svg
Categories=Application;Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;
NoDisplay=true

Save this as ~/.local/share/applications/vim.desktop and the application will automaticly show on Open with other application to be selected as default application.

The options for the .desktop files are many but its important to know what they mean.

nautilus-actions.org supplies a very good guide and explanations for creating your .desktop files and all the possible parameters that you can use on them so if you have any doubts about creating a special .desktop file you can visit the site and look at the examples there.

link|improve this answer
+1. This is what I was looking for Bruno. Thanks. – Luis Alvarado Nov 30 '11 at 22:30
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.