This week I am taking FreeBSD 8.0 for a spin. So far, I like it enough that it will probably be my normal desktop environment. It seems to have the right stuff: my PC seems markedly faster.
FreeBSD's slogan is The Power to Serve and that is a good summary of where the strengths and weakness I have found lie. The installation assumes that you are installing a server, and then configuring it for desktop use: there does not seem to be a way to configure, at install time, that the user wants to use a fancy window system even.
So I think anyone without previous UNIX experience would be well-served to try one of the out-of-the-box consumer distributions of BSD: PC-BSD looks good. Otherwise, you may find some major individual applications require a little bit of detective work to install: I found this puzzling because I thought FreeBSD had a great reputation for having everything work.
FreeBSD has two built-in ways to load software sourced from provided servers on the Internet.
- Ports are source code ports, of the same kinds of software you would run under Linux or Solaris. There is a utility csup to update the ports tree, which is just a directory tree with one directory per port. You go to the directory and type make and the source code gets downloaded, compiled and installed. Neat. However, FreeBSD is very pernicity about library versions: it wouldn't let me install one port for a library because other installed software required it. The main ports distribution point is under ftp://ftp.freebsd.org/pub/FreeBSD/ports
- Packages are more like binary distributions. You type pkg_add -r package and the binary is downloaded and installed. I think it is almost always preferable to use this over the ports mechanism. You can see the most recent packages here at ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.0-release/. If the packages are not there, you can alter the URL to go to other directories, download the file yourself, and then just use pkg_add with no -r to install.
I had to fiddle around during the install a bit. The key piece of knowledge was that when you boot in single user mode (boot -s) the file system is mounted read-only. So to edit some system files you first need to run /etc/rc.d/root start to get a read/write mount. The thing I love about UNIX is that, at the end of the day, all the important information is stored in plain text files that can be simply edited: you can be reasonably sure that if you look hard enough for some dynamic parameter, you will be able to find it and repair it.
After installing FreeBSD, I created an account for myself. I made myself a member of the wheel group as well, so that I could use su and get administrator privileges. (If you don't have this and try to use su, the root user gets emailed a notification that you tried to become the superuser. Security has obviously been an influence.)
First on the agenda was getting the KDE4 desktop environment up. I tried first the method of having the xdm login manager start automatically as a daemon (/etc/rc.d/). However, for some reason it wouldn't read the mouse and keyboard. So instead I added to /etc/rc.conf
rc.conf:hald_enable="YES" rc.conf:dbus_enable="YES"and then put the initialization into ~/.xinitrc
PATH=/usr/local/kde4/bin:$PATH export PATH startkde4
KDE 4 runs well, and looks beautiful. I did not have the problem that killed my Solaris trial last year: it recognized my odd 1400x900 pixel screen automatically. I set the display settings to mild anti-aliasing: the fonts are not too bad in most cases (Opera is noticeably better than Firefox in this regard.)
I find the easiest way to avoid ugly fonts in applications is just to enlarge (shift mouse-wheel) the fonts in the browser or application. Small sized fonts seem to be the ones that let the side down.
It just worked. DHCP worked. SAMBA finds the company SMB file servers. The KDE file explorer dolphin works with SAMBA well. (I have not tried to mount the NTFS disks from the Windows partition yet.)
Audio was another thing that I had found impossible to get going in a couple of previous Linux loads. As I was beginning to expect, sound is not enabled by default in the FreeBSD installation: it starts lean and you have to make it fat yourself. The thing to do is edit /boot/defaults/loader.conf. I made these to "YES":
sound_load="YES" # Digital sound subsystem
snd_driver_load="YES" # All sound drivers
The loader.conf file allows enabling of other drivers too. For example, it seems to be the central location for enabling USB, CD-ROM and other filesystems.
The distribution I was using, which came from a UK Linux Format magazine, came with a couple of web browsers. I like Konquerer: it has certainly a much better piece of software than I remember.
I used pkg_add to load Firefox ( pkg_add -r firefox3 downloaded v3.0.15, but I see there is a port of 3.6.3 available: I will try it later.) No drama.
I loaded Thunderbird 3 in the same way, since that is our company standard mail reader. No drama.
I also downloaded Opera web browser: it is what I am using to write this blog in fact. pkg_add -r linux_opera 10. I see Opera has an update out for Opera 10.5. I will try it later.
One of the nice things about Opera is that it is set up to dispatch PDF files correctly. Firefox was not. I am sure it is just a matter of configuration, but it is certainly extra work.
There supposedly is Adobe Flash 10 for Linux available and working for BSD. I downloaded it, but I could not find any location where Firefox would pick it up. Another one for later.
The Java story for FreeBSD is very confusing. Sun refused to give the FreeBSD people a license for Java distribution until quite late in the game. I suppose this was to conserve sales for Solaris systems. But there is a lot of complicated instructions on the web which involve downloading five different packages from Sun and then trying to compile them. This method failed, in my case because it required an old version of the tzupdate utilities for Java. Sheesh.
Fortunately, I finally found out how to do it. First download the OpenJDK Java distribution pkg_add -r openjdk7. It installs fine, but when you try to run it, it will fail, complaining about libz.so. It is a versioning issue.
But the ELF loader has a neat trick to get out of DLL hell: the /etc/libmap.conf file lets you map the names of shared libraries from the ones that the program was expecting to the ones you have. In particular, this helps you when you have a more recent version of the libraries, I guess.
Anyway, I added the following and Java now works fine, including with Swing GUIs:
Predictably, Web Start is not working. Yet another one for later.
What is not going well
So what isn't going well?
First, I have not found the OpenOffice package. (I tried to compile it, but compilation failed.) I tried to use AbiWord, but it is basically unusable: the font handling is not picking up the right metrics and overprinting all characters. I have to something going in order to do my work.
Second, and more seriously, when I installed FreeBSD, it wrote over the old boot manager (LILO or GRUB) I had from the previous Linux or Solaris isntallations, and I cannot boot back up into Windows. This is a major cockup, but I am not sure it is entirely my fault: is there some idea that BSD has to be installed before anything else?
Actually, it is not necessarily a show-stopper: the only PC software I need to run is Enterprise Architect, to get UML diagrams, and as long as I can recover the NTFS I can perhaps just run a Virtual Machine for Windows.
Third, I found the FreeBSD installer was confusing and substandard in one particular area. It gives you a big list of ports you want installed and lets you add D in a "[ ]" box to delete them or X to have them: however, by default the box is blank. What does that mean? I wasted a deal of time ticking boxes I suspect I didn't need to tick.
In retrospect, I should have just bought a cheap solid-state disk drive and installed FreeBSD on that, installing as many ports as possible. (FreeBSD also likes you to have a swap partition too, by the way: I tried it without one, and a reinstall seemed to get a little confused.)
VerdictI won't really know until I get OpenOffice, Eclipse, Java WebStart and perhaps better support for PDF and Flash. It is definitely a distribution for scavengers or hackers, not laymen.
But so far I am really enjoying it. BSD feels like UNIX, a welcome change from Linux. It seems much snappier than Windows. It doesn't waste its resources on the zillion pre-loading applications, virus-checkers, etc. that bog Windows systems down. Nor does it have the dumb Windows roaming system enabled by default (my Windows PC would take over 2 hours to restart, recently, because of so-called "Roaming": it actually prevented roaming!) KDE4 is pretty and seems to work well. The hardware and networking just work. The package system works well. There seem to be up-to-date versions of most applications.
I will be interested to see how well the OS update system works (that was something that killed off Mandriva Community Edition for me, after several years of happy use.) FreeBSD has avoided the issues that I had with earlier versions of Mandriva Linux, Sabayon Linux, Mint Linux and OpenSolaris. However, each of them have a much better out-of-the-box configuration, particularly for the applications I use most: Firefox, Thunderbird, Java and OpenOffice.
So I would see FreeBSD as being useful where you needed to use BSD servers for security, and wanted a SOE that would use the same support staff skills. If you don't have BSD or UNIX skills on tap, or don't have security requirements, you may find Linux a better choice: as I wrote at the head, I probably would be better off with a derivative BSD distribution aimed at the desktop, like PC-BSD.
My reason for trying it, is first frustration with Windows (roaming, etc), second a desire for better performance, third I have lost patience with having to run virus checkers (and pay for them) for security which should be part of the base product, fourth just for interest, and fifth because I whinge in this blog a lot about technologies driven by the corporate agendas of vendors rather than by user requirements, and FreeBSD seems unattached to vendors (it has had a lot of funding from DARPA.)
Anyway, I have a workable system on which I can do my normal jobs. But I estimate it will be taking about 3 working days to get it OK. Much of that time is not actual time: when loading from the disks I could attend to other work, of course. I don't know if O'Reilly have a Missing Manual for FreeBSD, but it would have come in very handy. And I certainly have not worked on a BSD system that had package management like this, so there is a bit of learning there, which is OK. I am pretty excited by it, actually.
FreeBSD has so much that inspires confidence, and it is pretty, robust and secure too, with more than a smattering of convenience: all the right stuff.