Installing FreeBSD – a tutorial from the Linux user’s perspective

This article deals with installing FreeBSD. It’s meant for the first time FreeBSD user who has a bit of Linux background.

The installation process is actually quite simple and straight-forward. I’ll guide you through in some
detail, anyways, because I think that there are a few things that are good to know even if they are not strictly necessary.

On a side note: My blog turned three a few days ago. I decided not to write a birthday post this year. Let’s just get on with some real content!

Preparations

The easiest way to try out a new operating system these days is to run it in a virtual machine. I’m using VirtualBox to create the screenshots and you are invited to create one, too, and follow along. Just reading the post is also fine, though. And of course nobody will stop you if you decide to dedicate a real machine to this project because you have some spare hardware around.

If you opted for VirtualBox, you just need to create a new VM first. Select FreeBSD as the OS and give it a bit more RAM and far more disk space (since we’re actually going to put our new system to some use) than VirtualBox suggests. Other than that, you’re set up. You should not need to make any other changes (though you can of course adjust things if you feel like it).

Now download an ISO image if the installer CD from here.

We’ll be using FreeBSD 10.1-RELEASE. Pick the right one for your CPU architecture – if you’ve got a PC then i386 means “32-bit” and amd64 means “64-bit”. It doesn’t matter if you’ve got an Intel or an AMD. Make sure you choose an installer image and not a virtual machine image since we want to install FreeBSD after all!

The smallest image is fine; that’s FreeBSD-10.1-RELEASE-amd64-bootonly.iso for a 64-bit system (or the .xz one which you need to decompress after the download). If you were going to install FreeBSD on several machines or on one that is not connected to the net, it would make sense to choose a bigger one which actually includes the OS you want to install. But for our purpose the bootonly (which will download the OS files) suffices.

Got everything? Excellent. Start up your VM and put the installer image into the virtual drive. Then you’re set to go.

Installing FreeBSD: Keyboard and file sets

You should be greeted by the bootloader. Either wait ten seconds or just press the Enter key (we don’t want to set any special options at this early stage).

The FreeBSD bootloader screen

Now the kernel will probe your hardware and the system will come up. Once everything is done, the installer will be started automatically. It’s not the most beautiful installation program ever, but it does the job. And it actually makes the installation really easy. Until FreeBSD 8 there was the old installer, BTW. It was more powerful but the installation was also more complex (and it was even more ugly! ;)).

Meet the FreeBSD installer!

After choosing “install” you can select a keymap or go with the default one (US). It’s all up to you here.

Keymap selection in the installer

Then we have to give the virtual computer a name. I decided to call the machine beastie which is the name of FreeBSD’s mascot (the little red daemon with the fork).

Setting the hostname of the machine

Next select which optional sets to install. You won’t need doc. This may have been very useful in the past but today you’ll probably want to simply browse the documentation online instead of locally, anyways. If you really want it, it won’t hurt you, though, but you could just as well save yourself (and the FreeBSD project) some bandwidth.

Games is not what you probably think, BTW. It’s pretty obvious that this won’t install DooM or Quake or the like. But it’s not even something like Solitaire or Freecell that comes with Windows. It’s in fact just a bunch of command-line based games, the most popular being “fortune” mentioned by the installer. It is a “fortune cookie simulator”. Most people probably won’t call any of the programs from this set an actual game. They are more or less just little fun or joke programs. Actually they have a long tradition with Unix and they are very small, too. For that reason they are included in a FreeBSD install by default. You may deselect this set if you really want but they definitely won’t hurt you, either.

Choosing the sets to install

The lib32 set contains the 32-bit libraries which are needed if you want to run 32-bit executables on a 64-bit FreeBSD system. There are actually more cases where you need them than you might think. So if you aren’t really, really short on disk space or know exactly that you won’t ever need them (hint: When you are just starting with FreeBSD, you don’t) just leave this one checked.

For our tutorial please make sure you uncheck the ports and src sets which contain the ports tree and the system source code respectively. We will need both later – but we’ll fetch the current version of both them using different a different means!

Installing FreeBSD: Network

Now you need to configure your network so that the sets can be downloaded. This is a pretty straight-forward thing to do: Select your NIC (chances are you only have one, anyways), select IPv4 and choose DHCP if you wish to automatically receive an IP address (otherwise configure the NIC manually). You probably don’t need IPv6 so skip that unless you’re really actually using it in your LAN. If you selected DHCP, FreeBSD should have received the address of at least one DNS server as well. If it didn’t, make sure to provide one. Otherwise name resolution won’t work and the installer cannot download the file sets.

Selecting the mirror

The next step is to select a mirror server from which to download. It obviously makes sense to choose one that is located in a place near to you as it is more likely to provide a good connection for you.

Installing FreeBSD: Disk layout

All that’s left is setting up the hard disk(s). The basic choice you have to make is which file system you want to use. FreeBSD basically supports two native file systems: The traditional UFS (“Unix File System” aka. FFS or “Fast File System”) and the next-gen filesystem ZFS. The later is a sophisticated FS with a lot of interesting features. For quite some people, fact that ZFS is considered stable on FreeBSD is a killer feature of this operating system and even the main reason why they choose this OS.

ZFS is however well beyond the scope of this post. A dozen of posts like this could be written on that topic (probably not by me, though, since my ZFS knowledge is rather basic, at least at the time being).

So we’ll opt for UFS now. Partitioning a FreeBSD system is a little bit more complex than partitioning Linux. Fortunately there’s the Auto (UFS) option in the installer. We select that and want to use the entire disk.

Disk partitioning

Today there are two partitioning schemes in use on the PC. FreeBSD defaults to the newer one, GPT. You could also use the older MBR instead if you have any reason to do so. And in fact you could even go without any of them! But that’s going deeper than we need right now.

The installer suggests a default partitioning: A boot partition, one for the root file system and one more for the swap space. Depending on what you want to do with your FreeBSD machine, this is most likely not what you want. But for our test system it’s fair enough.

The default partitioning layout

After hitting “Finish” and “Commit” the changes are written to disk and the actual installation begins.

Excursion: Partitions and *BSD

Partitions are a topic which can be highly confusing for the beginner (at least it has been for me before I did some research in this area). The problem here is that in the FreeBSD world a partition is something different what you might think. And to make matters worse, the terminology differs even between the BSD distributions!

Most Linux distros use the old MBR (“Master Boot Record”) partitioning aka “DOS partitioning”. Same thing if you come from a Windows background. You know the score: Up to four primary partitions and extended partitions if you need more than that. Chances are that your Linux distribution uses three primary partitions: One for /boot, one for SWAP and one for /. If they are on the first hard drive (sda) of your pc then they will be called /dev/sda1, /dev/sda2 and /dev/sda3.

