Ubuntu: Day 1*

Ubuntu: Day 1*

Continuing my foray into trying to switch to using Linux full-time, it is time to give Ubuntu a new and proper try.

Continued from the Manjaro series, the last post of which can be found here.

I have been using Ubuntu in one way or another for quite a few years now, but never as a primary desktop operating system. Hence the asterisk in the article title. So when my foray into using Manjaro ended in a fizzle, I decided to give Ubuntu a try instead.

I had originally wanted to try something Arch-based as I heard many good things about it and also because I wasn't entirely happy about how Canonical handled the whole dropping 32-bit situation (not that they wanted to drop support, mind you, just how they went about it), but that's not nearly enough to completely throw a potentially very good option aside.

Kubuntu

As I did like KDE Plasma (other than their slidey tabbed menu design), I thought I should start by giving Kubuntu a try. After creating a bootable USB stick I went the usual route of booting into the live environment to install things, but unfortunately I ran into an issue rather quick. I just wasn't able to get a picture after installation finished. I re-installed to give it another try, but no dice. Having just come from the "fun" of trying to make Manjaro not suck get in the way, I decided to give up here.

Culprit: drivers for Navi-based GPUs

So, having proverbially tossed Kubuntu out with the baby water, I "burned" yet another setup stick, booted up the Ubuntu live environment, ran the setup, rebooted and.. You have to be kidding me, another black screen. No errors, no warnings, no crashes, just.. blackness.

What the heck.

Well, the heck is, as it turns out, missing support for the Navi-based Radeon GPUs. I suppose the live environment works as it does not have hardware acceleration enabled or something, and the fact that it boots to just a black screen without any kind of fallback or error handling is a bug. I mean, obviously, but it's actually supposed to fall back to, you know, something. Anything, really.

Fortunately it's easy to fix once you know what the actual problem is. All I had to do was boot into safe mode (is it called Recovery mode for Ubuntu? I can't remember), run sudo apt update && sudo apt upgrade and that's it. Somehow this wasn't done automatically during installation even when I specified it should fetch the latest packages, but at this point I'm just happy the thing actually booted.

Note: I suspect that the same issue caused Kubuntu to not work for me, but I have not gone back to confirm this. I just wanted to mention it here in case someone else is contemplating Kubuntu, faced a similar result and also has a Navi-based GPU.

Let's continue.

Bloatware

Ubuntu by default comes with quite a few apps pre-installed that might not be useful to you. You might be able to get a lighter package without this, but as I went with the official/default download option, I ended up with this stuff. I would recommend you check the list of installed applications yourself and remove ones you personally don't need. In my case I ended up removing a bunch of them as I;

  1. don't play Solitaire/Sudoku/whatever on a desktop,
  2. don't use office tools and if I do, it's usually for a project/client and Google Docs, and;
  3. Thunderbird is, while great that it exists, a 1998 software time capsule. And people say Apple Mail is overkill/heavy. Whew.

Here's the full list of pre-installed apps I removed: Amazon, Cheese, Document Scanner, GNOME Solitaire, GNOME Mahjongg, GNOME Mines, GNOME Sudoku, LibreOffice, LibreOffice Calc, LibreOffice Draw, LibreOffice Impress, LibreOffice Math, LibreOffice Writer, Print Settings, Shotwell, Thunderbird Mail, To Do.

Somehow at some point after removing these apps I also ended up with the settings panel suddenly removed. I don't think any of these apps are at all related, but some part of the system obviously seems to disagree with that. So I re-installed it by running sudo apt install gnome-control-center. Weird, but easy to fix, so long as this doesn't keep happening of course.

Workspaces

I like using macOS' Spaces quite a bit, especially on my main machine as it's a great way to separate applications and windows by task. I work on different projects/jobs depending on the day and prefer to leave my development environment open and ready throughout the week, unless I don't have to get back to that specific project for a while of course.

By default more recent versions of Ubuntu have Workspaces (their name for macOS' Spaces) that are "automatically" handled —in that it tries to figure out when you need another workspace and shows an additional space— and limited to only your primary display. Needless to say both these defaults leave a lot to be desired, so let's fix them both.

Install the Tweaks tool using sudo apt-get install gnome-tweaks and open it. Under Workspaces, select Static Workspaces and select how many workspaces you would like to have. Then, select Workspaces span displays to have all displays join in on the workspace switching fun. That's it!

Tip: You can also use the Tweaks app to change the system theme, like an all-dark mode. I believe it also has some additional wallpaper placement options that you can't get through the normal settings panel, like using one image stretched out across all displays. Take a look around, maybe there's something nice in there for you.

Terminal

The default terminal application is fine, but lacks some features I have come to enjoy. The biggest one is split views, where you're able to both horizontally and vertically split one screen, which I prefer over having a bunch of windows floating around or bulky tabs that hide everything except one view. I was recommended to take a look at the pretty funnily named Terminator, and so I did. Installing this is, as you might expect, quite easy: sudo apt-get install terminator. Done.

By default, at least on my system, new horizontal/vertical tab keyboard shortcuts were not enabled, so I went ahead and set those up. In a Terminator screen, right click somewhere in its screen and select Preferences. Then under Keybindings look for the split horizontal and vertical options. In my case I chose ctrl+d and ctrl+shift+d for splitting vertically and horizontally respectively, to match iTerm2's defaults that I have gotten used to, substituting cmd for ctrl as Linux follows the Windows style, unfortunately.

Dev Tools

Similar to what I covered previously in my Manjaro series, let's install some of the dev tools I rely on. Let's go through this with some speed:

# Git etc.
sudo apt install git wget curl 

# Tools used for some repos we'll be adding below (like Docker, KVM, etc.)
sudo apt install apt-transport-https ca-certificates gnupg-agent software-properties-common
# Add the NodeJS repo
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -

# Add the Yarn repo & key
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

# Install
sudo apt update && sudo apt install nodejs build-essential yarn

Docker

# Add the repo's key and repo itself
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

# Install Docker
sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io

# Add yourself to the user group so you can use docker without sudo
# Note: You need to log out and back in again for this to take effect.
sudo groupadd docker
sudo usermod -aG docker $(whoami)

# Start Docker automatically
sudo systemctl enable docker
sudo systemctl start docker

KVM

sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager

# Add yourself to the user group so you can manage VMs without sudo
# Note: You need to log out and back in again for this to take effect.
sudo groupadd libvirtd
sudo usermod -aG libvirtd $(whoami)

# Start KVM automatically
sudo systemctl enable libvirtd
sudo systemctl start libvirtd
Note: In many guides/installation steps I found they refer to a package called libvirt-bin, but as far as I can tell this package was deprecated and split out into libvirt-daemon-system and libvirt-clients since around Ubuntu 18.10.
Note: If you get an error when trying to enable automatically starting KVM at system boot, try restarting your system (or logging out and back in again) first, and see if it works then. Alternatively you might also be able to get it to prepare the systemd service file by launching sudo virt-manager at least once.

To be continued..