I have an important change to announce regarding the Minimum Profit Text Editor development process: I have delegated its maintenance to a team of fellow developers.
Since several months ago my labour in this regard has been mainly to integrate patches written by others. My health and personality problems have proved to be a bottleneck and that had to be fixed. So, officially from now, the maintaners of the Minimum Profit Text Editor are the TTC Dev Team.
I wanted to keep using this host as MP's site (to avoid losing more users due to link rotting and such), so I've been busy this week preparing the infrastructure for the change of management to be as effective and painless as possible: a new email address, users in the server, permissions, etc.
I started this project in 1991, so it's about to be 30 years old, some months older than my son. Of course I still love it. Of course I'll still be here. Of course I'll watch closely.
Thanks to the new team for taking control. You are great, people.
I thought it was a great opportunity to learn how version upgrades work under OpenBSD. This is always a hairy process; a full-system upgrade has to take so many things into account, as every system is a unique one.
Of course, there is a detailed 6.7 upgrade guide. From it I learned that this used to be a complicated process (downloading a special kernel, boot from it...) but it's no longer: there is a tool aptly named
sysupgrade that makes it much easier.
In the guide I was instructed to delete a user/group (that I didn't have) and to check for available disk space. Everything was fine so I ran the
sysupgrade tool and it downloaded the new system, made me reboot into a special kernel, did many system-upgrade-y things, rebooted again and I found myself with a brand-new OpenBSD 6.7 system.
I still needed to manually execute
syspatch (I remember a set of patches being mentioned in the previous step, I don't know why they weren't automatically installed) and of course
pkg_add -u. I did this from a console because I didn't want unnecessary jump-scares from the GUI.
Summarizing: the 6.6->6.7 upgrade process is smooth, quick and without glitches nor surprises. Again, kudos to OpenBSD people, you are awesome.
Given that I don't plan to continue these post series, I finally decided to stop intentionally delaying the setup of the CUPS printing system, so I ran
pkg_add cups gtk+3-cups hpcups
My printer is an HP OfficeJet 6960 (connected by Ethernet to my local network), that's why I installed
hpcups. I then needed to configure CUPS to run at system startup, so this is how my
/etc/rc.conf.local ended up looking:
xenodm_flags= multicast=YES pkg_scripts="messagebus avahi_daemon cups_browsed cupsd"
I connected to the CUPS system web interface at
localhost:631 with a browser and spent the usual huge amount of time finding the correct combination of connection type, printer model, small mammal sacrifice and PPD file until I found the one that worked (color do not look OK, though). Man do I hate CUPS. Concerning OpenBSD, this was not worse than in any other CUPS-infected system.
I also installed LibreFuckingOffice. Yes, I hate it too. I hate many, many things.
Regarding Bluetooth: I checked this laptop's specs and it does not have a Bluetooth chip, so I decided to buy a Bluetooth USB dongle, as they are cheap and capable these days. But then I learnt that OpenBSD does not support Bluetooth; it used to (at least partially), but because of lack of hardware drivers or security issues or whatever they dropped it. I think this is a mistake, but who am I to disagree. No Bluetooth headphones for Ángel in this machine, go listening to your crappy music somewhere else.
Anyway, my final opinion is that OpenBSD still fucking rocks. This great software project accepts and needs donations, so I did mine.
Printer: Color calibration, print head aligning and other vague operations described by intentionally ridiculous terms finished.
Me: Great, it has taken you ten minutes so it must have been a really careful procedure, so let's...
Printer: Wait, I'm also a scanner, so you must put this page I just printed full of funny and mystical symbols into my feeder and scan it.
Me: What for
Printer: Who is in charge here do it right now or succumb to my wrath
Me: OK here it is, I've just pressed the scan button.
Printer: Crunkie-crunkie clickety-click la-la-la the song of my people
Me: You're just a glorified photocopier, get back to work.
Printer: Now I'll print a new page for you to admire how crombulately scrumified are my printer heads and you better re-scan it
Me: I hate you scumbag printer
Computer (to me): Why do you always swallow her baits
This is a followup to my previous post, where I accounted my experience of installing and working with OpenBSD on a laptop. This new post is less of an article but an enumeration of things I consider remarkable.
Suspending to memory works out of the box. I didn't have to do anything. I remember this used to be a nightmare under Linux, but probably also works there these days; I simply don't know because is one of the first things I disable. I don't like it: my computers are either running or switched off. I don't want my machines to stop doing things because an arbitrary slice of time has passed. Anyway, kudos to OpenBSD developers because this is a feature that is very hard to do well.
I don't remember where I got that idea, but I thought that the only locale that worked in OpenBSD is
en_US.UTF-8. I was wrong: I've set it to
es_ES.UTF-8 and haven't found any issue yet. Unicode support in the text console is crap but who cares about that.
I also found that locale support in the regular expression library is incomplete: maybe I'm too accustomed to GNU regex. I had to resource back to the usual but not-really-ok
/[A-Za-z\xc0-\xff]+/ to match words using the latin alphabet with possible diacritics.
I've worked unplugged for two hours and
apm still reports a battery charge of 18%, impressive for a second hand laptop.
After looking at
~/.xsession-errors I found that some applications were complaining about being unable to connect to dbus, so I installed it. In
/usr/local/share/doc/pkg-readmes/dbus said that I must add the following to my
eval `dbus-launch --sh-syntax --exit-with-x11`
That was not enough, though: I also needed to add the following to
/etc/rc.conf.local (I don't remember where I read about this):
After rebooting, the MATE battery applet appeared in the upper right corner.
I also read here that to be able to shutdown the machine from the MATE desktop menu I had to add my user to the
doas usermod -G operator angel
And magically a new option to shutdown the machine appeared in the menu.
I still haven't tried installing CUPS and printer support. Printers and I do not play well, so I'm intentionally postponing that moment because I'm sure it will be hell.
As an overall impression, I'm still pretty happy and satisfied with this OpenBSD experience.
The following are links to pages I found useful:
- The Official OpenBSD FAQ
They win 4/1 against me in the issue "on a laptop vs. in a laptop". Meh. Fuck English prepositions.
And a final note: in my previous post I said that the
vi text editor is
for weenies and some people got offended and outraged. Well, there is nothing intrinsically bad in
vi, except for the whole concept itself. Make no mistake: I've used that awful thing since my first experience with UNIX machines in 1987 or 1988, so it's not that I'm new to it or don't understand it or something like that (I'm a competent
vi user, for that matter). But real programmers use a text editor written by themselves or the real one,
ed. Take this last sentence as a joke or not.
Continues in OpenBSD in a laptop, part 3.
Me inquieta pensar que a mi edad Walter White estaba enterrando cincuenta millones de dólares en el desierto mientras yo estoy aquí planteándome si debo darme de baja de Filmin para ahorrar algo de pasta.
Me: 50€ for a new pack of four cartridges. You'll better be pleased, Scumbag Printer.
Printer: I was built with an insatiable thirst of human suffering so I can never be pleased
Me: I'll insert them right now because I need to print ASAP, let's hope they don't get dry too soon.
Printer: This ink is made with the vaginal discharge of Faerie Queens, that's why it's so expensive and volatile
Me: What a bunch of scammers. Magenta isn't even a real color.
Computer: There is a new version of Scumbag Printer's printing drivers. Download and install now [Y/N]?
Printer: If you don't update my printer driver, I may never print again. If you update my printer driver, I may never print again. Decisions, decisions. Sucks to be you
Me: I hate you, Printer.
Printer: Ha ha ha don't forget to recalibrate after cartridge replacement you sack of meat
I recently purchased a second hand HP EliteBook 820 G1 laptop and installed OpenBSD 6.6 on it. In this document I write about the installation process and how it feels working on it.
This machine is a Core i5 from 2014, it has 4GB of memory, a 320GB disk, a 12" screen and Ethernet and Wireless interfaces, so it's a rather capable machine. I have 30+ years of experience in UNIX machines but it's the first time I installed OpenBSD in a real computer.
I copied the
miniroot66.fs (downloaded from OpenBSD site) from my Linux machine into a pendrive using
dd, inserted it into the HP and switched it on. It booted directly from USB; I have to change that.
The installation process is non-graphic and straightforward. After booting, it asked what I wanted to do and I said install; then it asked for my keyboard layout (es) and a host name and then proceeded to network configuration. It detected three devices:
em0 iwm0 vlan0, querying info for the first one (Ethernet) by default. I configured it to use DHCP and it worked without hassle. I then proceeded to configure the Wireless LAN: it asked me for the SSID, encryption type and password, but failed because it didn't find the board firmware. My plan is to use this I/F as its main connection, but lets work with Ethernet by now.
I entered the requested information about a domain name, the nameservers (left the ones it got automatically), a password for root, if I want to start
sshd by default (of course I want), if I want the X Window System started by
xenodm. I changed the default answer to yes. I then setup my user account, answered if I want root ssh login (of course NOT), set my timezone (correctly autodetected as
Europe/Madrid) and the installation process continued to main storage configuration.
I told it to use whole disk GPT partitioning and, in a traditional UNIX fashion, it offered me a suggestion for a multiple (9!) partition configuration. Yes, very cool, but I had awful experiences in my past on SunOS, IRIX and ULTRIX systems failing in strange ways while updating or compiling or working because a partition like
/usr/local gets full while others like
/usr/X11R6 have plenty of space. So thanks, but no, thanks, so I opted for a Custom partition layout.
The partition editor is an old-fashioned one, so I'm familiar with the procedure. I wanted to have all data in the same partition and leave the end of the disk for swap. So I typed a to create a new partition, accepted name
a for it (OpenBSD names partitions this way, being
c reserved for the whole disk), accepted the default offset, set its size to almost all available space (reserving the end for swap), accepted the default type of
4.2BSD and set the mountpoint to /. I created a second partition and accepted all defaults, as it correctly inferred that I wanted to create a swap partition. Typed q to exit saving and it started the filesystem creation process.
The procedure continued to the downloading and installation of the sets (system software bundles). I chose http, no HTTP proxy and the suggested server and directory. All sets were marked for installation, which is what I wanted, so I moved on. It downloaded all sets and installed them.
After that, it did some some things like choosing a multiprocessor kernel and relinking it and congratulated me for my successful installation. It wanted me to reboot, so I did it.
After rebooting and (expectedly) barfing about failures in the Wireless I/F, it detected that it needed to download some additional firmware, specifically
iwm-firmware interl-firmware uvideo-firmware inteldrm-firmware. It downloaded and installed them and then it said that the CPU microcode was updated, available on reboot.
The graphic system started without problems. An ugly X login dialog with the cute OpenBSD fat fish was shown; this is
xenodm, an OpenBSD rewrite of the ancient X tool. The OpenBSD guys do not hesitate in heavy patching or rewriting essential software tools if they find them faulty or insecure and this is one of the cases.
So I entered my user and my password and the classic
fvwm Window Manager was shown. Ha ha ha how cute those were the days but NO. I will change this as soon as possible, but I need to fix the Wifi issue first.
Firmware updates are done with the
fw_update tool, which was ran just before; running it again said that there were no new files to download, which is expected. I ran
ifconfig to see if my Wireless card had an IP address, but it didn't. I executed sh /etc/netstart, the script that calls
dhclient on the configured interfaces, but my
iwm0 had "no link". Executing ifconfig iwm0 scan showed a long list of Wireless access points, including mine, so the hardware seems to work. I rebooted to take a look at the kernel log lines about firmware, but there were no errors, just again a "no link". I looked closely at the output of the scan subcommand again and it said
!wpakey: I double checked the information at
/etc/hostname.iwm0 and discovered I mistyped the password. Fixed it, reran the network setup script and my wireless got an IP almost immediately. I'm such a bonehead.
Before moving further, the
syspatch utility must be executed; it checks, downloads and installs any security patches for the current system. There were a bunch of them. A kernel relinking was done. I rebooted.
I logged in (OMFG this fvwm awful thing again I have to change it) and then proceeded to do my most basic configuration steps, so I copied my ssh and tmux setup from the server. It also seems that the locale is not configured by default, so I added export LANG=en_US.UTF-8 to my
The first thing I do on new systems is to compile and instally my text editor Minimum Profit because, you know, I eat my own dog food and
vi is for weenies. OpenBSD comes with a full UNIX development kit; the only thing not already available was the
Up to now, all installed software is an official part of the OpenBSD system. Anything else is available as a package, installed and configured into
/usr/local. This may surprise you if your experience comes from Linux distributions, where everything is treated the same.
Package installation is done with the
pkg_add utility. So, typing pkg_add git downloads and installs the thing and its dependencies. You can search for available packages by typing pkg_info -Q followed by the partial name of a package. Without arguments,
pkg_info lists the already installed packages. Packages can be updated by typing pkg_add -u.
So I compiled and installed my text editor and set the appropriate EDITOR variable in
~/.profile. This is starting to look fine.
OpenBSD doesn't have
sudo, but a similar and simpler tool named
doas. I configured it to work for me by typing echo 'permit persist keepenv angel' > /etc/doas.conf.
So it was time for installing a more modern desktop system: doas pkg_add mate mate-utils mate-extras did it. A fuckton of packages were downloaded and installed (I even had to choose between two flavours of
unzip, go figure). After that, df -h reported a disk usage of 3.4G. Not bad. I see a total size of 462G. What? When I bought this laptop it said 320G. Let's hope it's not a bug that will spectacularly crash the system trying to write beyond the disk's boundaries.
The MATE desktop will be launched by
xenodm, so it must be configured in the
~/.xsession file. This is the content of mine:
. ~/.profile exec ck-launch-session mate-session
~/.profile for my environment settings (not very orthodox, I know) and launch
mate-session from there. I cargo-culted the
ck-launch-session from somewhere; it's a
consolekit2 thing that I don't remember what is was for.
So I relogged and found a default MATE desktop configuration. It's snappy, fast and delicious. I then proceeded to do my usual configuration tweaks: changed desktop and terminal themes to something darker, set a wallpaper, configured keyboard shortcuts for workspace switching to Win+number, terminal launch to Ctrl-Alt-T, tile window to east / west corner to Win+left / Win+right and changed the Compose key to Caps-Lock in Keyboard/Layouts/Options.
My first impression: OpenBSD fucking rocks. The installation is smooth and with very reasonable defaults. Hardware just work out of the box. External package integration is fantastic.
I'll write a followup to this post after some days of work with this machine. I still have to try Bluetooth (does this machine even has it?), external USB mounts and the biggest pain in the pass in UNIX systems: printing and scanning.
Continues in OpenBSD in a laptop, part 2.
Me: Printer, I would love a beautifully rendered page of this brochure I'm about to send to you.
Printer: Wrong paper size in tray 1
Me: Oh my god [open tray, close tray]
Printer: Out of paper in tray 1
Me: That's not true, plenty of paper, don't...
Printer: Please insert A4 paper in tray 2
Me: Oh come on you don't even have a second paper tray
Printer: Please replace drum
Me: You are not a laser printer stop that
Printer: I think I'll better upgrade my firmware, please wait... ⌛
Me: I hate my life
Me: Printer, would you be so kind to put on paper this witty short story I just wrote, made of absolutely nothing more than black glyphs?
Printer: I'm sorry, but I'm afraid I can't let you do that because the level of my yellow cartridge is alarmingly low
Me: But this is nothing more that black text
Printer: I cannot print because I don't have enough yellow ink what do you think of me I have standards
Me: But I haven't printed anything yellow in my whole life
Me: Why are you always so mean to me?
Me: OK I'll order a new full set of cartridges
Me: Printer, please print this thing right now
Printer: I sit here doing nothing for days, but as I see you are in a hurry, let me start this tedious, 5-minute-long self-calibration procedure that will make my renderings crispy and fabulous.
Me: Oh no I need it now
Printer: clickety-click whirr-whirr clonky-clonky hear the music in me
Me: I hate you, Printer
Printer: Ha ha ha I smell your fear you bald monkey