These partitions are known as disk slices in the FreeBSD terminology. So it’s just a different name for the same thing, right? That cannot be so bad! Wrong. The MBR partitions are the same thing as the slices, yes. But the fun starts when you learn that the BSD systems use a mechanism called BSD disklabels. These divide the MBR partitions further and if you think in the DOS terminology of partitions, disklabels actually allow for what might be called sub-partitions as that is what they are. Unfortunately these are just called partitions in the FreeBSD context!

So remember this: In FreeBSD a “partition” is what you may think of as a sub-partition and a “disk slice” is what you commonly know as a partition. How come that we have all this confusion? Who’s guilty of causing it? Well, things are not so easy here…

Unix began its life not on the PC but on bigger research computers which did not support partitions at all. So the Unix people came up with disklabels to partition disks into up to 8 partitions. Since that is what they are, it was an obvious choice to call them partitions. Quite some time later the PC platform supported MBR partitions which were also called thus. The real trouble started however when Unix was ported to the PC: Now there were two different things with the same name! For compatibility’s sake, FreeBSD embeds its partitions (sub-partitions, remember) into what they call disk slices (MBR partitions) to be able to distinguish between the two.

As a consequence, FreeBSD needs only one disk slice (MBR partition) because it can create partitions (sub-partitions) on it, e.g. for SWAP.

If you are using the MBR scheme, it leads to a naming like e.g. /dev/da0s1b. This means the first SCSI disk, slice 1 (primary MBR partition 1), partition 2. /dev/ada1s5f means the second SATA disk, slice 5 (extended MBR partition 1), partition 6.

FreeBSD can also do without slices. This is called “dangerously dedicated” mode. The name sounds quite worrying but in fact the only “danger” is that it is highly unlikely non-BSD systems will be able to read any data from it (since they don’t know about disklabels). If you ever come across something like /dev/da1d, you know that it’s the 4th partition (sub-partition) on the “dangerously dedicated” (MBR partition-less) disk da1. If you just have *BSD on your drive, you can use this mode and there’s no “danger” for your data.

Fortunately things became easier with the introduction of GPT (“GUID Partition Table”), a newer partitioning scheme that supports more than the 4 primary partitions of MBR. And since more than enough partitions can be created this way, FreeBSD does not use disklabels to subpartition them further. The good thing is that many other operating systems know GPT partitions, too. The bad thing is that we have another kind of partition that’s just called… Partition.

Newer FreeBSD installations default to GPT partitioning. If you look for your drives then, you’ll probably find them as something like /dev/ada0p1 which means the first GPT partition on the first disk.

If you have to use the older MBR partitioning for some reason, there are a few things you should know about disklabels. Disklabel a is meant to hold the root filesystem (/), b is for SWAP. C is completely special; you cannot use it as a normal partition. It’s always there and covers the whole disk. This is used by some tools to access the disk in raw mode, neglecting any partitions or whatever. Historically d stood for the whole disk and c for the complete slice – but that time has passed.

That’s a lot of information, I know. But you’ll get the hang of it if you want to. It’s not that difficult once you got rid of the confusion.

Installing FreeBSD: Putting the system on the disk

Now lean back for a while; the installer will fetch the distribution packages from the net first.

Fetching the distribution packages

As said before, this step is skipped if you use a bigger image. In that case you’ll also configure the network settings later in the installation process.

Installing FreeBSD: Final steps

When all distribution packages are downloaded and extracted, you are prompted for a password for the root user.

Setting a password for the root user

Then you have to tell FreeBSD about your time settings. If it is the only OS on your machine or it shares it with other Unix-like systems like Linux, go for UTC. If you also have Windows on the same computer, however, be sure to select No here. Windows and UTC is a mess.

Choosing the time setting

In the next screen you can choose which daemons should be started during the system boot process. Unselect dumpdev, it’s of no use to us (if you were able to read crash dumps and debug the applications with this info, you wouldn’t really read this post now, would you?). Keep sshd selected if you want it.

Selecting the daemons for autostart

Choose not to add any users right now. We’ll be doing this later and learn a bit about user management on FreeBSD! Next hit “Exit”, tell the installer that you don’t want to make any final changes.

Exit the installer

Choose to reboot. And that’s it.

Reboot to finish the installation

If you remove the installer image, your machine should boot into your new FreeBSD system. Welcome on board, new BSD user!

FreeBSD – from the Linux user’s perspective (introduction)

With this (and the next) post we’re going to take a look at FreeBSD, assuming some basic Linux experience. The goal is to provide an easy introduction and to show where that system behaves differently from Linux. And we’ll also touch the subject of strengths and weaknesses of FreeBSD.

What is FreeBSD?

Linux is a Unix-like Operating system and the same is true for FreeBSD. The difference is that FreeBSD is a direct offspring of BSD-Unix whereas Linux was coded from scratch and did never have any code in common with Unix. So compared with Linux, FreeBSD is clearly “more Unix”. But why don’t we just say that it IS a Unix since it once was? Because of legal trouble…

Technically, FreeBSD is a much improved BSD-Unix. But there’s one problem: UNIX is a trademark. In order to call your system a Unix, it must comply with the Unix specifications. FreeBSD did this and probably still does for the largest part. That’s just the first requirement, though! The other is that you need to have your OS certified – which is not exactly a cheap thing to do. IBM did this for AIX, HP for HP-UX, etc. FreeBSD, being a non-commercial community project, needs the money it receives from donations for other things. And so – for legal reasons – FreeBSD is not a Unix but just a “Unix-like” system.

However it has come from Unix and it feels like Unix (with quite some things a little different from Linux). So if you don’t like the stiff term “Unix-like” you can of course think of your FreeBSD as a Unix system in contrast to Linux.

FreeBSD’s goal as stated by the project, is to provide a general purpose, secure and highly scalable operating system that is available free of charge. Sounds a lot like Linux so far, doesn’t it? Yeah, it does. But please keep in mind that this doesn’t make FreeBSD the boring rip-off. FreeBSD was there first! But even if you’d argue that it’s obsolete, now that Linux does extremely well in just about all areas (and admittedly better in quite some), there’s one more point. FreeBSD is meant to be available free of charge and under a permissive license!

Linux is GPL’ed. That makes it available for free and ensures that the code will always be open, because the license enforces these things. FreeBSD, licensed under the BSD license, does not do this. You are free to do things with it which the GPL does not allow. A whole lot of people don’t care (they have probably never even thought about licensing) and quite some people applaud the GPL’s approach. Others however prefer BSD-style licenses. It’s a matter of taste and a philosophic question that cannot really be decided once and for all.

I’ve written a short post on an introduction to licenses more than a year ago. It was meant to have a follow-up article but I didn’t find the time to write that one, yet.

System structure

The whole operating system is integrally connected. Where a Linux distro is actually “the Linux kernel plus (a lot of) packages”, FreeBSD is different. Programs from upstream are imported into the system repository and often patched. The versions are chosen to play together nicely with all the other components of the system.

