Ubuntu – Globally associate file type with certain application

14.04file associationfile type

I don't need "Ubuntu-tweak" and i know about GUI method of associating certain files with certain applications using right click and "Open with". I am having problem setting filetype association globally in a file:

/usr/share/gnome/applications/defaults.list

E.g.:

image/x-psd=gimp.desktop

If i want to open all PSD's in a photoshop, i have created photoshop.desktop file and placed it under /usr/share/applications. Now when i press Super (windows) key and type Photoshop i see that icon, but i can't:

  1. drag'n'drop that on my desktop. How can i do that?
  2. if i change image/x-psd=gimp.desktop to image/x-psd=photoshop.desktop it still opens in a gimp. Why?

Thanks in advance.

Best Answer

Solved my issue myself.

File /etc/gnome/defaults.list are overriden by ~/.local/share/applications/mimeapps.list, so all file association goes in to mimeapps.list file:

[Default Applications]
image/vnd.adobe.photoshop=wine-extension-8bs.desktop

In this example i've set to open .psd in a Photoshop through Wine. If i go in to /etc/gnome/defaults.list and add:

image/vnd.adobe.photoshop=gimp.desktop

It won't open .psd in a gimp, because it got overriden by mimeapps.list. Spent few hours to figure that out lol.

Related Question