Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In unity, we can drag files on application's button in the launcher to open that file with that application - however, looks like its hard to change default application.

I use Komodo as editor, and my goal is to open php files dragging on the Komodo button on the launcher.

The problem is that with gtk3 is a bit tricky to add custom application to open mimetypes..

I've created the button from the Main Menu, then i user mimeopen -d file.php to set komodo as default; Now, if i double-click on a php file, it get open with komodo - but I cant drag php files on komodo button on launcher.

share|improve this question

All you have to do is editing the .desktop file of your application launcher. Browse for Komodo in /usr/share/applications/ and open it with your favourite text editor running as root (e.g. type sudo gedit on the terminal).

What you have to focus on is the MimeType= part (add it if it doesn't exist): add application/x-php to the key, wich will let you drag and drop PHP files to Komodo, and then save the .desktop file.

  • For instance, your MimeType key should look like this: MimeType=text/plain;application/x-php;

More information about Desktop Entry Files syntax here. A full list of Mime Types and their corresponding suffixes here.

share|improve this answer
For DnD onto a launcher icon you must have a MimeType= line in the .desktop that lists the type(s) you wish to be able to DnD – doug Apr 11 '12 at 1:01
You are right. I've edited the post ;) – Alfredo Hernández Apr 13 '12 at 1:10
First link is dead/403, and I can't find that info in the current set of pages. – Christoph Jan 28 '14 at 17:56
@Christoph Updated the link to the current verion on GNOME's web. – Alfredo Hernández Jan 29 '14 at 1:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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