Guide to testing latest Krita nightlies on linux using Flatpak

I recently migrated to a different linux distribution which is not rolling release. Generally one of the first thing I do after migrating to different distribution is to build Krita from source. I have a bash script which does all the build for me. This time I became lazy, and I didn’t want to deal with the resource folder getting messed up by the 5.0 version. @halla gave me some environment variables to use on IRC so that the resource folder is kept separate from the resource folder used by stable Krita version from repo, but I saved it for another day.

I read that flatpak runs applications inside sandboxes and the config files and resource folder are kept separate. I saw that KDE binary factory builds flatpak version of master every night along with the appimage. The reason I didn’t choose appimage because it uses same resource folder (I think) and i wanted to try flatpak.

Flatpak stores application data in ~/.var and install data in ~/.local/share/flatpak so the config and resource folder of regular stable Krita will be safe from any problems from unstable Krita 5.0. Although flatpak requires extra runtime etc (close to 1.5 gb space) but if you build from git, the folder where you clone Krita from git will also be close to 1 gb. This also saves my computer a bit from constant cpu usage for building.

So if anyone else wants to try this route of testing here is what I did

  • Install flatpak from your distributions repository. For me, it was pre-installed with the distribution.

  • Add flatpak remote repo from where we will pull nightly builds. This is documented in the KDE flatpak guidelines.

flatpak --user remote-add --if-not-exists flathub
flatpak --user remote-add --if-not-exists kdeapps --from

Here we are adding two remotes one kdeapps and other is flathub kde nightlies are stored in kdeapps and the runtime etc are stored in flathub. The guideline page states this

We are building release versions of most KDE applications and distributing them on flathub, We are also building nightlies of most KDE applications and distributing them at This has the master version of the applications, so expect some unstable development quirks; on the bright side, if you find one, you get to tell the developers so they can fix it!

NOTE: I am adding this remote using the --user option which won;t need sudo privileges and won’t mess with the system wide flatpak things.

You can also add these repos via GUI using KDE’s software centre “Discover” app

  • Install KDE platform runtime
flatpak --user install org.kde.Platform/x86_64/5.12
  • Install Krita nightly
flatpak --user install org.kde.krita-nightly

This will install Krita nightly which is built every night from master for us.

Now to test things and run Krita

flatpak run org.kde.krita-nightly

I am sure you can have a desktop file to run this, I haven’t looked into it yet.
EDIT: The flatpak installs the desktop file for you no need to do anything. Just search for Kritanightly in the launcher.

To update Krita

flatpak --user update org.kde.krita-nightly

Running krita from flatpak will create a folder ~/.var which will have the config and resource folder in it and your actual resource folder will be safe when you test 5.0.

Hope this is helpful for some people.

I will update the instruction about making desktop file etc and if there are any errors or better ways please let me know

1 Like