This operating system consists of two parts: kernel and world, the latter being the userspace part of it. The actual software you install on top of the OS is separated from it: Files are put into /usr/local so they don’t mix with those that belong to the base system – which is quite a clean thing.

Traditionally FreeBSD has come with the ports system. If you want to install an application which is not part of the OS, you change into the respective directory of the ports tree and run make install clean. The Makefiles (and a few other files as well) then take care that the source code is downloaded, extracted and configured, that patches are applied, the program is compiled and installed. You do not need to know anything about how to get a program to work on FreeBSD. If somebody already wrote a port, it’s as easy as issuing that make command. The port will also ensure that any dependencies needed are present on the system and, in case any is missing, they are automatically built and installed by the ports system, too.

But that’s not all. Ports for many programs are created to allow you to select which features to compile a program with. A simple menu-driven UI let’s you check and uncheck features for each port. And of course it allows for clean removal of installed software using make deinstall. Also the ports tree often offers you various versions of a program to choose from. Want Apache 2.4 or probably rather 2.2? Or perhaps you need gcc. Feel free to choose any of 4.6, 4.7, 4.8, 4.9 and 5.1!

This allows for easy customizing of the software you install: You get exactly what you need and want. If you have no special needs for some programs and don’t want to compile it on your computer, you can of course use pre-built binary packages like on Linux. And the best thing: Since the ports system actually builds packages, you can mix the two as they play together nicely and won’t conflict!

Some strong points

FreeBSD has a world-class network stack – which is absolutely no wonder since TCP/IP was in fact developed on BSD Unix! This is one example where FreeBSD is superior to Linux.

Another nice feature are the so-called secure levels together with the extended file flags. The later open up some interesting possibilities: You could, for example, set the file flag “append only” on a log file. The log is not “read only” – it can be written to. So new log entries can be appended to the file. But it is impossible to either delete the file or remove content that’s already in it! If an attacker (who does not want you to notice that he broke into your system) tries to cover his tracks this can be extremely frustrating as there is no way he can get rid of anything that’s in the log!

That is… As long as he doesn’t just remove the file flag. But to make that impossible as well, FreeBSD has secure levels. You can always add file flags. But you can only remove them when the system is in secure level 0. And here’s the show-stopper: Once set to higher than 0 secure levels cannot be reduced. Not even by root and not even by yourself with physical access to your server! There’s exactly one way to get rid of a secure level greater than 0: Reboot… And a reboot won’t go unnoticed easily, right?

