As I’m a lazy guy and I often switch between Krita 4 and Krita 5, today I finally made a small python script to execute Krita
Script works under Linux and for appimages only
It might be easy to update it for Windows
The script search for the last available appimage (krita 4 or krita 5 according to command line option)
If you have like me 4 or 5 Krita 5 appimage because you’re updating the lasted appimage practically every day, script will always execute the most recent appimage:
- No need to check anymore which one is the right one
- Easy command line: always the same command without having to modify anything; especially useful with Krita 5 for which git commit number is included in the appimage file name
When switching between Krita 4/Krita 5, there’s a risk to loose resources or to put a mess in configurations.
The interesting thing with the script, it’s if a backup file exists the will script restore it before starting Krita, and will create a new backup when Krita is closed.
Note: in this case it means that both version are completely isolated, change made on a version are not available to the other one
There’s some command line options:
||Execute Krita 4|
||Execute Krita 5|
||Do not restore backup before execution, do not create backup after execution|
||Reset configuration, do not create backup after execution|
-k5options are mutually exclusive
-roptions are mutually exclusive
For a small script like this, path are hardcoded
Also, it’s possible to define different option for different appimages.
So before using it, please read comments written in script and update path according to how your directories tree is organized.
I consider that people using Linux command line and testing Krita 4/Krita 5 somewhere are advanced users and might be able to do it without difficulties
Just be careful on first execution, if configured path are not valid… just do a manual backup of your files before
Here, it’s just a gist link to script:
Yes, I’m more lazy than lazy, it might explain why I didn’t wrote this script before
I’ve just added in my
.bashrc some aliases:
# Add scripts to PATH export PATH=~/Applications/Systeme/Scripts:$PATH alias k4="klauncher.py -k4" alias k5="klauncher.py -k5"
Now, in a console, I just type
k5 to launch Krita
And use of alias allows to pass additional arguments,
k4 -r for example
Note: I’ve also applied
chmod +xto my python script