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.
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): addapplication/x-php
to the key, wich will let you drag and drop PHP files to Komodo, and then save the.desktop
file.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.