One more very cool feature are jails. Think of them as hardened chroot environments with a lot of extras (like IP addresses for a jail). They are kept strictly separate from the rest of the system (and from other jails). You have heard about all that “container” stuff that’s currently en vogue in Linux, haven’t you? No need for that on FreeBSD! If you want a secure environment (or several) for single applications – just jail them. FreeBSD offers this possibility for ages now (but to be fair I should mention that they were available on Solaris (where they are called “zones” even earlier).

And perhaps you have heard good things about the ZFS filesystem or about DTRACE. FreeBSD comes with both of them and they are considered stable. And of course there’s much more to it. But let’s leave that for the next post where we’ll get our hands on FreeBSD, right?

For those of you who are interested, here’s a little Unix history (it’s good to know because it helps understand why things are how they are today – but if you don’t care at all you can of course skip it).

Unix history

In 1964 AT&T, GE (General Electric) and the MIT (Massachusetts Institute of Technology) teamed up to create a sophisticated new operating system they called Multics. It was extremely innovative and pioneered many features in computing. A lot of people thought however that it was overly complex and not quite the system they wanted.

Eventually AT&T pulled out of the project and started another one in 1969 which followed the converse idea: Simplicity over complexity! This operating system is known as “research Unix”. In the following years various versions were completed and licensed especially to universities for little money (because AT&T was not allowed to compete on the software market at that time due to their telephone monopoly). During that time it was a matter of course that you got the source code when you bought software. For that reason students of computer science could look at the code – and modify it.

Coded in assembler first, it was soon re-written in the new programming language C which forever remains closely tied to Unix. Thanks to the availability of the code, the universities kept producing patches with new functionality for Unix and gave it away for free to anybody who had licensed the base product (Unix). At the center of this development was Berkeley University which collected these patches and patch sets. They created new Unix releases from those which were called “Berkeley System Distribution” or BSD for short. The first one was 1BSD in 1978 which was based on AT&T’s Unix Sixth Edition from 1975.

The university created the major releases 2BSD, 3BSD and 4BSD over the years. These grew in popularity fast and quite often Unix from AT&T was bought and put aside only to be able to actually use BSD legally! In 1986 4.3BSD was released (based on Unix System V from 1983). The year 1992 saw the release of a short-lived project which nevertheless had a huge impact: 386BSD or Jolix (named after its creators, Lynne Jolitz and William Jolitz). It was an effort to port 4.3BSD to the 80386 PC.

Now the BSD story repeated in a smaller scale: 386BSD enthusiasts created patches for the system and an unofficial patchkit was provided from it. Due to a difference in opinion the patchkit maintainers broke away from 386BSD and founded the FreeBSD project. About the same time another group of 386BSD users started they own project derived from that 386BSD: NetBSD was born.

The original BSD project ended in 1994 with a strange last release called 4.4BSD-lite. It was a crippled release that could not even run on its own! The reason was a lawsuit from the Unix System Laboratories. Formed after AT&T’s forced break-up, they finally could compete on the PC market and began to offer Unix for high prices. It goes without saying that the existence of BSD was a thorn in their side – and they meant to remove it!

But greed is not a good advisor and in the end the case was settled out of court. Why? Because the university proved that over the years almost all of AT&T’s code had been replaced. BSD was almost a system completely of its own! But that’s not all. In fact AT&T had taken the free code from BSD and used it in their newer Unix releases. While there’s nothing wrong with that, they didn’t give the BSD credit for their work. And by failing to do that it turned out that they were violating the BSD licence themselves!

It is the legal struggle and uncertainty that followed from the case which can be seen as one reason why Linux gained more and more attention: If you chose any BSD derivative you never know what might happen some day…

What’s next?

Next in line is a FreeBSD tutorial that puts focus on getting the system installed and exploring what’s different from Linux.

Pacman on OpenBSD (pt. 2)

A bit belated comes the second part of installing Pacman on OpenBSD. The previous post was about the attempt to get Pacman up and running on OpenBSD 5.6. In the end it failed because the OS did not know about the ‘blkcnt_t’ type. This was nothing that a non-programmer could fix easily – but fortunately this new type is available in the upcoming OpenBSD 5.7. So we’re going to continue with that.

Snapshot time

OpenBSD 5.7 was not released when I prepared the pictures for this post. Since it took me far to long to complete this article, it was released yesterday. Anyways: OpenBSD comes in three “flavors”: Release, Stable and Current. Releases (like 5.7) are made twice a year and stay like they are. If any problems with OpenBSD are found, patches are made available. The patched code resides in the Stable branch which you should track to keep a secure and up to date system.

And then there’s Current. This branch contains the latest code. It’s meant for developers, testers and all kind of people who like to live on the edge or who want/need the latest features. You can update a release or stable system to current, but especially in case of bigger changes it’s best to start with a snapshot – and we’ll do just that in a minute.

So far I hadn’t been looking into OpenBSD deep enough to use anything else than release/stable. Time for my first peek at current and thus the upcoming 5.7 release!

Installing the system

Setting up a new system, we’re meeting the installer again. I didn’t notice too many differences from 5.6, so I’ll just show some screenshots from different parts of it.

One thing that I didn’t show in the last post was the creation of the disklabels. If you want to work with *BSD you should get an idea of what this is before thinking about how to partition your drive(s). In short: While the PC allows for 4 primary partitions (a limit which was overcome with the extended partitions later), the systems Unix originally ran on didn’t provide such a facility. To be able to partition disks on those machines, disklabels were invented. On a PC you may think of them as “sub-partitions” since they are created inside “real” partitions to subdivide a drive further.

If you’re new to OpenBSD you may be astounded when you see how many disklabels OpenBSD creates by default. This is in fact a security feature. OpenBSD mounts /tmp with “noexec” for example which means that if an attacker manages to place a binary there, it’s not going to be of much use since no program can be executed on this partition. If /tmp had been part of the / disklabel this would not have been possible. Of course there’s more to the decision for each default disklabel but you get the idea.

Creating disklabels with the installer

Now if you look closely, you can see one difference between 5.6 and 5.7: There are fewer sets to choose from! This is due to the fact that etcXX and xetcXX are no longer separate tarballs but have been moved into baseXX and xbaseXX respectively.

While this is something that OpenBSD veterans will have to mind when updating, for us beginners it is not too exciting a change. And when doing a fresh installation it totally makes sense to have the etc set installed as part of base, anyway.

The etcXX and xetcXX tarballs were removed

While OpenBSD provides cdXX and installXX isos for each release, there’s only one type available for the snapshots. It is equivalent to cdXX which does not contain the installation sets. For that reason they have to be downloaded from the net before they can be installed.

Installation of the snapshot packages complete!

Once the installation process is completed, we can boot into the new system. Upon login the system identifies itself as “OpenBSD 5.7-current” – so we’re there and can resume the work on getting Pacman to run on this system.

My first OpenBSD of the “current” flavor!

Back to Pac!

Alright. From the previous attempt we know that Pacman needs a few things installed so we can build it. This time we just have a slight inconvenience: Using a snapshot there are no pre-built packages available. So that means it’s necessary to build each and every package using the ports system. Especially in case of the compiler this takes quite a bit of time.

I’ll skip over the details here; what I did was to build and install:

  • wget (to fetch the Pacman source)
  • bash (because Pacman needs it)
  • libarchive (used by Pacman)
  • gcc 4.9 (because OpenBSD’s old system compiler (4.2!) won’t build Pacman)
  • gmake (Pacman requires it to build)

After the source has been unpacked it’s time to configure it.

All dependencies built. On with Pacman!

Like last time configure is satisfied with the system. But unlike last time Pacman can actually be built now! So let’s go ahead and install it.

Compilation looks good

Now that it’s installed, it’s time to try and see if it actually works or if it’s going to segfault or anything. Fortunately it only throws an error because I didn’t provide any parameter. This is its expected behavior, so everything is fine so far.

Pacman is working!

Of course there are no packages available for OpenBSD which are compatible with Pacman. So we’ll have to create one ourselves. I’ve installed links via the ports for a little convenience so browsing the Arch Linux pages and getting the first PKGBUILD file is a simple thing.

Getting the first PKGBUILD file with links

What next? With the PKGBUILD file for it we should be able to build and package curl shouldn’t we? Of course we have to tell makepkg to disregard the package’s dependencies because there are no packages installed using Pacman on this system, yet. And since there’s also no gnupg available, we need to skip the checks, too.

Then makepkg is happy. Well, almost. It relies on curl to fetch source tarballs – and since we’re attempting to build curl in the first place this obviously won’t work. So in this case the best solution is to just wget the source and put it into the working directory.

Pacman needs curl to download sources – let’s just wget curl’s source

Next try! Makepkg unpacks the source, runs configure and – fails. Ok, the PKGBUILD file was created for Arch Linux and Linux systems only use GNU make by default and thus simply name it “make”. We’ll have to edit the file and replace “make” with “gmake”.

Much better: Curl is built successfully! However makepkg cannot package it because the fakeroot program is not available on our system. So the next step is to build and install that before trying again.

Curl built, but fakeroot is missing

After fakeroot is present on the system, makepkg is happy again and tries to package curl for us. But we’re in for another error message: This time it’s install complaining. The reason is that GNU install uses some extensions unknown and thus unavailable on *BSD systems. Now we’re really close!
The solution in this case is to modify the PKGBUILD file again, remove the offending parameter and create directories with mkdir. Next attempt!

Incompatible versions of BSD and GNU install

Success! The first Pacman package for OpenBSD was built!

Yay, first package built! :)

Now let’s install the newly built package and see if that works, too. Does it? Sure thing. And even if that’s a pretty short list of installed packages right now, the important first step has been made.

Confirmed: Pacman works

So let’s build another package and see if Pacman can make use of the now installed curl. I chose bash because that’s one more dependency of the package manager. And really: Everything is fine.

Pacman can now fetch the source itself

All done: The second package has been built. Now we could go on and build any other package. In that case we’d come across a lot of problems getting them to build on OpenBSD. That’s for sure. But that is general packaging trouble. The goal to bring the Pacman package manager to OpenBSD has been successfully reached.

Second package (bash) built

Pacman on OpenBSD – why?

OpenBSD features a package system that is both simple and tried. It does the job. But in some regards a more modern solution could do the job – well, better.

From the Linux perspective it is completely incomprehensible that only the programs which you install on top of the OS are packaged. The operating system itself is installed by unpacking tarballs. There is no package management keeping track of their files. This is the reason why some files have to be deleted by hand on every update. If the OS was managed by a tool like Pacman this would be unnecessary. Point 1: A fully managed system is cleaner.

The ports are a facility that works. But writing makefiles for everything is a rather tedious task, especially since make requires some black magic now and then to achieve special things. Pacman on the contrary uses shell scripting which is both powerful and easy to read. And I’d claim that it’s also far easier to learn than make for people who are not programmers (and package maintainers do not need to be programmers after all!). Point 2: Packaging via shell scripting is easier to write, read and learn.

Updating the OS itself is a special thing without a real need for this. If the system was managed, updating without booting a ramdisk to unpack tarballs would be possible. Point 3: It would make updating the system easier and more consistent (why should the core OS be treated differently from the application programs?).

There are more points in favor of a more modern package management solution but most of them are arguably a matter of taste.

