The State of FreeBSD (14)

I came by a spare Dell book-sized computer recently (gen 6 i3 with 16G memory), and as I already have enough computers running Linux (usually Debian), I decided somewhat randomly to try FreeBSD on it. The most recent version is 14, and you should start here: https://docs.freebsd.org/en/books/handbook/bsdinstall/ . Their documentation is very good, and making an install USB is essentially identical to the process for making a Linux install stick that I've done dozens of times before.

I should perhaps pause to mention my experience level: I started using Linux in 1996, and I've also worked with Solaris and used macOS's command line heavily (this turns out to matter as macOS's underlying "Darwin" is essentially a BSD flavour).

Doing the install was a real throwback: I use Debian, which has an ugly and not particularly streamlined installer, but FreeBSD makes that look beautiful. I've become accustomed to the idea that I should be able to type in a hostname, a username, and a couple passwords to complete an install and have a GUI system when I'm done. Installing FreeBSD is like turning back time to do a Linux install twenty years ago. You'll be asked dozens of questions you'll have to research before you can answer, and then your grand achievement will be to have a text-mode only OS with no extra packages when you're done.

Having said that, I'll re-iterate: their documentation is very good, and guided me through this quite smoothly. Once you have your text-based system, you'll want to follow the chapter for either X11 or Wayland (if in doubt, choose Wayland - X is a dinosaur). One of the reasons I wanted to do this install was to get a good Wayland install running (all my Linux systems are A) Debian, B) have X11-based greeter software, and C) use Openbox ... so not great for Wayland). The Wayland install went amazingly smoothly and quickly. LabWC would have been my first choice as it claims to be a drop-in replacement for Openbox (a god-send for fans like me as the Openbox maintainers have no intention of porting to Wayland), but it was somewhat problematic (I don't remember why - I got it going later, but there were issues) so I installed Wayfire. Which was ... amazingly easy.

But ... seriously, wobbly windows? What is this, 2004? After I got over that annoyance, I found a couple things to like - even love. If you pull a window to a corner, it will occupy that quarter of the screen. If you pull a window to an edge, it will occupy that half of the screen. That's awesome (I don't think they're the only window manager or compositor to do this, but it may be the first good implementation I've used). Their Alt-Tab implementation is both annoying and nice: it cycles through the open windows in a visual stack, which felt both excessively flashy ... and also quite effective.

You'll become close friends with the pkg command, their package installer. (I haven't attempted "Ports" yet.) Like most package installers, it's an incredibly complex program. Also like most package installers, you don't need to learn much about it initially beyond pkg install bash to install stuff. It handles all dependencies for you. This allows you to ease in to a complicated subject: I've been happy with it so far (even after diving down some of the more technical rabbit holes). The packages available are extensive. So far I've mostly been looking for command line stuff, because that's where I live most of the time so YMMV.

You probably will want to install either Bash or ZSH (as I implied with my installation example), because ... seriously? CSH or TCSH as the defaults? They're ancient, under-featured and possibly buggy. The only excuse for using them is (I suspect, I didn't research this) that they're both BSD-licensed (Bash and ZSH are GPL).

Once I had Wayland going, I found out that Barrier installed easily, ran fine, connected to my server fine, and ... didn't work. Barrier is an X11 application, and can't work with Wayland. Which leads to another discovery from this voyage: Barrier is mostly abandoned in favour of its fork Input-Leap, which was/is meant to do the same thing, but with Wayland as well as X11. Three years later, that Wayland functionality is still somewhere in the hand-waving future.

Don't get me wrong: I get that these are Open Source projects, and the people that work on them generally do so for free. And I'm glad they're working on this. But I think I'm still allowed to be frustrated that this known functionality doesn't yet exist. Unfortunately, I have a multi-computer, multi-screen desktop, and Barrier is essential to its functioning. Which means ...

I installed X11 and Openbox. And during the X11 install, I stumbled on a problematic omission in the documentation. They explain that you should install the "drm-kmod" package and add the "i915kms" kernel module to the "kld_list" (if you have Intel graphics, as my machine does). But nowhere did they mention installing the "xf86-video-intel" package: this seems like a fairly serious omission because even if the documentation isn't platform-specific, the Intel video packages pretty much are platform-specific. And my X11 didn't work until I did extra-curricular research and found and installed "xf86-video-intel."

The next big PITA was getting the Dvorak keyboard working in X11. It was a breeze to install at the console, I selected it as part of the install. And it was fairly easy with Wayland (although that's a bit tricky - you have to do that for each specific compositor and each one of them handles it differently). But I never figured it out for X11. I tried both adding /usr/local/etc/X11/xorg.conf.d/30-keyboard.conf and specifying an "XkbVariant" in there, and changing the keyboard layout once Openbox was running with the setxkbmap command. Neither worked: the former failed silently (umm, okay, I haven't looked at the logs), the latter complained in a way I assumed meant it didn't have the actual keyboard files. But I never proved that nor did I find a package including keyboard files for X.

What happened in the end was I hooked the new FreeBSD-X11-Openbox up to my Barrier server ... and found out that when the pointer got to the FreeBSD screen, it honoured my existing keyboard layout (because I have a hardware Dvorak keyboard). So I've stopped worrying about that for now.

Conclusions

Not getting to use Wayland ongoing is a significant disappointment. This is because of my personal setup and requirement for Barrier, but it makes the machine less useful to me (I am, after all, the maintainer of The Comprehensive List of Window Managers for Unix (I have to change that name to include "Compositors" because it does ...). I also use Suspend-to-RAM heavily, and what little I can find on that subject suggests that this is rarely functional for FreeBSD, and even less likely to work if you have X running. That always-on behaviour is okay for servers and Raspberry Pis, but it's kind of a show-stopper for laptops. This is a low power PC that I don't mind turning off, so I'll get by ...

The end result is a couple disappointments, but an OS that I can manage fairly easily. It remains to be seen if the OS will fill any niche in my life that wouldn't be better handled by Debian, which I'm more familiar with.