Well, this post has been some time in the making. As I mentioned a week or so ago, I’m back on Linux full time on my main personal machine. That machine, by the way, is a 3 year old Lenovo Yoga 2 Pro. Probably my favorite computer ever so far. The only thing that is showing its age is the battery. It was never that great to begin with, now, you can practically watch it drop by the minute. But since I mainly use it at home, it’s not been a huge issue.
Anyway, I initially fired up Ubuntu 16.04 on it. Because that’s like the default. Ubuntu is great. You literally just put a disk in the drive, or a USB drive in the slot, boot into it, click a few buttons, enter your name, password, time zone, and about 10 minutes later, you’re up and running. Everything just works. The only thing I had to tweak was my touchpad, which involved writing a config file with the various settings. And tweaking that config file until it felt just right. Sounds like a pain, but on Windows I also had to tweak it. And to do that I had to go into the device manager and get the device id and then go into the registry editor and find the right key, then find the right option to make it do what I wanted. All told, the text-based config file is far easier.
One thing about running Gnu/Linux is choice. You can change just about anything. I’m not a big fan of the Unity interface in Ubuntu, so I swapped that out for Gnome. This involves installing the Gnome desktop and choosing that at login. But it bugged me that all that Unity code was still there under the hood, taking up space, and doing God knows what. So I wiped the whole install and installed UbuntuGnome. This is Ubuntu, minus Unity, plus Gnome. On the surface, not at all different than what I had. But I felt better about it.
OK, all would seem to be good. Then I started doing videos. First problem. I found that while doing screen casting, the recordings would have all kinds of tearing and glitching. This was indicated to be an issue with Gnome 3. OK. Dropped into the earlier version of Gnome which installs along with 3. Same problem. OK, maybe it’s just a Gnome thing. I liked Gnome, but if I can’t screencast with it, it’s no good to me.
So, wiped things again and installed Mint. Mint is a beautiful OS. It’s an Ubuntu derivative, but has it’s own desktop environment called Cinnamon. It used to be my OS of choice and after I installed it, I remembered why. It’s so nice. Even better than Gnome.
Unfortunately, I had the same issues with tearing while screencasting. After some more research, it has to do with “compositing”. When you have a window manager that can show different windows on top of each other, behind each other, over a desktop with other things on the desktop, maybe certain elements have shadows and transparency, the act of arranging all of these elements correctly is compositing. And such a window manager is known as a compositing window manager. Most window managers are compositing. Mac, Windows, Ubuntu, Mint. It’s what you are used to. But this can cause a problem with screencasting in some cases. I don’t know the details, but I guess when the screen recorder is capturing frames, the timing can be off and it starts capturing things at the wrong level, maybe capturing things as they are in the middle of being drawn. There are probably solutions to this, but learning about this brought up the question, “what is a ‘non-compositing’ window manager?”
It turns out there are a few popular non-compositing window managers on Linux. Most of these are called “tiling window managers”. A couple of the most popular ones are xmonad and i3wm (or just i3).
The way these work is when you create your first window, it is automatically sized to fill your entire screen. When you create another window, the two windows are tiled, so one fills one half of the screen and the other fills the other half. More windows split up the screen further, either vertically or horizontally. There’s no wasted space. There’s no overlap. Once you have anything running, there’s no desktop. Only your apps, filling virtually every pixel of the screen. Tiling window managers are usually very keyboard based, with shortcuts for moving between windows, moving windows around, switching between multiple workspaces, opening and closing programs, etc. This is a good demo for what this looks like in i3:
Now I’ll admit. This sounds HORRIBLE. It sounds like going back to the 90’s and Windows 1.0 or something. But I’d heard glowing reports of people using these things. So I tried it out. At first, yes, awkward. Then I learned a few tricks. Got used to the workflow a bit. And literally started smiling. I tried both xmonad and i3. I went with i3 because it uses a text-based config file, whereas for xmonad you have to configure it with a Haskell script. And I don’t know the first thing about Haskell.
Here’s an example of my current desktop running on i3:
Good news: screencasting was flawless. And the more I used i3, the more I absolutely love it.
Bad news: i3 is tiny and lightweight. Which made me unhappy again about all the crud that was installed under the hood to support Unity or Gnome or Cinnamon, etc. I really just wanted a distro that only had the bare minimum stuff in it to allow me to boot up and launch i3.
After searching around some, I discovered Arch Linux. OK, I’d heard of Arch before. It’s one of the main distros out there. What I didn’t know is how minimal it is. For comparison, when you boot up the Ubuntu installation media (CD or USB), this is what you get:
A nice pretty installer with nice, pretty, big buttons to guide you through the steps. It does most of the work for you, requiring just a bit of input from you.
In contrast, when you boot up the Arch installation media, here’s what you get:
I thought it failed at first. But no, you get a command prompt. And no instructions on what to do. It’s ALL up to you. And it’s pretty much all command line. You start by manually partitioning your disk(s), making file systems on them, mounting them to the proper spots, then installing the system to the right place on the right partitions, setting up various config files, installing the boot loader, etc.
If you do everything right, you reboot, Arch launches, and you get… another command line. The default install adds almost nothing beyond what the system needs to boot. Probably the first thing you need to do when you get it running is set up your network – wifi drivers, etc. Then you can start installing other stuff off the net.
To run i3, you need something more than a console. You need a graphical UI. This usually means installing Xorg and configuring that. Then you need to install the programs that will run there. You don’t even get a default terminal emulator. You have to choose one and install it. You want a web browser? Choose one and install it.
If this sounds horrible and tedious to you, I understand. It’s not for everyone. For me, it made me very happy. I know almost every piece of software that’s installed on my system now. Because I installed every one. I know exactly how the boot loader and graphics system and wifi devices are configured. Because I configured them.
The Arch Wiki is an amazing repository of knowledge. And combined with the Arch Forums, there’s no problem that can’t be solved. My Yoga 2 Pro, for example, has a few hardware issues that were causing major problems. One with the wifi. There is a module that winds up blocking wifi, and had to be blacklisted so that module doesn’t load. But I found the solution for that in the forums. Likewise, the Intel video on the machine has all kinds of issues. But there are solutions for them, documented in the wiki and the forums. Bit by bit, I picked away at them, and I think I have a really solid, really minimal machine now. There’s nothing on it that I didn’t put there and not much that I didn’t fine tune by hand.
Another side note about Linux installs. It might seem really drastic when I say that I wiped the OS and reinstalled another one three or four times. Actually it was more than that, as there were several experiments in between. Distros I didn’t like and went back to something else. But when you install Linux, you are in control over what partitions are created. I create a home partition that stores all my personal files, and most of the config stuff gets stored there too. In addition to that, there is the root partition where the OS gets installed and a swap partition (and sometimes a boot partition). When doing a new install, you keep your home partition intact. The new OS overwrites the root and boot partitions. You fire up the new OS and reinstall your programs. All your data is still there, and all the config files for the programs are still there, so they function just as they did when you left them – even remembering stuff like previously opened files, options, settings, themes, etc. So reinstalling an Ubuntu-based distro takes 10-15 minutes max. Then you install the programs you want either all at once, or as you need them. At most 1-2 minutes per program. Of course, were I to re-install Arch, that’d be a different story. It was an all-day affair the first time. But most of that was figuring stuff out. It might take me an hour or two now.