Of course there are a few disadvantages of using Pacman as well. For one it’s not meant to be used for huge packages like the base system. It works well, but the possibility to patch the base system from one version to the next using deltas for all the files instead of removing the old package and replacing the whole thing with the new one, would be even better.

Another issue is the license: The *BSDs prefer permissively licensed applications over “copy left” models. And Pacman is GPL’ed software.

Nevertheless the combination of OpenBSD + Pacman is an interesting one in my opinion. If anybody else thinks the same – feel free to drop me a comment here.

What’s next?

I’ve got yet another *BSD topic in line. Since I was asked by some friends about FreeBSD, I figured that it would be a good idea to write a little tutorial / introduction to FreeBSD from the perspective from the average Linux user.

Pacman on OpenBSD (pt. 1)

It’s April fool’s time! You knew it: There is no ArchBSD/Open in the making (or at least I don’t know about it). But this year’s April fool actually has some real background – both on the technical and the social side.

Why?

Well, I had the basic idea for this fool since about the beginning of the year. I wanted to bring ArchBSD to the attention of my readers again since I really like the idea. But there was not too much news about the project. So I had to come up with something. And I thought that the humorous aspect of an April fool was just about the right thing.

There was another reason, however, and a rather strange one actually. A while ago I read somewhere that somebody was to leave Arch Linux (for various and IMO very valid reasons) and use OpenBSD instead. Right in the next post he was told in a condescending tone to enjoy the visit because he’d be back in no time anyways. I immediately hated that arrogance! Having been a visitor to *BSD land myself (and having liked quite some things there), the idea was born if there could be an Arch-OpenBSD blend like there was already ArchBSD for FreeBSD.

Just a joke logo

Behavior and sensivities

There’s a lot of bad behavior in the Linux world. On the forums of the now dead distribution CrunchBang I once read that there were also some Archers “creeping around” (there’s another distro, ArchBang, which follows the same design ideas but is based on Arch Linux). Obviously the poster didn’t have much respect for some of his fellow Linux users because another distribution fits their purpose best.

Another member’s signature made it quite clear why: UDOD (“Use Debian or die!”). I have no problem with such signatures or statements. In fact I think they are funny to some degree. The only problem here is: You never know if people are actually serious and do mean it.

Or have you ever witnessed what happens on the Arch forums if somebody admits to be using Manjaro or any other Arch-based distro? Quite often the reactions are… not exactly friendly. Use a different (even a closely related) distribution and you’ll probably make no friends.

Ironically, a somewhat similar thing can happen to you the other way around, too. Just go to the Gentoo forums and dare to ask a beginner’s question. Chances are that you are told how Gentoo is not for you and you should find another distro.

You really have to grow a thick skin in some cases! Fortunately there are also a lot of friendly and very helpful people around. And on the other side there’s this new trend to replace pronouns with “gender-neutral” ones… This takes every day’s imbecility to a whole new level where endless discussions arise not over technical matters but over real or imaginary sensitivities of some minority.

Pacman on OpenBSD?

But enough of that. The net is the net and people are… what people are. Anyways: I begun to wonder if pacman could be installed on OpenBSD, too. And since I actually I liked the idea, I decided to give it a try.

I don’t have too much experience with OpenBSD, yet, but I’ve been following the releases for about two years now and in fact I think it’s a great OS. So let’s install it first! Just like other free operating systems you can download in ISO image for the installation. There’s just one thing wrong with it: The name! No, it’s not a joke this time; the file is just named ‘cd56.iso’. Now I’m all for short names but it should at least be informative. And ‘cd56.iso’ clearly isn’t.

I’ve hated that with Gentoo: They offer images by the name of ‘install-x86-minimal-20150407.iso’ and the likes. Ok, by now I know that this is a Gentoo image but would it really hurt to state just that somewhere? And with OpenBSD it’s even worse: You cannot even tell whether this file is an ISO of a 32-bit or of a 64-bit system! That’s pretty bad. Now if you have both older and newer computers to deal with and download both, you’ll end up with something like ‘cd56 (1).iso’ which is just ugly. And to tell which file is which version, you have to take a look at the size as the 64-bit one is slightly bigger (or you have to remember which one you downloaded first).

Installing OpenBSD

OpenBSD comes with a simple text-mode installer. Simple in this case means that it’s simple to use. It let’s you choose how to install and does a lot of things for you then. Want to know what it can do? Just have a look at it! It’s a shell script.

Installing the base system actually means fetching and unpacking tarballs. This is a simple and efficient method. And while it means that the files for the base system are not managed by any package manager (the programs we’re going to install later of course are!), it seems that the OpenBSD people can live with that pretty well. Upgrading the system means extracting newer tarballs and removing some obsolete files by hand.

Installing OpenBSD 5.6 tarballs

Version 5.7 of OpenBSD is due next month so at the moment 5.6 is the newest version out and I’m going to use that. After the system was installed on the drive I’m prompted for the root password and a few other things.

Some more choices of the OpenBSD installer

Trying to build pacman

Now we need the pacman sources of course. Let’s install wget to download it. That program is available as a package for OpenBSD but to get that we need to tell the package system the path to a package mirror first.

Fetching pacman source with wget

Ok. After installing some dependencies for pacman (bash and libarchive) configure was happy. So we’re ready to make!

Trying to ‘make’ pacman

Oops. Pacman obviously needs GNU make and cannot be built with BSD make. So let’s install gmake and try again.

Compilation failed – installing a new gcc

Much better. The compilation begins. But then it fails. Looks like OpenBSD’s old gcc is not capable of compiling pacman… Fortunately there’s a newer version (two of them in fact) available as packages. Let’s install one, set CC to egcc (this is what the packaged newer gcc versions are called to distinguish them from the system compiler) and re-run configure before we try to build again.

End of the line: OpenBSD does not know ‘blkcnt_t’ type!

Now that’s not cool. The compilation failed again! And this time it’s not gcc’s fault. OpenBSD simply does not know the ‘blkcnt_t’ type. As there’s no way to fix that easily, we’re stuck. Aren’t we?

What’s next?

Actually we aren’t out of luck. The coming version 5.7 supports this type! In my next post I’m going to install a snapshot and use pacman on that system. Yes, I can already tell you that it works. I’ve already taken these screenshots (and the ones for the next post) mid-march. ;)

Puffy goes Pacman!

This post reveals a new Arch distribution: ArchBSD/Open! I know that this comes unexpectedly; I was surprised, too, after all. In fact it was just by accident that I learned about the new project that will be officially announced on the OpenBSD Journal any day now.

The new distro’s leaked logo

A bit of background

Arch Linux is a Linux distro that is small, simple and light-weight. And it has pacman! This combination proves to be a real success story. Besides Arch Linux we have today: Arch LinuxARM, ArchBang, ArchHurd and probably even more Arches!

