4

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.

1 Answer 1

2

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.

4
  • 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, 2012 at 1:01
  • You are right. I've edited the post ;) Apr 13, 2012 at 1:10
  • First link is dead/403, and I can't find that info in the current set of pages.
    – Christoph
    Jan 28, 2014 at 17:56
  • 1
    @Christoph Updated the link to the current verion on GNOME's web. Jan 29, 2014 at 1:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .