Installing Inkscape devel and stable on Linux side by side
Are you curious how the development version of Inkscape looks like, but don’t want to overwrite your existing Inkscape installation and don’t want to compile Inkscape trunk for every update? This article gives simple step-by-step instructions for setting up a chroot environment and installing the Inkscape development version into it using the command line.
There are several options how to install the development version of Inkscape (or any other program) in parallel with the stable version on Linux:
- you could be lucky and the development version uses a different naming structure (e.g. scribus vs. scribus-ng)
- you could use a virtual machine (e.g. VirtualBox)
- you could use a container (e.g. docker)
- you can compile Inkscape so it uses different paths for its libraries
- you could statically link the libraries (also needs compiling)
- or you can use a chroot environment, which allows you to switch to some kind of ‘separate operating system file tree’ inside your current operating system.
Inkscape’s development version, unfortunately, does not use a different package name and directory naming structure from the released version - so directly installing the trunk version from the ppa on my Linux Mint would overwrite the stable version (which I want to keep!).
I don’t know anything about containers. I did not want to compile myself, but use the version offered in the ppa for Ubuntu at launchpad. I also didn’t want to use a virtual machine, as that would cost even more disk space than the chroot and be slower.
So I decided to use a chroot environment, which is the best compromise for me.
This tutorial was tested on Linux Mint 17.2. The chroot environment takes up about 650 MB of space, and needs to download several hundred MB of data, so only start this when you have the time and bandwidth available.
Creation and first start
-
Open a terminal and allow other users to access your display:
xhost +
-
Become root on the terminal:
sudo bash
-
Create a directory for the chroot environment (on a partition which is not mounted with noexec or nodev flags. You can just create it in your home directory, if this is on the same partition as the rest of your operating system):
mkdir ./inkscape-devel-chroot
-
Install debootstrap if not yet installed, for Ubuntu/Linux Mint:
apt-get install debootstrap
-
Enter the new directory you created:
cd ./inkscape-devel-chroot
-
Create the new environment (in this case, for Ubuntu trusty (14.04)):
debootstrap trusty .
-
Wait…
-
Become root of the nested system:
chroot .
-
Add missing package sources to the sources list in the chroot environment:
echo "deb http://ppa.launchpad.net/inkscape.dev/trunk/ubuntu trusty main" >> /etc/apt/sources.list
-
Update the package index:
apt-get update
-
Install Inkscape and some language packages, so you have more than just English available for Inkscape (here for English and German):
apt-get install inkscape-trunk language-pack-en language-pack-de
-
Answer the questions with
y
-
Generate the locales, so you can use the languages (for English and German):
locale-gen en_US.UTF-8; locale-gen de_DE.UTF-8
-
Mount the /proc file system, ignore the warning:
mount /proc
-
(optional) Create another user and become that user inside the chroot environment:
adduser <name>
(enter password, answer questions)su <name>
-
Start Inkscape:
inkscape
-
When finished, leave chroot with:
exit
(do this twice if you changed to normal user in step 15)
Note:
The window decorations and style will most probably look very ugly in your chroot, but the trunk Inkscape will work just normally.
Everytime you want to use it
-
Open a terminal and allow other users to access your display:
xhost +
-
Become root on the terminal:
sudo bash
-
Enter the directory you created for this:
cd <path_to_directory>/inkscape-devel-chroot
-
Become root of the nested system:
chroot .
-
Mount the /proc file system:
mount /proc
-
Update Inkscape to most recent development version in the ppa (also updates chroot):
apt-get update; apt-get upgrade
-
(optional) Become a normal user inside the chroot environment (if you created one in 15. above):
su <name>
-
Start Inkscape:
inkscape
-
When finished, leave chroot with:
exit
(do this twice if you changed to normal user in step 6)
Enjoy the development version with all its cool new features!
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 License. You may share and adapt the contents, as long as you publish the result under the same license and give appropriate credit.
If you like to use Inkscape and want to support program development, consider to become an active member of the Inkscape community or to make a donation. Your effort will help make Inkscape even more awesome!
2 Comments ⚓
Jelle ⚓
Thu 24 March 2016installing-inkscape-devel-and-stable-on-linux-side-by-side
Moini,
Thanks a lot for this insight and clear instructions for those not so well versed in the command line. I will test it shortly and wonder if it would be an idea to create two script files that take all the steps for increased ease.
Jelle
Moini ⚓
Thu 24 March 2016You’re welcome :) I’m happy that someone actually reads this. Of course it would be a good idea. Due to time constraints, I can’t do this right now, but I will keep the suggestion for later.
Thanks for your comment, Jelle!