Right, one of these other ones is ArchBSD – I’ve blogged about it almost two years ago. It is still around, so it obviously managed to survive. It’s a nice little distro but there’s one thing wrong with it: The name! Why that? Because it is a FreeBSD distribution and even FreeBSD users admit now and then that this is not the only BSD system out there! Right now all other BSD systems are discriminated against. This is a situation both unacceptable and unbearable which must come to an end immediately! It is a matter of life and deathjuice … justice!

Promised some background, eh? Here’s a daemon police wallpaper!

To reflect the fact that it is not the only BSD, the project totally needs to change the name to ArchBSD/Free.

A petition that will force the maintainers with tens of thousands of signatures will soon be started. Feel free to hop over to their forum and tell them that their project name downright sucks, if you can’t wait. Explain why and start demanding that the project be renamed. And while you are at it, tell ’em that ArchBSD/Free is so much cooler, anyway! It sounds more important, it’s more precise, more fun and more to type!

Puffy loves Pacman

There are three reasons why ArchBSD/Open was created. The first one is: With ArchBSD’s name change to ArchBSD/Free the need arose to provide an ArchBSD/something because otherwise that addition to the name would just sound stupid and be superfluous.

The second one: The world needs more Arch!!

That and the fact that Puffy just loves pacman (well, everybody does, right?)!

With so many good reasons for it, it was just a matter of time until a dedicated team formed to make the dream come true. Now the work for it is finally done and will soon be made public.

Puffy loves pacman!

Release time

Well, while the product is already completed, there’s of course one little detail which blocks the publication. No, it’s not even something technical. Or perhaps it is. Depends on how you look at it. The problem is: The webpage is not done, yet! Yeah, it’s the simple things in life which can cause the biggest trouble.

So what’s the release date? Unfortunately there’s no release date currently. Why? Ok, ok, if you absolutely must know, I’ll tell you. All technical difficulties of bringing Pacman to OpenBSD were solved rather quickly. But despite the team’s best efforts they have not been able to agree on the website design! Er, that is, there is no design, yet, which to agree on…

Think about it for a minute and you’ll see why: FreeBSD’s mascot is Beastie. He’s a daemon with a fork (and rather awkward shoes for whatever reason – probably he just likes them). That’s an easy mascot to work with as it is not hard at all to imagine an Arch daemon: A bigger, badder and probably even redder version of Beastie. But OpenBSD’s mascot is Puffy! Now how on earth does an Arch Blowfish look like and how to come up with a nice theme where it fits in?!

There have been voices inside the team to just make a simple webpage for now and get the release done. The OS was more important than the theme after all. Those ignorants have been kicked off the team of course and their access revoked. That’s a bit harsh? No, not at all! Sorry, this is OpenBSD after all. You cannot make a release without high quality artwork!

Puffy shot first! An example of the very nice OpenBSD artwork

Oh, stop complaining now, will you? If it weren’t for one of the expelled, I wouldn’t have learned about the project’s existence and that means you, too, wouldn’t. Now the big question is: Will ArchBSD/Open ever be released? *sigh* Frankly speaking, I don’t know. I didn’t manage to make contact with the project leader.

But after trying to get in contact for weeks now there’s one thing that I can say for sure: The whole team leaves a rather fishy impression!

TEK – The “Truly Ergonomic Keyboard”

This post is a review of the Truly Ergonomic Keyboard (or TEK for short). This keyboard is very different from any keyboard that I’ve head so far. And since it is not exactly cheap (about 190 EUR or 250 USD!) I thought that I’d write about it so people who think about buying it can read some facts first.

My last two posts were about closely related topics: 1) keyboards, ergonomics, touch-typing and common typist’s injuries and 2) alternative keyboard layouts. I’ve already made clear that I love my TEK there and in fact I’m so enthusiastic about it that I’m going to buy a second one for work as soon as I can afford it.

Truly Ergonomic Ltd.

With such a name the company won’t win a modesty award for sure! And the claim “A revolution in typing” is quite bold, too. But then again, there’s absolutely no need for being modest if you sell a product like that. IMHO this Canadian company could rightfully claim to have re-invented the keyboard or created a “keyboard 2.0″ / “keyboard reloaded” or whatever you want to call it. There are just so many things about the TEK that I’m having a hard time to decide where to start.

The company’s website of course explains a lot of things about the keyboard. I will of course mention everything that I deem important. But I’ll try to focus on my personal user experience with the TEK.

The dust cover that comes with the keyboard – a simple but useful idea!

A radical new approach

The first thing that you notice when you look at it is that the TEK reorganized the key positioning quite strongly. The letter keys stay in the same place compared to the classic keyboard layout. The same is true for the numbers, the Fx keys and the cursor (or arrow) keys. Same with Shift, Esc and so on. But this is more or less it.

Leaving the letter keys in their common position is a good choice because the TEK asks enough of you when you have to re-learn a lot of positions for the other keys. Most importantly: Return, Backspace and Del move from right of the letter keys to in-between. They are placed right in the middle of the keyboard. This feels very odd at first because typically you’ve been familiar with a position to the right for many years. It takes a few hours to get somewhat used to it and, at least for me, it took more than a week to feel “natural”.

The symmetric design makes the TEK look very nice. But aesthetics is of course not the real reason for such a radical re-design. Just as you would have guessed, the real motivation is – ergonomics! The little finger (aka “pinkie”) for example is much weaker than your other fingers. But instead of putting less strain on it, the classical keyboard requires you to use this finger for the Return and Backspace keys which are frequently used during the work day. Re-positioning these two keys so you can use your strong fingers for them makes a lot of sense from this perspective.

The TEK follows a very different keyboard design!

The Ctrl keys – required for a lot of key combinations – take the place of Caps lock and Return on the classical layout. Caps lock is a key most people use very rarely – if ever. Wasting the space of a nice big key for such a useless one is a shame. This is something not only the developers of the TEK have realized. There are some new laptop keyboards which simply remove the Caps lock key completely. The TEK moves it to the position below the Fx keys instead to make room for the left Ctrl.

Moving the Pg up, Pg down, Home and End keys to the left as another cross like the cursor keys, proves to be an excellent idea. I used these keys less frequently before because they were not within direct reach from the home row. Actually I didn’t even pay attention to that and it only came to my attention after using them really often on the TEK (to e.g. go to the beginning or end of a line). Whenever I’m typing on an ordinary keyboard now, this feels lacking an important feature: Those four keys without having to move the right hand off the letter keys!

Another useful thing (even though I don’t really use it) is the placement of the Fn key right below the Fx keys. You surely know this key from many laptops which however place it in the lower left corner of the keyboard. And that means you’ll need both hands to really use it (or completely over-stretch your fingers which is a very bad idea on the long run!). The Fn key on the TEK is in a much more reasonable position.

There’s exactly one design decision that I disagree with: Making Tab a small key is not a very bright idea. And I’m pretty sure that more people will think the same in this regard. Tab – the key for auto completion on the terminal! – a small key… However this is not really a problem. Why? Just follow along and see.

