16

I'm using ubuntu 16.04 LTS.

I've downloaded the latest krita appimage (http://files.kde.org/krita/3/linux/krita-3.0-x86_64.appimage)

I want to be able to open Krita files (with the extension ".kra", mime-type "application/x-krita") with this appimage, by double-clicking the file icon.

How do I do this?

I have tried moving the appimage to /usr/share/applications, I've tried adding a desktop file /usr/share/applications/krita.desktop with the following contents:

[Desktop Entry]
Name=Krita
Exec=/usr/share/applications/krita-3.0-x86_64.appimage %F
Type=Application
MimeType=application/x-krita

I've made sure both files have the same permissions as other files in the same directory.

Krita does not appear under "Open With Other Application…"

Peter Chaplin
  • 263
  • 2
  • 6

2 Answers2

12

Got this working on Mint 18.1 Cinnamon.

The .appimage of Krita 3.1.2 didn't add any file associations, so I created a file named krita.desktop, and put the following inside:

[Desktop Entry]
Encoding=UTF-8
Name=Krita
Comment=Krita, An open source painting and drawing application.
Exec=[path to .appimage] %F
Type=Application
Icon=[path to icon]
Categories=Graphics; 
MimeType=image/krita;

I made that file executable, then copied it to /usr/share/applications.

Next I opened ~/.config/mimeapps.list, and appended:

image/krita=krita.desktop;

under the section [Added Associations]

Finally, I right-clicked a .kra file and chose Krita as the default app under Open With.

Hope that helps someone out.

Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
x53
  • 136
  • 1
  • 3
  • 2
    I played around with this a little, and ended up with both mime-types ("image/krita" and "application/x-krita") in both files (separate by the ; in krita.desktop, on separate lines in mimeapps.list), but it's working for me now, thanks. – Peter Chaplin Jun 09 '17 at 14:52
  • System-wide: `.desktop` on `/usr/share/applications/` ← `/usr/share/applications/defaults.list`. User-wide: `~/.local/share/applications/` ← `~/.config/mimeapps.list`. Also, could [register with `xdg-mime`](https://askubuntu.com/a/1023143/349837) – Pablo Bianchi Oct 04 '22 at 19:52
3

The next version of the Krita AppImage will come with desktop integration which should do this for you automatically.

You can try an alpha build: https://krita.org/en/item/krita-3-0-1-alpha-builds/

probono
  • 1,119
  • 7
  • 6