Kubuntu Linux 20.04 for a digital painting workstation: Reasons and Install guide.

Published on


Kubuntu 20.04 running on my desk with my assistant (who refused to pose this time, that's the best shot I had).

Intro

Summer: the death of Scribus stable and Kubuntu 19.10:

Wooo, summer... Hot weather and a quick computer reinstall right in the middle of the production of the books because my previous Kubuntu 19.10 was obsolete and reached end of life in July. Bad surprise for me this time in the process: no way to install Scribus 1.4.8 stable anymore and all my books are done with that. The package was savagely forced replaced by 1.5.5~Development and no way to reinstall the previous version flagged as stable by the Scribus team.

So, I'll have to move the book project to this development version (it will take hours of adaptation because the text-engine changed between 1.4x and 1.5x). If you are on Windows, Mac, 18.04 or CentOS no worry for you: the package still exists there. Sad to see that no Appimage, Flatpack or Snap are around to rescue this issue... But let's close for now this parenthesis with a taste of bitterness. I'll cope with that, I saw uglier situations of upgrade in my life and this Kubuntu 20.04 is −about all other aspect− a splendid distribution so far.

Continuing with Kubuntu

As you might already know, I produce everything I do since more than 10 years under a GNU/Linux systems (webcomic, website, book, freelance, videos, etc...). Along the way, I tried so many distros: Linux Mint GNOME2/Mate/Cinnamon, [X-L-K]Ubuntu GNOME2/Unity/GNOME3, Manjaro XFCE, Arch Linux with Awesome, Fedora, Open Suse, well, it would be quicker maybe if I write in this list what I haven't tried.... But from 2018 to now, I'm surprisingly sticking to the same distro: Kubuntu. Third version I have and so far, I'm happy with it. Even a miracle did happen in newer version: Alt key is no longer used by Plasma and this one moved to Super(Windows key). Thank you the KDE devs for that!

What is this article?

To compile the notes here, I used my previous guides as a template and made a full reinstall. If you need to simply upgrade from my previous guide with 19.10, just use this method. You'll find on this article two parts:

  • 1. Reasons: or why I advice this for a digital painting workstation.
  • 2. Install: or tips, command-lines and methods to clone my config.

Why? This article might help newcomers or even advanced user facing same problematic as I do when choosing an operating system. It will also answer the question "What distro do you use?", a classic I keep receiving all the time (and finally less since I produce this guide).

Part 1. Reasons:

My main big reasons to use a GNU/Linux open-source system evolved a bit from the origins:

  • Independence (no one have a control on what I watch, what I use and how I use it).
  • Technology (performance, scripting, standards).
  • Transparency (open-source: you can investigate any parts).
  • Control of my data and privacy.

But almost all distros provide that so here is a specific list of what I prefer on Kubuntu 20.04 compared to other existing solutions:

Graphic Tablet GUI

Kubuntu 20.04 ships out of the box with a first class and fully featured tablet configuration panel, including the possibility to setup all buttons (eg. modifier on stylus button as "Ctrl"), add profiles and switch between them, mapping to custom area and support of multi monitors switch and calibration for pen-display!... That's something that no other desktop environment has to the date (the closer being GNOME but with many features missing in comparison). On the past, I ran custom bash script for years before having the possibility to setup my tablet this way. By the way, if you wonder what type of tablet I'm using, it's a Intuos4 XL (using only 3/4 of the total active surface) with a recent stylus (from Cintiq 13HD era) and with a Huion WH1409 overlay sheet and a DIY wood deck for my keyboard on the non-used upper part because of the mapping (see photo on the header of the article). For the why, read this article because it is a bit too long for here.


Graphic Tablet panel in the System Settings

Friendly with images format

Dolphin, the file explorer of Kubuntu can generate very large thumbnails for your artworks as you can see under. It supports a lot of image format: Krita source files (kra), Open Raster (ora), Photoshop files (psd) and many other classics (png, jpg, etc...). This is very comfortable to work on a project with many illustrations where very often the filename is not relevant and where your decision of editing will be made according to the content of the thumbnails.


Support of kra, psd, ora and tiff thumbnails

This compatibility will also affect the image viewer and you'll be able to display psd and kra files instantly like for any other usual image format (jpg, png, tiff, tga). This ability to quick preview a heavy layered source file really helps in production.


Nomacs image viewer displaying a Krita (kra) layered high resolution comic page instantly.

Dolphin is also able to show previews for your 3D Blender files, your audio and videos medias, OpenEXR and SVG vector format. It's really multimedia-ready.


Dolphin supports also previews blend, mp4, mp3, exr and svg.

If you work with incremental saves or many versions of the same image project, having the ability to read larger thumbnail will be help you in your editing choices. You'll also have a better overview on your projects while working on them. I know it sounds a bit obvious; but not for everyone because the mainstream popular file explorer on GNU/Linux —Nautilus— limited by design all the thumbnails to 128px pixels maximum and keeps adding a confusing white rounded border around the picture that alter the representation of pictures.

Friendly with colors

On Kubuntu you can change the color of the theme in the settings. This possibility allows the quick setup of a neutral gray UI, an important feature for working with colors balance. Many themes from other distros force color brand on users; including a flashy main color for selection in relation with the logo. This research of an identity via a strong color damage the work of those who works with colors. And making theme with slightly colored gray (cold or warm) is worst.


Colors panel in the System Settings

Another great feature, are custom colored directories and Git integration in the file explorer; for a person like me with a memory driven for color, shapes and position this is precious to organize my files. I can also see that way what files changed recently and possibility to pull, push, add and commit via the right-click menu. In my opinion, Kubuntu opens Git contribution to non-developer and that's something precious for teamwork.


Colors folders and emblems for Git integration

Other

  • A configurable "Open With" menu on right-click to optionally edit your files with other software and setup the position of how they appear on the list. So you can set you kra files to open on double-click with a viewer and with a right click edit it with Krita. This feature sounds obvious, but not all file explorer have a good ergonomy for managing file association.
  • Support customization of the user interface. Almost all elements of the user interface (launcher, icons, toolbar) can be modified to mimic any popular desktop environment ergonomy or create your own. Here I prefer a classic bar with a menu, windows lists and system tray; black and on top.
  • Support multi-monitors workflow with possbilities as listing windows per monitors, adding menus or widget where you want. It's not just a main monitor and a slave monitor: you'll have two monitors. The tiling in quarter by default is also precious for managing windows on large monitor (eg. QuadHD monitors).
  • Perfect system integration for Krita and this is convenient if it is your main tool (Kubuntu is built by the same community: KDE): it improves performances, theming, icons and drag&drop of files.
  • Compatible with many devices and has a large knowledge base online thanks Ubuntu community: it works fine for my hardware: a Dell Vostro 430 PC tower I bought 10 years ago with various upgrade: a 8 x Intel Core i7 870 @ 2.93Hz, 16GB RAM and a Nvidia GeForce GTX 650 Ti (requiring Nvidia proprietary drivers, but really easy to install).

Issues and flaws:

  • No graphical user interface for color management of your monitors, printers, etc... Well, there is sort of two. First, a project named colord-kde exists for that but has bugs. You can install it with sudo apt install gnome-color-manager libcolord-gtk1 argyll colord-kde and you'll get a GUI to load ICC to monitors. But you'll can't calibrate, a message "You need Gnome Color Management installed in order to calibrate devices" will tell you it's impossible. Here is the colord-kde bug report started during the beta period of 20.04. On a second time, you have also DisplayCal that works for creating ICC profile but often fail at the moment of applying them at startup. You'll need to extract the ICC produced from the ZIP, then manually load them. So, I'll write a reliable workaround in the second part about it involving a minimal set of command-line while keeping flexibility.
  • Thumbnails and image viewer are not color managed (eg. don't expect displaying correctly a PNG using a linear profile, and prepare for random colors for CMYK tiff/jpg thumbnails).

Part 2. Install:

Ok, now let's start with how to get everything working like that.

Quick usual disclaimer: this article gives no warranty of success. Do all of this at your own risk, I take no responsibilities if you damage your hardware (no reason it should happens, but I prefer to write that and not be attacked later in this legal world). Also: I tested all of that on my workstation while reinstalling it, I'm not owning all hardware existing. What might work smoothly for me, might be a laggy hell on your PC. I also tried to detail all the steps to be friendly with newcomers (Mac and Windows users).

Download the ISO:

You'll find a free copy of Kubuntu on their website, menu 'Download'. Then you need write the ISO to a USB flash drive. If you are not familiar with how to write an ISO to a USB flash drive, I recommend following the information down the download page of the Ubuntu website with more specific and detailed information for user coming from Windows, MacOS or other operating systems. Here I'm doing from my previous GNU/Linux system, using gnome-disk-utility that has a convenient shortcut "Write image to disk" appearing after right-clicking any ISO file on file explorer. Then I select my USB drive in a list and done.

Pre-installation adviced:

Before booting your computer to read the content of the flash drive USB (often a F9 or F12 key on startup to access a "Boot service menu" that will list the USB medias), I'll recommend to prepare a bit the situation. First: do a full backup of any important data. And in second time, prepare your partition layout in advance. When it's done, while installing Kubuntu pick the 'Normal Installation' (not the minimal) and at the 'Disk Setup' part of the process use 'Manual' to enter the partition editor. Then you can tell where to install Kubuntu exactly. I propose here a classic of three partitions:

  1. For the Operating System: 25GB (minimum, I use 100GB of a spare SSD disk) → formatted as ext4 → root '/'.
  2. An area for memory swap: 8GB (I use 20GB of same SSD disk than above) → formatted as swap
  3. Your user profile and documents: The last bigger part of your disk (I use a 500GB dedicated SSD disk) → formatted as ext4 → '/home'.

Software & Updates, Additional Drivers and upgrade:

Once installed, open the main menu of Plasma and launch 'Discover' (start typing "Disco" in the search field). Discover is the app store of Kubuntu. You'll find at the bottom a "Settings" button; click on it and you'll see on top-right an access to 'Software Sources'. Click it and enter your password. When the dialog 'Software Sources' appears, on the first tab 'Ubuntu Software', select the best mirror (Download from > Other > Select Best Server). You'll save a ton of time for the updates if you do that after the first launch.

Then go to the tab 'Additional Drivers' and install the proprietary proposed driver (especially if it makes your hardware more stable and performs better, a common situation on GNU/Linux for NVidia drivers unfortunately.)

When all of that is done, close this dialog and in Discover press the colored "Update" button to list the updates. You can proceed to do all the updates (button on top of this page 'Update All' to start the process). Don't worry if it is a lot: a fresh system installed always have a lot of update to do (eg. I had 244 update to do here).


Discover is great to review each update and read what changed package per package

As an alternative, you can do the same update with this two lines inside "Konsole" the terminal app of Kubuntu. This line will ask for your password as the change affect your operating system. Just note that Ctrl+C works to copy this lines but you'll need to Ctrl+Shift+V to paste it inside Konsole, because Ctrl+V is reserved historically to other terminal based features.

sudo apt update
sudo apt upgrade

Settings

When all the update are done and your hardware works (I advice a little reboot to check if everything is alright) then it's time for settings. Here is the list of settings I recommend to alter Kubuntu slightly in order to adapt it to visual content creation:

Restore a functional Alt key

KDE Plasma team recently fixed this one; but I'm not sure it is part of Plasma 5.18 that comes with Kubuntu 20.04§. So in case: the Alt modifier Key on your keyboard might still be used to moves windows. This important Alt modifier key is used in software like Krita, Inkscape, Scribus and Blender. You can fortunately change this behavior, and transfer this feature to the Super key (the Windows key, new default now).
In the settings: Windows Management > Windows behavior > Windows Action: Switch the Modifier 'Alt key' to 'Meta key'.

Deactivate the hot corner

Hot corners are probably cool but doesn't work very well with a tablet. I tend to forget about them, then I quickly remember as I take back a mouse. Kubuntu comes with a predefined hot corner to show all windows, it can be deactivated this way:
In the settings: Desktop Behavior > Screen Edges > deactivate the top left corner "present all windows"

Don't darken colors of parent windows

Darkening the parent windows often breaks usability of visual apps (eg. a color picker windows that can't access color of the parent).
In the settings: Desktop effect > Dialog Parent (darken the parent windows) unchecked

Don't drag from any part of the GUI

This feature allows one to drag the window from any pixels inside the GUI. With a stylus in hand, it leads to many unintentional drag as soon as someone tries to adjust a slider a bit quickly.
In the settings: Application Style > (check the little configuration icon near to 'Breeze') > in the 'Configure Breeze' panel turn "Windows drag Mode" to title-bar only".

Start system with an empty session

By default, Kubuntu will restore at startup all the app that were still opened at shutdown. If you prefer starting fresh with an empty desktop:
In the settings: Startup and Shutdown > Login Screen (SDDM) > choose "Start with empty session" or the computer will launch all programs open when you pressed the shutdown button.

Fix non-persistent numlock key

For French AZERTY keyboard, numbers are more accessible via the numpad. But without a persistent numlock key you'll have to press numlock every start, unless: In the settings: Hardware > Input device > Numlock on startup "Turn on"

Neutralize the colored gray on theme

Having blueish gray, or warm gray on the user interface can mess with your perception of color balance and then affect your work. Breeze, the default theme comes with colored grays... In the settings: Colors > Mouse hover "Breeze" to select the tiny pen 'edit' button.
You can then edit the colors, the main issue is with "Focus decoration" > Remove the saturation of the color to make it neutral. And switch all title bar (active/inactive) to a neutral gray: I use here #3c3c3c.

Thinner Windows style

A useful tips to save room on monitors for more vertical space and so more brush presets, palette or options that matters while painting:

In the settings: Application style > Windows decoration > Windows Border size 'No borders':

  • Put your mouse over the Breeze thumbnail to reveal the hidden Edit button (a little pencil icon, I know: this interface is not a good design)
  • Then in the panel: General > Button size > Small
  • Also, remove "Draw a circle around close button" exept if you like it.
  • Go back to the Settings main menu, then: Fonts > Fonts > Lower windows title to 9pt, bold.

A black theme for an interface on top

This is a personal taste; it blends better with the edges of my border-less monitors and it's easier to forget about them:
In the settings: Workspace theme > Plasma theme > Get New Plasma Themes and find Unity-Plasma

Move the panel to the top screen border (the configuration icon on bottom-right > Screen edge and drag and drop the panel to the top).

Add a workspace

Workspaces are great for productivity! I use only two workspace:

  1. "General", to take notes, reply to email, work on my script, the website or read social medias.
  2. "Production" were I have an always ready "virtual easel" with my setup ready to paint.

In the settings: Desktop Behavior > Virtual Desktops ; one row, top one "Internet" and "Production" on two row. I switch them scrolling on a Pager widget in my top bar on second monitor.

File-Manager Dolphin, Krita, Blender & Git previews:

Open the file manager, and go to Control > Configure Dolphin:
In General > Preview tab, activate 'Krita documents' and any other preview you are interested in. (eg. I add also Blender previews, and I deactivate here the directory previews).

For the Git preview, it will be in the 'Services' page but only after installing the plugins manually and restart Dolphin:

sudo apt install dolphin-plugins

Optional while you are around: cleanup the Services not used for a more compact right-click menu.

A better kickoff menu

The default menu of Kubuntu has only a single column of favorite application. If you do content creation including audio, video, art; you might have as I do dozens of favorite app. Fortunately, an alternative menu exist and let you setup more column and resize the menu:

Click on the option of your panel (icon on far right) then click on "Add a new widget" and go to get new widget button on the bottom of the list to pick new widget online. You'll find an update for the default Plasma kickoff menu with more option (resize, column, icon size) and less scroll: Kickoff/Grid https://store.kde.org/p/1317546/. This just feels right!

If you loose the 'Super' key action to open the menu, right-click on the kickoff button, "Configure Application Launcher", then in the dialog go to "Keyboard shortcut tab" and assign Meta+F1 as a shortcut (Meta is the "Windows" key, also called "Super"). This is a workaround because the Meta/Super key alone will be rejected. For an unknown reason, this non logic tips works: you'll have your menu pop up after a single Meta/Super key press after that.


A longer start menu with two columns

Custom default folders

By default, GNU/Linux system forces you to adopt a directory structure in your home folder. "Desktop", "Videos", "Public", etc... This doesn't suit every needs. You can fortunately customize that. Mine are slightly different (mostly undercase). To edit them, open your Files, show hidden folder with Ctrl+h and then edit .config/user-dirs.dirs with a text editor (eg, kate). Then edit the lines to your liking, save and close.

XDG_DESKTOP_DIR="$HOME/beta-test"
XDG_DOCUMENTS_DIR="$HOME/documents"
XDG_DOWNLOAD_DIR="$HOME/downloads"
XDG_MUSIC_DIR="$HOME/music"
XDG_PICTURES_DIR="$HOME/pictures"
XDG_PUBLICSHARE_DIR="$HOME/public"
XDG_TEMPLATES_DIR="$HOME/resources/templates"
XDG_VIDEOS_DIR="$HOME/videos"

After that close all the instance of the file manager:

killall dolphin

When you'll restart it, the change will be done.

Firefox media integration:

This is a little plus, but I admit I like it to be able to quickly pause the podcast or music I'm listening (more and more often via a webrowser) while painting :

Firefox addons for plasma integration: [https://addons.mozilla.org/en-US/firefox/addon/plasma-integration/].

Color Calibration and Management

This part unfortunately was working on previous Plasma4 but doesn't work anymore since years now. Here is my workaround. We will use argyllcms tools installed this way:

sudo apt install argyll

Create ICC:

To do a classic calibration of two monitors (I have a USB Pantone Huey Pro colorimeter) at 160cd/m², 6500K and Gamma 2.2 enter this type of line one by one on the terminal:

dispcal -d 1 -t 6500 -b 160 -g 2.2 -yl -v -o MONITOR1
dispcal -d 2 -t 6500 -b 160 -g 2.2 -yl -v -o MONITOR2

Just follow the instruction on the terminal, place your colorimeter and wait for getting your ICC. Simple.

Load the ICC:

To apply the ICC on each start-up; we will have to do a script containing something like that (adapt the path):

#! /bin/sh
dispwin -d 1 /absolute/path/to/MONITOR1.icc
dispwin -d 2 /absolute/path/to/MONITOR2.icc

Save that into a ICC-loader.sh, right click on the file and give it permission to execute, then in the Kubuntu menu search for "Autostart" then in the dialog "add a new script" and customize the path to load our ICC-loader script.

Software

Here is the list I use, if you don't know them, I invite to select the keyword of their name with your right-click and search more information about them. Needless to say I love all the software on this list and a epic THANK YOU if you contributed to them:

Must have:

My favorite utilities:

sudo apt install filezilla nomacs xournal xsane zim ghostwriter gtimelog meld

The GNU/Linux graphic tools:

sudo apt install gimp blender

(note: see later instruction to get Inkscape 1.0 and Krita 4.3)

Audio/video editing tools:

sudo apt install audacity obs-studio simplescreenrecorder olive-editor kdenlive guvcview peek audacious audacious-plugins audacious-plugins-data clementine 

Development tools, codecs and and other must-have libraries (imo):

sudo apt install git wget imagemagick ffmpeg mencoder htop diffutils rsync curl cryptsetup libgdk-pixbuf2.0-dev libxml2-utils ruby ruby-sass flashplugin-installer libcurl4 trash-cli libavcodec-extra lame flac unrar zip unzip p7zip-full p7zip-rar rar x264 libdvdnav4 gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly ffmpegthumbnailer

Specific to my install/needs

Libraries and tools for Pepper&Carrot scripts and renderfarm:

sudo apt install exiftran lftp xclip jo notify-osd libnotify-bin optipng sshpass jq python3-pip zenity parallel python3-unidecode python-is-python3
pip3 install --upgrade arabic-reshaper

Book project: PDF manipulation, LaTex

sudo apt install scribus fontforge fontforge-extras peek texlive-full texlive-extra-utils pdftk pandoc

System admin preference utilities:

sudo apt install mc ppa-purge screenfetch gnome-disk-utility geany kronometer treesheets gprename samba gitk

My old printer Canon MP560 on Linux can only be added to the printers list in the settings after installing the Bjnp protocol:

sudo apt install cups-backend-bjnp

Inkscape 1.0

This major and amazing release wasn't made in time to be part of Kubuntu 20.04. But a repository exists:

sudo add-apt-repository ppa:inkscape.dev/stable
sudo apt update
sudo apt install inkscape

Micro

a simpler editor than the default Nano (with sane shortcut: Ctrl+C, Ctrl+V, Ctrl+S and Ctrl+Q) for my quick edit of config files in the Terminal. It also has line number, code syntax colored, and support for mouse. With that tool and after years of nano, I re-enjoy editing files as sudo inside the terminal.

curl https://getmic.ro | bash
sudo mv micro /usr/bin/micro

Note: Micro was finally packaged with 20.04; but the package is poor quality and has bugs that make it non-usable.

Krita

I install two versions of Krita on my computer:

  1. A compiled from the sources version to participate bug-tracking and feedback.
  2. A stable appimage version for production.

I already wrote two illustrated articles about them: my Krita compile guide for cats and the Krita appimage article.

Quick install of Krita 4.3 AppImage:

As I'm writing this guide, I'm using the krita-4.3.0-x86_64.appimage in production and since its release. This is a solid version where I made episodes, and book projects from A to Z without a crash or big trouble. To get a dedicated Krita-stable and the shortcut in your menu (customize the path to your liking):

mkdir ~/software
cd ~/software
wget https://download.kde.org/stable/krita/4.3.0/krita-4.3.0-x86_64.appimage
wget https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Calligrakrita-base.svg/1200px-Calligrakrita-base.svg.png
chmod +x krita-4.3.0-x86_64.appimage

And for the launcher (using micro text-editor, use 'nano' if not installed),

mkdir -p ~/.local/share/applications
micro ~/.local/share/applications/krita-stable.desktop

And paste into this recipe (customize the path; /home/deevad is my user folder, you'll need to adapt your code to yours).

[Desktop Entry]
Categories=Graphics;
Name=Krita-Stable
Comment=Digital Painting - Stable appimage
Exec=/home/deevad/software/krita-4.3.0-x86_64.appimage
Icon=/home/deevad/software/1200px-Calligrakrita-base.svg.png
MimeType=image/openraster;application/x-krita;
StartupNotify=true
Type=Application

Save (Ctrl+S) and quit (Ctrl+Q), then do that to make your launcher executable:

chmod +x ~/.local/share/applications/krita-stable.desktop

Now when you type "Krita" after pressing super; you'll have the new Krita icon and you'll be able also to use it to "Open With" your documents, or put it on your favorite in dock. Note that with this recipe you can install many other software and use in parallel many version of Krita.

Compile Krita from source:

If you want to follow the development and help with beta-testing you can read my cat guide here to compile it. But during the process, you'll realise you'll need to install libraries to build the code from source and the only way to get the list is by playing trial and errors. One after one. I spent those two hours for you, here is my list that work out-of-the-box on Kubuntu 20.04:

sudo apt install cmake debhelper extra-cmake-modules gettext libboost-system-dev libeigen3-dev libexiv2-dev libfftw3-dev libgif-dev libgsl-dev libjpeg-dev libkf5archive-dev libkf5completion-dev libkf5config-dev libkf5coreaddons-dev libkf5crash-dev libkf5guiaddons-dev libkf5i18n-dev libkf5itemmodels-dev libkf5itemviews-dev libkf5kio-dev libkf5widgetsaddons-dev libkf5windowsystem-dev liblcms2-dev libopencolorio-dev libopenexr-dev libpng-dev libpoppler-qt5-dev libqt5opengl5-desktop-dev libqt5svg5-dev libqt5x11extras5-dev libraw-dev libtiff-dev libxcb-util0-dev libxcb1-dev libxi-dev pkg-config pkg-kde-tools pyqt5-dev python3-dev python3-pyqt5 python3-sip-dev qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev vc-dev zlib1g-dev libqt5sql5-sqlite libquazip5-dev

Youtube-dl

A tool to download videos on Youtube; useful to quote other CC-By video production or other videos with compatible license:

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

To update it later:

sudo youtube-dl -U

Web development

I'm a bit old school for my web development (I learned in 2000), all I needs is PHP and modules like XML handling, Image Manipulation (GD) and URL rewriting. My website here https://www.davidrevoy.com and https://www.peppercarrot.com still use only that. So the guide under is very specific to my needs but it might inspire other users.

Install the LAMP stack

sudo apt install apache2
echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf
sudo a2enconf fqdn
sudo a2enmod rewrite
sudo apt install php libapache2-mod-php php-gd php-xml php-mbstring
sudo systemctl reload apache2

Symlinks custom folders

By default, the local server use directory /var/www/html but I prefer to work on my home directory. It ease my backup and comfort to edit files. Here is what I do with symlinks, as an example. I start to remove the default file in www/html, then I recreate it:

sudo rm -r /var/www/html
sudo mkdir /var/www/html

After that, I link from this place my web development directories:

sudo ln -s ~/www/peppercarrot/ /var/www/html/peppercarrot
sudo ln -s ~/www/.test.peppercarrot/ /var/www/html/peppercarrot-test
sudo ln -s ~/www/davidrevoy /var/www/html/davidrevoy

Permissions

To allows URL rewrite and .htaccess on local folders:

sudo micro /etc/apache2/sites-available/000-default.conf

Add the following to the end of the file :

<Directory "/var/www/html">
  AllowOverride All
</Directory>

If you often tweak files created via apache/php; a good tip is to add your user to the www-data group, for my user 'deevad' it looks like that:

sudo usermod -a -G www-data deevad
id deevad
groups deevad

Restart and enjoy

sudo systemctl restart apache2

It's now good, you can connect with your web-browser to your folders with this type of address [http://localhost/davidrevoy/]. When the website are ready; I upload changes with Filezilla to my distant server via sFTP. But I also automatized that with time using a rsync script over SSH that help at doing the synchronization. If you want to know more about this method; look at the upload script on Pepper&Carrot tool repository.

Other, Misc

Disable Apport crash report dialog:

By default all Ubuntu derivatives comes with a tool to report bugs. In theory, the idea is very good. In practice, you'll have a dialog pop-up that appear each time a software exit a bit abruptly or each crashes you have (and with the software I have, crashes are something you'll experience from time to time unfortunately). The report are often useless for the developer and so this dialog reports too many false positives that interrupt work and takes very long to display. It also known to crash on its own on Kubuntu since years. To deactivate it:

sudo micro /etc/default/apport

Edit manually 'enabled=1' to 'enabled=0' and Ctrl+S to save, Ctrl+Q to quit.

Fix Imagemagick memory limit.

By default, Imagemagick, a command line tool to manipulate raster images, is installed with a very low tolerance to large files. That's a bit sad because I remember when they changed it and then I had an issue with it I took hours to solve. If we want to convert 300ppi PNG or JPG, convert to CMYK this faulty default will return errors. To level up the possibilities of this fantastic library:

sudo micro /etc/ImageMagick-6/policy.xml 

Scroll the lines and upgrade the limit manually with the text editor. My setup use that:

<policy domain="resource" name="memory" value="4GiB"/>
<policy domain="resource" name="map" value="4GiB"/>
<policy domain="resource" name="width" value="128KP"/>
<policy domain="resource" name="height" value="128KP"/>
<policy domain="resource" name="area" value="4GiB"/>
<policy domain="resource" name="disk" value="6GiB"/>

also, allow PDF read/write (it is useful).
Find the line:

<policy domain="coder" rights="none" pattern="PDF" />

and change it to

<policy domain="coder" rights="read | write" pattern="PDF" />

Ctrl+S to save, Ctrl+Q to quit.

Fix issue with sleep/suspend/hibernate mode

Warning, might be Dell Vostro 430 (my computer) specific: since two releases my computer can't go to sleep, when it does it shut totally and no way to wake it up. I have to press 6 sec on the shutdown button or remove the power, wait... and start again as a regular boot. This tip fix it:

sudo micro /etc/systemd/sleep.conf

Then uncomment first line and add this under [Sleep]:

[Sleep]
AllowSuspend=yes
SuspendState=freeze

(uncomment: AllowSuspend=yes)

References & links:

I hope you liked this article! Here is to end a quick inspired Kubuntu artwork to thanks the Kubuntu team!




Previous post Next post
License: CC BY
David Revoy, www.davidrevoy.com, .
Unless otherwise mentioned in the article.

Tags:  #article  #Linux  #install  

Corrections and improvements are welcome:

Download article source  

42 comments

link Stuart   - Reply

Thanks for this i found some new packages to try. Treesheets in particular
I have moved a lot of my image processing for larger images from Imagemagick to using vips
https://libvips.github.io/libvips/ in general faster and more efficient memory usage. Handles images that IM just dragged my linux box to death with although your memory changes may be the fix for that.
I don't think i still use IM for pdfs and do not know what your specific use case is, but for pdf to image i use pdftoppm after trying a lot of different tools.

link raghukamath   - Reply

Just to add my use case I use imagemagick for quickly getting pdf out of image files like comic pages, series of advertisement images, sometimes I use it for combining scanned invoices and contracts etc. It is just a 'F4' key away in dolphin.

link David REVOY Author, - Reply

Wow! Thank you for all the tips. I'll try all of that :)

link David REVOY Author, - Reply

For PDF to image; I use it on the book project. I crop with CLI tool the cover from the "cover+backcover plate" for printer and convert to sRGB the result so I can get a cover for the ebook and a jpg of the cover for the eshop.

link raghukamath   - Reply

For color calibration I use Displaycal. Sadly I am also hurt by the non color managed thumbnails and image viewer I had filed a bug report for Gwenview here - https://bugs.kde.org/show_bug.cgi?id=354542

link David REVOY Author, - Reply

Displaycal is great! I used it too during a long time, but then I discovered I could also directly generate my ICC with the same command-line. I still install DisplayCal for all the cool diagnosis tool and graph for ICC coming with the package.

link Raghavendra Kamath   - Reply

inspired from your post, I am trying kubuntu for few moths leaving behind my trusted arch setup 😄 I found that displaycal doesn't have a package for 20.04 yet due to some python version issue. sad to know that.

link David REVOY Author, - Reply

Having the experience of Arch back on 'buntu (or any other distro) is a priceless skill. I'm glad my guides gave you curiosity to try this LTS distro!

link NiCapp   - Reply

are you aware of this page launchpad.net/~scribus/+archive/ubuntu/ppa ? For waht i can undrstand one repositoriy/method to unstall Scribus 1.4.8 on (?)ubuntu 20.04 exist

link David REVOY Author, - Reply

Yes, I checked it too. Kubuntu 20.04 is codenamed "Focal", you can filter the PPA for this target. You'll find only Scribus-trunk. The problem is deeper; Scribus 1.4.8stable require probably an old Python, or an old Qt not part of Ubuntu ecosystem anymore (not part of Arch, Debian, Fedora, OpenSuse too). That's why installing debs of the previous version ; 19.10 (scribus + scribus-data) doesn't work.

link Bert Van de Poel   - Reply

You could perhaps contact Mattia Rizzolo who maintans the ppa https://launchpad.net/~scribus . He lists several email addresses on his profile so I think he won't mind. It would be nice to know what is perhaps causing the incompatibility. Perhaps he could have another look if he knew there was active interest. But I presume there's a dependency issue, since shipping a non-stable release just wouldn't make sense otherwise.

link David REVOY Author, - Reply

Hi @Bert: yes, you presume right. I had information two days ago from #scribus IRC channel with devs. I had hints about dependencies, then I saw by myself it was Qt4 core dependencies mainly (but also precise python/cups/cairo/littlecms) https://debian.pkgs.org/10/debian-main-amd64/scribus_1.4.8+dfsg-1_amd64.deb.html Only Flatpak/Snap/Appimage could probably solve that type of environment rebuilding without damaging package dependencies on my O.S. Unfortunately, no one made pack for that...

link javi   - Reply

So is it really impossible to use Scribus 1.4.x on buntu 20.04? This is a big problem for me, version 1.5.5 has a bug with drop caps, at the moment I am forced to use Scribus 1.4.8 on Windows, but it is not what I like the most.

link David REVOY Author, - Reply

Yes, really impossible. I had a share of new issues with 1.5.5 too; mainly the produced PDF were all rejected by the bot of my printer. I converted them with Ghostscript after export and printer accepted them. I'm still waiting for the resulting print result; the industry of printing/shipping has a slow-down due to the COVID pandemic right now.

link alexb3d   - Reply

Any novice sees these installations in Linux and is scared, they are unnecessarily complicated, use Flatpak and avoid all those annoyances, you also have the updated applications and directly from the official developers.

link David REVOY Author, - Reply

Alexb: Ha, I see. Iritated because my guide is not looking easy enough for easy-userfriendly-Linux-propaganda? :-D Not my cup of tea, sorry. I'm just an artist sharing a practical guide: it might still has room to be reformulated more easily --sure-- but all in all if I do things this way it's because other ways I experienced are worst or have bugs. About Flatpak: this system is (in my point of view) not ready. Critical bug example on Krita Flatpak: you can't install a brush bundle with Flatpak. I reported the bug on 18 June: https://github.com/flathub/org.kde.krita/issues/24 , no reply, no support. It's also dangerous because I also had the case to rescue remotely a Linux Mint where the root partition suddently went totally filled overflow because it was filled with GB of Flatpak via regular system updates. The system couldn't login anymore while users needed to access email for medical reason. Finaly, your statement "...and directly from the official developers" is far to be true: not all developers manage their Flatpak afaik and Krita team for sure doesn't. That's all but don't get me wrong: I really wish things were easy as you write! But I have no idea where you got that type of informations... They are not similar to my reality where I have today to spend 5h into refactoring/testing/proofreading carefully my book project because I still cannot install Scribus 1.4.8stable on Ubuntu 20.04 while Mac, Windows 7, 8 and 10 user can make it with double clicking on a installer... and no Flatpak can save my day (so far?).

link alexb3d   - Reply

Irritated by what? There is no reason.
I mean if you are doing a "practical" guide to show that you can work with Linux, it is not the best way. Windows users screw up the terminal and associate it with something old. Still I see this well, it is a guide.

I saw about the brushes, and the error is not an error, that's why you don't get an answer. In flatpak and snap the routes were changed.

The HDD with Mint, it happened to me the same with Ubuntu, but that was like 2/3 years ago, that was corrected. Compared to repos / PPA, Flatpak currently uses 10% more disk (root).

In Flatpak the programs are certified, they can only be published by the developers or someone directly related, there is only a stable or testing version. Anyone can post in Snap, that's why you see 50 versions of the same program. The information came from the same Flatpak people. Let's ask him on twitter to verify.

Forget about Scribs 1.4.8 on Ubuntu 20.04, Ubuntu abandoned QT4, and Scribus is working on version 1.5.6 based on QT5. The 1.5.5 was actually stable, it was ready to go, but with this change it is preferable to dedicate time to migration, it works excellent, if you have problems with the texts, talk to Franz Schmid, for a quick solution, he is very friendly.

link David REVOY Author, - Reply

Thank you then and sorry if I interpreted your first comment as "Irritated". I'm glad to know there is reasons for Flatpak errors/issues; but at the end of the day, it makes a package more buggy than the appimage provided by the developper. For now, this is the only metric I can compare to triage the good from everything else.
1.5.5 might be stable; but I'll see. Thank you for the contact. I invested already a lot of research (re: https://www.davidrevoy.com/article757/the-english-book-printed-project-production-report-3 ) to get a succesful pipeline with an old industrial laser Printer from the 2000 for POD using a specific CGATS_CRPC1.icc profile and PDF-X strict spec. It wasn't easy, and that's why keeping a version like 1.4.8 felt like a security....

link alexb3d   - Reply

It is only a recommendation, in Linux we have many alternatives.
I have never had the need to calibrate the monitor in Linux, but I would like to do it soon and you send something to press with Scribus, I will see that article.

link Ian   - Reply

I discovered lots of useful KDE tips here David. Thanks.

KDE work hard to make Linux usable for non IT experienced people. The command line is a huge barrier to them. Suggesting it to non IT people will put many off of using Linux. For example installing software. The Software centers are so easy to use and one of the best things about Linux. As you use Linux for work I'm sure you have pressure to deliver regardless of the barriers. I use Linux just as a hobby for drawing and design and have not needed the command line ever. There is nearly always a way to get things done avoiding unfamiliar IT tools designed for computer maintenance people. Please don't scare new people off. The more people on Linux, the more worthwhile it is companies will develop drivers and port applications to Linux.

link David REVOY Author, - Reply

Hi, you know, if you think it is possible, that benefit for the community, easier and better to do a guide with your recommendation, please go ahead and publish your own guide. But don't tell me what to do to fulfill your concerns about marketing of Linux should-be-easier advocacy. Im not sharing that illusion anymore since years. Thank you.

link David REVOY Author, - Reply

Just. Re-reading myself and sorry about being a bit grumpy in my tone. You know, i just saw too many recommendation in 10 year and in result I still have to do many workaround. And software centers forcing half baked snap or flatpak on user is a new tendancy i dislike...

link Ian   - Reply

Yes. And I understand you need a pragmatic, working solution if you are on Linux for work. Whereas I have the luxury of using Linux as a hobby. (My work software is on Windows with no FOSS equivalent.) And yes, the software package world is far from ideal at the moment, as you say. But new users can install mainstream apps like Gimp, Blender and Inkscape easily, and get working on Linux with minimum IT learning. I just wanted to point out that some things are just outside of many peoples comprehension. I like to welcome newbies to Linux.

link alexb3d   - Reply

This is the type of article and the type of responses that people get, LOL. We are in the same boat and Linux provides for everything, which if it is true that for newbies, it is complicated.

Ian, are you the same from the youtube channel?

link Ian   - Reply

Not me. I don't know that Youtube channel.

We are not quite all in the same boat, in that some people use the command line regularly and some people do not know what it is. Yet those have years of experience with GUIs. So could quite happily switch to Linux, but read negative things about the usability.

link alexb3d   - Reply

mmmm....
"We are all in the same boat." it is an expression, a saying... O_o

link paperdigits   - Reply

Let's not confuse flatpak (the technology) with Flathub (the app hosting site and build services). I can host my own flatpak repo, but it won't be flathub. Not all flatpaks on flathub are close to the original project, for instance darktable and RawTherapee are not sanctioned by the upstream projects.

link alexb3d   - Reply

There is no confusion, for convenience we say Flatpak to the Flathub repository, because you have to bear in mind that it is the official Flatpak repository.
https://flathub.org/about

"Flathub está pensado principalmente como un servicio que utilizan los desarrolladores de aplicaciones para distribuir sus aplicaciones."
Here is related information as I was commenting to David: https://github.com/flathub/flathub/wiki/App-Submission

We are all clear on that. What I don't know is how do you know that Darktable and Rawtherapee are not official?



https://github.com/flathub/flathub/wiki/App-Submission

link alexb3d   - Reply

I placed the cited text in Spanish, LOOOL
"Flathub is primarily intended as a service that is used by app developers to distribute their apps. "

link Châu   - Reply

¡Merci David! ¿Can Dolphin display Inkscape SVG file and OpenEXR? ¿Also can preview movie (.mp4) and sound file (.mp3 and .ogg)?

Good know this distribution can use Blender 2.83.

link David REVOY Author, - Reply

Hi Châu!
Yes for all, they all have a checkbox under Dolphin settings > General > Previews
- SVG
- OpenEXR
- Audio files (mp3/ogg/etc show album cover if metadata has that, not a waveform preview)
- Video files (it pick a frame of movie)
You'll probably like also
- Blender Files

I'll probably add a picture with this example to the article now. It's really useful.

link David REVOY Author, - Reply

Example with screenshot added on first part. Good addition.

link K   - Reply

Thanks a lot for this article. This isn't my first linux distro so I was able to follow all steps that would help me customize it to my liking. I'm glad you made this article and posted it on the subreddit; I wouldn't have known about Kubuntu otherwise. I was even thinking of just trying Ubuntu on its own, but I'm very satisfied with how Kubuntu looks and feels. Cheers for sharing your fave programs.

link David REVOY Author, - Reply

Thank you very much for sharing your comment!

link No 2 Fan   - Reply

awesome work like always.
you have not made any post about your system(Specification) in a long time.

link David REVOY Author, - Reply

Hi! Thanks No2Fan!
Yes, but my system haven't changed much. Still the same old Dell Vostro (10 years old) with a Nvidiacard upgrade + RAM; the tablet is on the tablet log post. Recent update: A 27'' Philips monitor 275E quadHD on December as my main monitor because I was so frustrated not being able to look at a A4 page in full at 100% at 300ppi on my monitor (for the book project; preview of double page).

link kim   - Reply

Looking into your arts feels like a sweet cake on my tongue and warm breeze on my skin!
(I think that my expression is too oily and cheesy , but to express how felt there was no option XD)
Thank you for showing these

link David REVOY Author, - Reply

Aww 😍 thank you!

link Stefano   - Reply

If you do not care too much about performance, you can use virtual machines for older (or different) software. I usually keep a couple of virtual machines with different versions/distributions so that I can test features or use some specific software. In your case you could run Scribus on a Ubuntu 19.10 virtual machine through VirtualBox or Qemu. I personally use Qemu, but I am mainly a developer and I am used to some features of that piece of software, while VirtualBox is more user friendly and probably better suited for your needs.

link David REVOY Author, - Reply

Hey, thank you for adding this option here. I'm not using this because the difficulties is often to have to install things (like tablet, color calibration, dual monitor) or to access the data (expecially in my case when the book as over 10GB of resources to compile/load). I'm sure it's possible to mount a partition in it and access to the files , and also to share the USB of the device and build a system in a system but I never really experimented. That sounds like a big time budget. Still, a very valid option to use in desparate cases to load an old software.
Still it sounds unreal it's easy to run Doom into DosBox on any Linux while installing a Qt4 software of three years ago is near impossible...

link Jak   - Reply

I didn't know about Meld and I posted it immediately to my job chat to share it with colleagues.
Thank you for your post and your exceptional work in a free environment!

link Sebastian Viebach   - Reply

A big Thank you for this article, there are lots of useful tips here! Ghostwriter and Xournal are both very nice programs that I didn't knew before.
Kubuntu 18.04 was my first Linux Distro I installed two years ago and I switched to Kubuntu 20.04 at the end of this June. This update was really worth it, especially because of the Graphics Tablet GUI. It makes the screen mapping a breeze and i am finally able to customize my shortcut keys (yay!). The file thumbnails in Dolphin are very useful, too.
The only problems I had so far were that some qt widgets (like the scrollbars in the application launcher) don't work if i use a tablet and that each time i plug in a second monitor it messes up the tablet mapping. (I am not asking for tech support, I am just curious if anyone else had them too)
Also interesting to read about your experience with cross-distro packages like flatpak. My experience has been mostly good so far. The solution that has been working the best for me is Appimage, I would really like to see more projects adopting it. Projects like Nitrux look very promising.
Cheers!

Leave a reply

Comments will be moderated according the Citizens of Hereva Code of Conduct.

CapchaCapcha

Enter image code