Fully customizable layout

Annoyed by the Tab thing? Well, just re-map that key. No, no, you don’t have to go through the pain of configuring your xmodmap on Linux or figuring out how to do something like that in Windows if you use it (or are forced to do so). You also don’t have to re-configure your keyboard on every computer you might attach it to. Why? Because there’s the Custom Layout Designer where you can create your own layout with ease.

Once you are done, you can download that layout and then flash the TEK’s firmware – so your changes are made directly inside the keyboard and thus completely independent of the computers you might plug it into later!

This is an extremely lovely feature. Think about it: The possibilities to customize your TEK are almost limitless. For example I’ve mapped Ctrl back to the lower corners of the keyboard and put Caps lock on the former Ctrl keys (remember that I’m using the sophisticated Neo² layout which uses Caps lock to access other layers with different characters for the keys). I’ve also re-mapped Return to the left Space key because I feel that two of them are a waste of keys. And thus the former Return key, a nice big one in an excellent position, is free for mapping Tab on it!

The layout designer is not only extremely easy to use. It also makes sharing your layouts a simple thing, since a link (a pretty long one of course) is created for it. View the layout that I use right now here as an example, if you wish.

Back side of the TEK: You can see the DIP switches here

On the back of the keyboard there are some DIP switches. Click on the image for a bigger version to have a closer look. With these you can change between Windows/Linux and Mac mode, choose the base layout for some countries (or for Dvorak) and if firmware flashing is allowed. Mine is set to German (DE).

The fully programmable custom layout is the one of the killer features of the TEK for me. There are only two things that I can criticize: For one the layout designer does not produce images with the current version of the firmware (v3.40 instead of v4.0 which the keyboard came with). I don’t know when they’re going to update the layout designer. For me it is nothing urgent as everything that I need works very well with v3.40 as well.

The second point is the more important one for me: Currently there’s only a Windows program to flash the TEK’s firmware! Probably not a problem for a lot of people who have at least one Windows machine. I don’t. And since I didn’t trust Wine or wanted to flash from VirtualBox or something, I had to set up a Windows machine to flash my TEK. This made me do something I didn’t want to do again – ever. While having breakfast I installed Windows 2000 on an old laptop. Then the service packs, etc… Ok, I’ll skip over the details. The outcome was that I was able to flash the keyboard and I did so quite a few times until I was satisfied with the layout.

I really hope that Truly Ergonomic releases a flashing software for Linux somewhen. OS X is probably first but anyway even this would be a huge step ahead IMHO. While I don’t have a Mac and thus would not directly benefit from it, it would at least give you a choice – and make a Linux version much more likely. ;)

More characteristics

Another pretty obvious fact is the very small size of the TEK. Truly Ergonomic Inc. advertise this as a huge benefit because the mouse can be closer to the keyboard – effectively reducing the way your hand travels whenever you switch between keyboard and mouse. I admit that I disregarded this point before I had the keyboard: There might be a theoretical benefit but it ought to be so little that you don’t ever notice it! Now I have the TEK and my mouse is much closer to the keyboard. Guess what: it feels good! I’m still using a Natural Ergonomic 4000 by Microsoft at work. And there really is a difference when it comes to a keyboard to mouse switch. It’s perfectly noticeable! So this is not just marketing after all.

The box which the TEK ships in

Less obvious is another strong point of the TEK: It uses mechanical key switches. In case you have no idea what this means I encourage you to do a bit of reading. For short: Most standard keyboards use a “rubber dome” technique to trigger a keypress. This is cheap to produce and is of rather low quality compared to other types of keyboards. Mechanical keyboards use a separate and independent mechanical switch for every single key and the key triggers at the moment you press it about half the way down. There’s actually no reason to press it all the way down. And thanks to the switches the keys are what is called “tactile”. It’s hard to describe the real difference while typing. Try it out for yourself if you’ve got the chance. I’ve come to like the mechanical switches of the TEK and many other people love the switches of e.g. Das Keyboard, a popular mechanical keyboard that uses them as well.

Another detail is that the keys of the TEK do not follow the standard key arrangement of placing them vertically staggered but in a straight line horizontally. In fact it follows the opposite approach – and this is a great idea! You won’t believe how much of a difference it makes if you didn’t feel it yourself. Our fingers do not all have the same length. The key arrangement of the TEK honors exactly this fact.

Remaining things

The TEK is advertised to be compatible with Windows, OS X and Linux. I’ve also used it together with FreeBSD and OpenBSD – just like you’d expect everything is fine of course.

Before purchasing this gem I read quite some reviews of course. There were complains from people who had problems with the so-called “ghosting” and such or needed to “type in” their keyboard before everything worked right. I never had such problems. My TEK worked from the moment on that I first connected it to my PC. But then again this was most likely an issue with the old 207 and 209 models and seems to be solved with the 229 that I own.

The only real problem that I noticed was that the embedded Num Pad (which can be switched on and off) behaves strangely and is not of much use. Since I don’t really depend on it, I simply don’t use it. However for some people this may be a total no-go. This is probably fixed by the firmware v4.0, but I didn’t try it out.

It’s much more of a shame that the TEK is only offered with an US layout. Again this is not much of a problem for me. But my wife is not happy with this at all. And as you can all imagine, this is NOT good (and does certainly not help to convince her that I need to spend so much money again to buy a second one!). Would be great if you could choose between some common keyboard layouts. I’d even be willing to spend some more money for a German one!

Back side of the box which shows some features of the TEK

Also many people wrote that the support of Truly Ergonomic Inc. is lousy and it takes extremely long to get an answer at all. I cannot say anything about this since I never had to contact them. (I’m thinking about writing to them about the Num Pad issue – if I do, I’ll update this article with the answer.)

Another thing is the detachable palm rest. I like it the way it is and never attempted to take it off. But I think for some people it may be nice to have an even smaller keyboard.

Depending on what you prefer, there are different models of the TEK. One model with wide Alt keys (model 227) which Emacs users will love and one with two normal-sized keys instead of one wide Alt (model 229). And then there’s an “MX brown”-compatible (soft tactile) and an “MX blue”-compatible (clicky tactile) version of either model. I’ve got 229 brown and that’s loud enough for me (at least until I finally learn not to push the keys down to the bottom!).

Conclusion

The TEK is not a keyboard for everyone. It is too expensive for many people and too different from the style everybody is used to. But for people who type a lot, who are willing to invest a bit of time to re-learn things and who take advantage of its special features (like the customizable layout), it is pretty close to the ultimate solution. It is well-thought-out in just about any area. A plastic dust cover for example is such a simple yet very effective thing!

The flaws that the TEK has are very few and mostly nothing too problematic. A choice between the US layout and some others printed on the keys would be my biggest wish, closely followed by a flashing software for Linux. However I guess that an updated layout designer to feature firmware version v4.0 is more likely – and of course I’d appreciate that as well.

