This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Associating .kra files with Krita Appimage in Ubuntu 16.04.5

Tags: None
(comma "," separated)
User avatar
cardboardvoice
Registered Member
Posts
4
Karma
0
Hi all,

I am trying to easily open .kra files by double-clicking them. However, as Krita was installed via an appimage, Krita is not integrated into the Desktop system and I am unable to associate it as such.

I am currently using Krita 4.0.1 and my OS is Ubuntu 16.04.5.

Solution at the following links has been attempted:

https://askubuntu.com/questions/819782/ ... age/820064

Steps taken:


[*]Created krita.desktop file as specified in the link.

[*]Made .desktop file executable and moved it to usr/share/applications.

[*]Appended `image/krita=krita.desktop;` to ~/.config/mimeapps.list

Results #1:

[*]Krita does not appear in the Open With tab under a .kra file's Properties.

Corrective Steps taken:

[*]Followed instructions at following link: https://askubuntu.com/questions/902672/ ... esktop-app

[*]Moved krita.desktop file to ~/.local/share/applications

[*]Appended `image/krita=krita.desktop;` to etc/gnome/defaults.list

Results #2:

[*]Krita still does not appear in Open With tab.

Not sure what I am doing wrong. Any help is appreciated.

This question has also been posted on r/krita (https://www.reddit.com/r/krita/comments/98q2rt/how_to_associate_kra_files_with_krita_appimage_in/)
ahabgreybeard
Registered Member
Posts
1269
Karma
11
OS
I'm using Debian 9 with the MATE desktop and I do it as follows:

Right click a .kra file and then click Open With Other Application, you'll get an 'Open With' window. At the bottom, click the 'Use A Custom Command' box and a text field will open for the path to the executable (and a Browse button). You can then Browse to the appimage or type in it's location. I use the /opt folder for all 'non-installed' executables which is the traditional location for them but you can put it anywhere as long as you remember where it is.

I hope that works for you with whatever desktop environment you're using with Ubuntu.

I also make a symbolic link to the krita appimage, called kritalink, and use that as the custom command. This is so that I can have a krita launcher on the menu or on a panel launcher (which use kritalink) and I only have to make an update to kritalink when I update krita to a new version.
In the krita appimage folder, open a terminal and type: ln -s krita-whatever-version-it-is.appimage kritalink

You might want to update your krita appimage to the latest version which is 4.1.1
User avatar
cardboardvoice
Registered Member
Posts
4
Karma
0
ahabgreybeard wrote:I'm using Debian 9 with the MATE desktop and I do it as follows:

Right click a .kra file and then click Open With Other Application, you'll get an 'Open With' window. At the bottom, click the 'Use A Custom Command' box and a text field will open for the path to the executable (and a Browse button). You can then Browse to the appimage or type in it's location. I use the /opt folder for all 'non-installed' executables which is the traditional location for them but you can put it anywhere as long as you remember where it is.

I hope that works for you with whatever desktop environment you're using with Ubuntu.

I also make a symbolic link to the krita appimage, called kritalink, and use that as the custom command. This is so that I can have a krita launcher on the menu or on a panel launcher (which use kritalink) and I only have to make an update to kritalink when I update krita to a new version.
In the krita appimage folder, open a terminal and type: ln -s krita-whatever-version-it-is.appimage kritalink

You might want to update your krita appimage to the latest version which is 4.1.1


Hi ahabgreybeard,

Thanks for the suggestion. Unfortunately, there is no "Use A Custom Command" box under the Properties window in Ubuntu Xenial 16.04.5
ahabgreybeard
Registered Member
Posts
1269
Karma
11
OS
I've just realised that the first sentence of my suggestions was too compact and was confusing so I'll rewrite the first sentence with more detail:

Right click a .kra file and the options list will open up. In the options list, hover the cursor over the 'Open With' option and a second list will open up. Moving over to this second list, at the bottom, you need to click the 'Other Application' option. Then you'll get a small 'Open With' window.
(At the bottom, click the 'Use A Custom Command' box ... etc.)

I hope that works out for you.

As a matter of interest, which desktop environment/manager are you using on Ubuntu Xenial? (I think it comes as standard with GNOME nowadays but I'm not sure.)
User avatar
cardboardvoice
Registered Member
Posts
4
Karma
0
ahabgreybeard wrote:I've just realised that the first sentence of my suggestions was too compact and was confusing so I'll rewrite the first sentence with more detail:

Right click a .kra file and the options list will open up. In the options list, hover the cursor over the 'Open With' option and a second list will open up. Moving over to this second list, at the bottom, you need to click the 'Other Application' option. Then you'll get a small 'Open With' window.
(At the bottom, click the 'Use A Custom Command' box ... etc.)

I hope that works out for you.

As a matter of interest, which desktop environment/manager are you using on Ubuntu Xenial? (I think it comes as standard with GNOME nowadays but I'm not sure.)


I ran a ls /usr/bin/*session. My desktop environment/manager in Ubuntu Xenial is Gnome. Standard issue.

The second list sadly does not appear when I hover my cursor over the Open With option in Ubuntu Xenial 16.04.5 LTS.

No worries. Gonna continue debugging. Will post the answer once I managed to resolve it.

Really appreciate you taking the time to answer this. You are awesome.
User avatar
cardboardvoice
Registered Member
Posts
4
Karma
0
Wow. Not sure if this was the issue all along so please take this solution with a pinch of salt.

Solution: Simple follow the instructions given on this askUbuntu thread.

https://askubuntu.com/a/891997/862001

Warning: Do not name your krita appimage file "krita.appimage". Apparently, Ubuntu gets confused since, in my case, the directory I defined in my .desktop file to the appimage is "/home/user/Documents/krita/krita.appimage".

The fix is to simply rename your krita appimage file such that it is not the same as your parent directory name.

Now mine is "krita_4-0-1.appimage". Therefore the directory in question is now "/home/user/Documents/krita/krita_4-0-1.appimage".

How do I check to see if it is working? [For Ubuntu Xenial 16.04.5 LTS]
1. Right-click on any .kra file you have and click on "Open With Other Application...".
2. Click on "View All Applications" and a list of applications should appear.
3. Scroll and you should see Krita listed there now.
4. Double-click on Krita. Now by double-clicking any .kra files, it should automatically use your Krita appimage to open.

Hope this helps anyone who face the same issue. Cheers.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]