I wrote a small script to make the usage of Krita source builds more comfortable for me on Ubuntu. It might be interesting for others as well, so I decided to share it. Along with the script comes a menu entry for it with file associations for all file types that Krita supports (kra, ora, png...) and a jump list to update, install and clean the build. I also added a metapackage to my PPA that depends on all the build-dependencies.

If you are new to building Krita or building in general, I strongly recommend to follow David Revoy's "Building Krita for Cats" guide at least once. I wouldn't recommend to install the dependencies manually though because you will easily lose track of them. I think the best choice is to install my script and the metapackage first and skip the "Get the libraries and dependencies" part of David's guide (an apt-get build-dep etc. will mark the packages as manually installed, hence you can't do a simple autoremove, also do the calligra and krita packages pull stuff that isn't needed for a pure Krita-only build). That way you can easily remove the packages later if you need space on your disk or don't want to build Krita anymore (The dependencies are around 410 MB on a fresh Ubuntu 15.04 and the download, build and installation needs around 4 GB depending on your distribution).

Krita 2.9

This line adds the PPA and installs the script and build-dependencies for Krita 2.9:

sudo add-apt-repository ppa:mmolch && sudo apt update && sudo apt -y install mmolch-kritasrc mmolch-kritasrc-deps

Krita 3 (requires Ubuntu 15.10 or later)

This line adds the PPA and installs the script and build-dependencies for Krita 3:

sudo add-apt-repository ppa:mmolch && sudo apt update && sudo apt -y install mmolch-krita3src mmolch-krita3src-deps


Of course you can also get the packages from https://launchpad.net/~mmolch/+archive/ubuntu/ppa/+packages and install them manually if you don't want to add the PPA. If you additionally want some thumbnails in nautilus or nemo, you can also install the mmolch-thumbnailers package.

By default, the script uses ~/krita3 (~/kde4 for Krita 2) as the directory to download, build and install Krita into. If you have or want to have it somewhere else or if you want to use a different branch than "master" ("calligra/2.9" for Krita 2), please run the script one time without any arguments to create the configuration file ~/.config/krita3src.conf (~/.config/kritasrc.conf for Krita 2). Then simply adjust the KRITASRC_DIR and BRANCH variables in there to your liking.

If you are OK with the settings, you can either run it from your startmenu or use one of the command line options (or the jump list entries). It will then download, build, install and start Krita depending on your command.

Here is the script's usage info (the script for Krita 3 is "krita3src"):

moritz@master:~$ kritasrc
Usage: kritasrc [ clean | update | install | run | debug ]
  clean:   Removes the build and install directories
  update:  Pulls the newest stuff from git and installs it
  install: Does a make install. Useful if you make changes to the source
  run:     Runs Krita. You can append arguments to pass to Krita
  debug:   Runs Krita in gdb. You can append arguments to pass to Krita

The source can be found here: http://bazaar.launchpad.net/~mmolch/+junk/mmolch-kritasrc/files/head:/src/

As always, if you run into any problems, please don't hesitate to leave a comment. Also, if you want to use Krita to create comics or manga, you might be interested in my Compicpage creator for Krita.

Screenshots

kritasrc_icon jumplist kritasrc_kra


5 Responses to “Comfortably use Krita source builds on Ubuntu 14.04+”

  1. Saverio Brancaccio
    May 2nd, 2015 at 16:22
    1

    Hi Moritz, thanks a lot for your script! It really helped me to have latest Krita on my Linux Mint 17.1.

  2. Moritz
    May 2nd, 2015 at 18:16
    2

    Great that it helped you! Please don’t forget to report all bugs you run into when using source builds to https://bugs.kde.org/ so we are aware of them as soon as possible.

  3. bootchk
    October 22nd, 2015 at 18:22
    3

    Yes, removing my existing installation let your script run successfully.

  4. bootchk
    October 22nd, 2015 at 18:24
    4

    Oops… this is the error I got, before I removed the existing installation of Krita, which I had used Ubuntu Software Center to install.

    Preparing to unpack …/mmolch-kritasrc_1.0-26~ubuntu15.04.1_all.deb …
    Unpacking mmolch-kritasrc (1.0-26~ubuntu15.04.1) …
    dpkg: error processing archive /var/cache/apt/archives/mmolch-kritasrc_1.0-26~ubuntu15.04.1_all.deb (–unpack):
    trying to overwrite ‘/usr/share/icons/hicolor/256×256/apps/calligrakrita.png’, which is also in package krita-data 1:2.9.2-0ubuntu2
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Processing triggers for hicolor-icon-theme (0.14-0ubuntu1) …
    Errors were encountered while processing:
    /var/cache/apt/archives/mmolch-kritasrc_1.0-26~ubuntu15.04.1_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  5. Moritz
    March 8th, 2016 at 03:56
    5

    Thanks for the feedback. I added krita-data as a conflict, so this shouldn’t occur anymore.

Leave a Comment

I respect your privacy
I don't run any trackers on this site.

Please use the share-buttons or leave comments so I know what might be worth writing about.

Thank you.
Contact