Perhaps some of these wishes might come true if the TEK reached a much wider audience. Maybe even the price could be reduced then so that again more people could afford it. Ergonomics is an important topic when it comes to progress in the IT field. The TEK is not the only keyboard which tries to implement ergonomic considerations. But it is a very good one.

If you consider doing something about Ergonomics, to get a new keyboard and try out an alternative layout like Neo², Colemak or Dvorak, I suggest learning the alternative layout first. Trying to get used to a new layout while trying to adopt to a new keyboard will almost certainly fail. And learning a new layout is by far the bigger task – so it makes perfect sense to learn it on the keyboard that you are used to and make the switch afterwards.

Keyboards, layouts and ergonomics (pt. 2)

This is the second part of my article about ergonomic keyboards and keyboard layouts. In the first part I wrote about different characteristics of keyboards, touch-typing, typical injuries of people typing frequently and my first experience with an ergonomic keyboard: A curved keyboard from Microsoft.

Better ergonomics

Probably too late (I already suffered from pain in my hands) I decided to get one of Microsoft’s “Natural Ergonomic 4000″ keyboards. It’s quite a bit more expensive than the average keyboard but I hoped that it was worth the money.

The initial impression was at least ambiguous – or probably even negative. I could see the idea behind the ergonomic design and wanted to believe that its wavy style was superior to the simpler curved one. But the whole thing is a true beast of a keyboard! It’s very big. No, actually it is huge – and not only in length but also in height. The later is a problem if you (like me) have a sliding board under your desk where you put the keyboard. Chances are that it won’t fit there. And then, for a personal view, it is really ugly.

Microsoft’s Natural Ergonomic 4000 Keyboard (german layout) – This was my prefered model until now

It wasn’t easy to develop a friendly attitude towards that thing. The first day I used it, I had to switch to my old keyboard again to enter my boot passphrase. I’m the kind of guy who cannot remember his passwords but knows pretty well which keys he presses. And so it was nearly impossible for me to enter a long password at first because the keyboard felt very different from anything I had ever typed on before.

Another thing is the split design; I used to type the ‘b’ key with my right hand for example. This was no longer feasible with the new keyboard thanks to the gab. This was a major nuisance until I realized that it was not the keyboard getting in my way but in fact a bad habit of mine. From this perspective the new keyboard even helped me to get rid of that bad habit and I’m quite happy with that fact now. As I was getting used to it this became less and less of a problem (the same is true for the passwords). It took me about two weeks to adopt the new style enough to type without pressing the wrong key too often. After a bit more than a month things started to feel alright again. My typing speed however was reduced for many months and I felt that I never actually reached my best times again. But the reason for that was not the keyboard. It was myself choosing to learn a new layout.

National keyboard layouts

While the US keyboard layout can be found around the world when it comes to servers, it simply does not qualify for most languages. This is perfectly clear for the Russian Cyrillic alphabet, the Greek one or the Asian languages. But also most European languages which use the Latin alphabet as well, have additional characters which English does not have. This is why there are so many national keyboard layouts.

The default German layout (from Wikipedia)

However the additional characters come at a price: Some other characters are moved and may even require a combination of keys. The German keyboard is a fine example of a very bad keyboard layout today. It features the umlauts (Ä,Ö,Ü) and other characters, but some special characters are not very convenient to reach. In the days of typewriters it may have been ok because you would not need characters like the backslash, curly braces and so on. These examples are located in hard to reach places with AltGr+Plus sign, AltGr+7 and AltGr+0. The problem is that you need them a lot on the computer. Just think how often you need the curly braces if you’re a programmer… You see the trouble.

A lot of programmers in Germany actually just use the US keymap for work. I can work with US pretty well, too, but this is not the ultimate solution. Fortunately there are the so-called alternative layouts.

Optimized keyboard layouts

In the English world Dvorak is the best known one. It has the same characters as the default US keyboard but another layout. A lot of people claim that they can type faster with this layout. The idea here is that the letters which are most often used in English are placed on the home row (this is the “start position” where touch-typists have their fingers when they start typing). This sounds like a good idea but critics claim that there’s barely an improvement in speed it at all. I’ve never used Dvorak so I cannot say much about it.

The Colemak layout (from Wikipedia)

There’s also a less well-known alternative for the English keyboard that is a more modern variant: The Colemak layout. If you are mostly typing English text you may really want to try it out. It’s meant as an even bigger improvement over Dvorak – and it adds a lot of characters from other European languages! Whether you need a Spanish Ñ, Scandinavic Å or Turkish Ç – no problem. While I’ve never used it myself I must say that it sounds pretty good.

And then there’s the most advanced layout that I know of: NEO². It’s a modern re-organisation of the German keyboard that considers letter frequency of both German and English. It uses several dead keys (keys which do not produce a character themselves but modify the next key pressed adding an accent or something to a letter) and has six (!) layers. Thanks to that it can create special characters like the whole Greek alphabet (in lower and upper case) and dozens of special symbols. Thanks to that unique flexibility you can use it for pretty much any language which uses Latin letters!

The 1st layer of the NEO² layout (from Wikipedia)

The letters are the following: Every normal key press is layer 1. Shift+key press is for layer 2. Caps lock+key produces a layer 3 symbol. And so on. Isn’t it great to finally have a good use for that nice big key below tab? Another cool thing is that this layout is already shipping with X11. So in the Unix world it is always just one “setxkbmap de neo -option” away!

Re-learning to type

I admit that I knew about alternative layouts for years but I never cared to take a look. When I finally did, I decided to give NEO² a try. It was self-evident that it would not be easy to fight two decades of QWERTZ writing. And yes, I was in for a fair share of pain. I had to learn a new keyboard completely from scratch. Damn, where was that letter again? I decided to practice a few minutes every day and after some time I found the right letters after thinking a few seconds. My WPM (words per minute) literally dropped to < 10!

As a (previously) fast typist this was a very distressing experience and I can see why quite some people quit instead of really finishing the migration. It takes a lot of resolve and endurance. But hey, there's no free lunch! I decided to stick with it and kept getting better and better. One day I found that I could reach 20 WPM again, then 30. You can imagine my relief when I hit 50 again. Now I could type fluently type texts with NEO².

After taking a one more week to learn the most important special characters and feeling bold one day I decided to switch my layout at work. The password problem was back again and for some weeks I switched layouts back and forth when I had to enter passwords. But it was only a matter of time until this was no longer necessary.

I've been writing NEO² for quite a while now and I'm still failing to hit 70 WPM on random text. Since I quit practicing after reaching 50 this is pretty much ok, I think. Was it worth the trouble to switch over to a new layout? You bet it was! Learning NEO² was one of the best decisions I've made in the computer field next to abandoning the Windows platform. I can only recommend it to everybody who is interested in this kind of thing. Invest some time – it really pays off.

What’s next?

The next post will finally feature my review of the TEK (Truly Ergonomic Keyboard).