--- title: "Friendship ended with GNU/Linux, OpenBSD is my new best friend" date: 2022-07-31 lang: en categories: [ blog ] tags: [] translationKey: "2022-07-31-trying-openbsd" --- ## Previous experience with openBSD I tried to revive my old machine a while ago with various Linux distros---Debian, Alpine, Void, but none quite sticks. Graphics wasn't its strong suit. I don't know how it came to be, I was sure 8 years ago it could render stuff just fine. Now even typing on tty feels sluggish. I even remember being able to play Skyrim on it. I decided to turn it to be a server instead. I don't find Void to be fitting for server, nor any other rolling distros. So I'd install something else on it. I could install NixOS, but installed openBSD instead, since it has [honk][honk], a fedi software I was thinking of hosting[^1]. To my surprise, it was quite neat: typing feels much more responsive than any on other Linux distros I tried before, and startx works out of the box with the pre-installed FVWM (not a big fan of the WM, but it's quite easy to get used to). The OS is said to be friendly to old machines, after all. Another thing I like about openBSD is the installation process. While not 100% non-tech friendly like Debian, installation is quite straightforwards with a series of questions. After installing NixOS on my laptop twice, I really appreciate not having to partition disks and configure boot manually. [honk]: https://humungus.tedunangst.com/r/honk ## New computer, new troubles Yes, I bought myself a new computer. I'd rather have my laptop reserved for carrying around and my old machine as server only. The price for the set was acceptable, but I was a bit annoyed that they stole from me the joy of assembling it and tainted it with Windows *cries*. Anyways, I digress. I planned to keep on NixOS: with a configuration file, replicating the settings and packages would be quite simple. Except when it doesn't. I don't know why, but the boot stucked at loading initrd. I guessed it might be some bug of systemd-boot (which [NixOS manual][nixos-manual] states that I *must* use for UEFI, and [legacy boot is not available][no-legacy] as I don't have a dedicated graphic card). [nixos-manual]: https://nixos.org/manual/nixos/stable/index.html#sec-installation-installing [no-legacy]: https://lr.vern.cc/r/ASUS/comments/s68b25/psa_enabling_legacy_boot_aka_compatibility/ I tried booting into its cousin [GNU Guix][guix]. It can boot nicely without any trouble. What it couldn't is loading graphical interface properly: unlike NixOS, Guix doesn't provide an option to use `startx` for starting X, but rather push me to use gdm instead, which just shows a black screen for me. I tried several off-manual guides from mailing lists to forums---someone else surely had the same problems as me. None of them worked. Looking into the log, it says something along the line `cannot load module fbdev... cannot load module vesa`, even though I installed those xorg modules. Does that sound like a driver issue? I thought integrated GPUs are supposed to work out of the box. Anyways, I forgot to dump or screenshot the logs in both case so no post-mortem for y'all. [guix]: https://guix.gnu.org/ I also tried Gentoo (why?) and that seems a bit too much. It's not as intimidating as some people might make it out to be, but it still takes to much time for me. I guess I'm just lazy now and install something straightforwards like OpenBSD. ## The good Aside from everything just works, here are some extras I like about it: - Accidentally closing tabs will trying to `^W` some words is no more: Ctrl+W behaves the same way as in terminal. But then, so does Ctrl+A: it moves the cursor to the beginning instead of selecting all. - SSHD enabled by default. I don't use this much but it can be handy. - Packages have its own README to let users know something not detailed in the manual - Bug reporting is builtin (`sendbug(1)`), so I don't have to lookup some mailing list or creating yet another account in a bug tracker. ## The bad Admittedly, I find more annoying stuff than I liked: - UTF-8 is available, but not enabled by default. If some characters are not displayed properly in your terminal, try setting `LC_CTYPE="en_US.UTF-8"` in your `.profile`. I couldn't import GPG at first because of this and mistakenly thought it was because `vi_VN.UTF-8` was missing. - Sound control is via `sndioctl(1)`, which is supposed to be available to non-root users, but instead it `default: can't open control device`'d me. [daemon forums][forum] says I'd have to add `staff` and `operator`, but it doesn't work either. Also, [polybar doesn't support it][polybar], but it's not their fault. - Limited file access. This I can understand for security reason, but sometimes it's just annoying not being able to open some folders. KeepassXC integration also doesn't seem to work because of this, even though I followed the README and added to the unveil. - Limited file descryptors. This breaks syncthing and anything that watches files, like a development web server or static site generator in live-rendering mode. - Default shell is Korn (ksh), which doesn't have much completion, particularly git completion. Typing the whole commands out can be tiring. - Some packages are not available. In particular, nheko, the best native matrix client I've found so far, and dictd, the dictionary server. The former is just added and probably will be available in the next release, but the latter has been packaged for years and I have no idea why I can't install it. Nonetheless, I am sticking with this for a while and gonna update some more. (Despite the title, I'm still using GNU and Linux. Linux is on other machines, and bash and dico on this machines are also GNU.) [forum]: https://daemonforums.org/showthread.php?t=11402 [polybar]: https://github.com/polybar/polybar/discussions/2753 [^1]: Couldn't, though, since my ISP block HTTP(S) ports. There are some workarounds but I haven't got time to do yet.