I'm a BSD

By Rick Jelliffe
June 11, 2010 | Comments: 27

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.


Setup

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.)

GUI

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.

Network

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

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.

WWW

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.

Java

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:


[/usr/local/openjdk7/]
libz.so.4 libz.so

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.)

Verdict

I 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.


You might also be interested in:

27 Comments

I have also found FreeBSD too difficult to deal with. I also downloaded PC-BSD but it won't install on my system. I also tried OpenSolaris 2009.6 but it does not support multi OSs. Solaris is a great OS with awsome look and feel but not good system for installing Apps from the repos and can't resize ZFS partitions. As far as Linux goes I have found Ubuntu to be the best everything just works and the repos are deep. The look and feel of Ubuntu 10.04 is very nice. I agree that Windows is out of the game with viruses and bugs. Mac OS X my be good but I'am not big on the Macs interface and hardware. The OSx86 project may come up with something nice but you have to worry about legal issues. I would like to see BSD, Solaris, and other versions of Linux get into the game but they simply do not compete with Ubuntu 10.04.

I disagree, Ubuntu is far from being the best Linux distribution, maybe is a good distribution for the desktop but nothing more. If you want to setup a server is not the best choice.

It seems that the most important thing for you ubuntu guys is the look and feel, well for me is the stability, reliability and performance, none of these provided by ubuntu.

I'm sorry, but I must strenuously disagree with Anonymous who writes "Ubuntu is far from being the best Linux distribution." I've used Ubuntu in my business exclusively since 6.10 (Edgy Eft) successfully up to an including Jaunty without issue. VMware Workstation 7.0 works flawlessly with XP Pro for the two applications that do not have Linux equivalents. Everything just works and I cannot imagine using any "other" flavor of Linux, although I've tried Redhat, Xandros, PCLinuxOS, Mandriva, SUSE, and a few others I cannot remember and none was as robust IMO as Ubuntu. Samba works. Wireless works. Audio works! DVD playback is flawless and there is a deep resource pool for additional software from Ubuntu/Debian. Your experience and mileage may vary, but there is simply no truth in the broad-based statement by anonymous. Jaunty is rock-solid stable for me...as it must be as I use it for a mission-critical application daily.

That robustness is because of Debian, Ubuntu is 70% Debian, the other 30% is bling bling.
The best distro for you may not be the best distro for everybody.

But come on people! this article is about FreeBSD and it's niceties.

That's always the case with any software based on the Open Source community - Debian is 90% Linux kernel source code + GNU GPL source code compiled and the rest is bling bling.

The fact is that Ubuntu made some changes to Debian, which Ubuntu and anyone in the Opensource community is free to do.

I always see Debian fans whining over Ubuntu's success - why? Its just success to Opensource and Linux! If Debian guys didn't want anyone to use their source code - they should not have licensed it under GPL. If they have done so, then suck up!

Saying Ubuntu is only good for desktop is pretty lame. Please make yourself familiar with the Ubuntu Server Edition!

I tried FreeBSD too. but i dont like it (call it antipathy).
Im stuck with Slackware. Its fast, Stable and i like it ;)

The best distro will always be that one you are happy with.

The 'missing FreeBSD manual' you mention in your article is the FreeBSD Handbook. (http://www.freebsd.org/docs.html)
FreeBSD has great documentation. In fact, I'd say it's by far the best documentation of any free unix-like OS. Your sound problem would have been solved more specifically by reading section 7.2.1 of the Handbook. It explains how to quickly determine what driver your sound device is using and add it to your /boot/loader.conf file.

Oh, and speaking of which, DON'T EDIT YOUR DEFAULTS CONF FILES! They will be overwritten during upgrades. You should edit the /boot/loader.conf and /etc/rc.conf files instead. FreeBSD will check these files for overrides to the default settings.

Also, there are some great forums to go to for help. My favorite is http://www.daemonforums.org/ (which covers all the BSDs) and there's also the official FreeBSD forum, http://forums.freebsd.org/

One last thing, the installer asks you if you want to install the BTX bootloader (the default FreeBSD loader, which I don't really care for) to the MBR, but it also gives you the option to install no bootloader. That was the option you should have selected. The easiest way to re-install Grub is to use a live linux CD. Adding FreeBSD is pretty easy if you're used to editing the Grub menu.lst file.

Oh yeah, fonts. Installing the Webfonts port or package will give you the MS TrueType fonts that we're all used to seeing.

Thanks for your article. It shows a realistic early experience with FreeBSD.

My first successful freebsd install was when i was a freshman in college, 2001. I ditched slackware immediately.

Currently I run 64-bit FreeBSD 8.1-PRERELEASE with java (jdk6), xorg with the accelerated 64-bit nvidia driver, full sound support, a host of desktop apps including pidgin, firefox, gnumeric, mplayer, also serving http via apache with php/postgresql driving the associated sites. My GUI of choice is ion, but i've used gnome, kde (3 and 4), xfce, fluxbox, openbox, blackbox, and fvwm successfully on freebsd. I've run the same _base_ system install for the past three years, with (so far) 2 userland reinstalls in that time when things got too crufty. I haven't lost any personal data on this current incarnation of the _base_ system.

I make a solid distinction between userland and base system, because it's there and it's effective. To be able to literally uninstall all of your third party apps, then reinstall them with no difference to your average user is a great advantage for system stability and data security. No other operating system can match it.

When it comes down to it, it's a bomb-proof OS when you learn it. I've never experienced a kernel panic that brought my system down and required a full reinstall.

As for the linux pissing match, Archlinux is way better than debian or ubuntu or redhat or centos.

Oh, also, next time install everything from ports rather than packages. It tends to help system-cohesion in my experience. And linux flash?


> cd /usr/ports/www/
> ls | grep flash
dummyflash
flashplugin-mozilla
linux-f10-flashplugin10
linux-f8-flashplugin10
linux-flashplugin7
linux-flashplugin9
xpi-flashblock
xpi-flashgot
>

Take your pick. Google woulda told ya.

Eli: Yes, it does feel solid. Having the basic hardware working like it did is really important, because it means that I shouldn't need to upgrade the basic OS for several years, and just upgrade applications.

I will try one of those other Flashes: but linux-f10-flashplugin10 did not get picked up.

I use a FreeBSD on a headless server and absolutely love it to pieces. I really want to try and install for a desktop appliance but I don't have any hardware I want to try on. My laptop uses ArchLinux which I'm not going to replace any time soon :)
Adopting ZFS is the best thing FreeBSD did. One advantage OpenSolaris and FreeBSD have over Linux.

[Update] I still have not found a port or package of OpenOffice that will install. It seems that a Linux version is the most likely to be recent, and that I would have to have some software to install using RPM or DEB: any ideas?

However KOffice installs fine, which is good for many casual documents. I used pkg_add -r koffice

No version of flash that I have tried from the list provided worked for me, by the way.

Hello sir, Im entirely sure but have you tried checking

http://www.freshports.org/editors/openoffice.org-3/

Might be helpful. Also Freshports is a great way to look for a software you'd like to install in FreeBSD.

I've tried FreeBSD on the desktop, and it didn't fit my needs. I spent too much work getting it the way I wanted, and keeping it that way, rather than getting work done. I keep going back to Debian GNU/Linux, because of the flexibility to hack, and the stability of an enterprise operating system. However, I am interested in the BSD kernel, so I may run Debian GNU/kFreeBSD one of these days.

Rick: The FreeBSD Project isn't allowed to host Flash packages.
You need to install the www/linux-f10-flashplugin10 and www/nspluginwrapper ports to use it.

Please take a lookt at http://porting.openoffice.org/freebsd/ for OpenOffice packages.

pkg_add -r firefox will add the latest FF 3.6.x package.

Regarding the libz issue with openjdk: It's better to install misc/compat7x. There's a libz.so.4 in it.

Lars

As for openoffice and other ports. The good news is that O.O. will compile & runs fine after you have an updated ports tree.

su root
portsnap fetch update

When that gets done

portsnap extract.

Now you have an updated ports tree.

The bad news: You picked a bad time to install FBSD due to perl and a gettext update.

What you will want to do after you update your ports tree is to install
"portmaster"
cd
/usr/ports/ports-mgmt/portmaster
make install && make clean

The next thing you will want to do is look at /usr/ports/UPDATING This will tell you how to update perl & gettext- basically you will
have to update everything that depends on gettext, sadly that is all
most everything from kde to xorg. Lets say you have a lot of compile time in-front of you.

You would be better to grab FreeBSD-8.1-RC-1 from the mirrors.

Anon: Thanks for that. It makes sense kinda.

But the need to recompile everything like that is a *major* gotcha. If so many programs rely on specific versions of Perl and gettext then really they should be considered part of the OS or base. And there should be ways to insulate users from this.

When I use Windows and Mac, I don't have to recompile old programs to use new versions of the OS: and where I do it is considered a bug.

Is the recompilation necessary because of a change to the API signature or an weakness in the linking mechanism or what? Or is it the rough end of the security or packaging model?

+1:)
Slackware, because it works

[UPDATE] I added the DesktopBSD utility for help in handlign packages. It makes things much easier in general. http://desktopbsd.net/wiki/doku.php?id=doc:desktopbsd_tools_in_freebsd

OpenOffice.org packages here: ftp://ooopackages.good-day.net/pub/OpenOffice.org/FreeBSD/

About the Flash and PDF, they do work well. Checkout the Handbook for instructions on installing Flash: http://www.freebsd.org/doc/en/books/handbook/desktop-browsers.html#MOZ-FLASH-PLUGIN.

Also, FreeBSD gives you a choice of installing a boot manager or leaving the current one alone during installation.

OpenOffice needs jre which for license reason must be manually placed into the /usr/ports/distfiles. You can probably use the packages unless you need to tinker with the config setting. after placing the required tar file into the folder, and after making sure there are no complications/broken ports (check the UPDATING file on the /usr/ports/) the build should run w/out a hitch albit slow.

I personally don't like to bother with tzupdate and disable it on the config (make config). perhaps it has its use somewhere, but i have not found it necessary to run my programs. correct me on this if i'm wrong.

Use portmaster or portupgrade (installed separately from the base system) to better organize the whole process. it's a huge let down to start a lengthy build and go be busy elsewhere (or sleep) and come back only to find it stuck in config stage of the 3rd port in the line of several hundred. that likely won't happen using portmaster or portupgrade.

About sysinstall and installing packages, [D] does NOT mean delete but dependency. Empty box means to not touch it regardless of the status of the installation, and check would mean to install, but when you check them, since some ports require dependencies, the sysinstall automatically places them into the list by putting D in their boxes.

I am using FreeBSD, Debian, and Archlinux. FreeBSD is great when everything works. It's at times when you need to use skype or/and webcam, when a port fails to compile, you wished you were using Linux.

I have tryed FreeBSD to. But if I just want a system "who works out of the box" I like the Turkish Pardus best. Now they got a international version with many languages to:
http://www.pardus.org.tr/eng/
http://worldforum.pardus-linux.nl/

Ubuntu is ok to, but Pardus got all the important media codecs pre-installed for DVD movies etc..
I think it will be one of the top then Linux in time.

I've been using FreeBSD since 1997 mostly for servers. In that aspect and IMHO it beats all others hands down. In recent years the development team has made real strides in getting the GUI working for the masses, but it's still light years away from being a load and go OS. FreeBSD as a server is rock solid and I never have trouble with it.

But when I expand out into using Xorg and window apps then things get murky. Sometimes things don't work but still it's nice to experiment.

FreeBSD is not for those who are unwilling to learn and dig deep for information and solutions. Too often the help that is available is out of date. But if you take some time to learn what you need there is no better server OS out there.

I'm late to the party but I wanted to chime in re: your comments on the installer and 'D' in the [] brackets.

You are correct the FreeBSD installer is completely substandard. It has not changed appreciably since the first day I saw it, which was some time in 1994. It is *terrible* by today's standards.

However, you were using the package selector incorrectly. Packages with empty brackets [] are not installed yet. If a package has [X] then it is already installed. You don't put 'D' in there to delete a package. The 'D' appears if that package is a [D]ependency of another package that you have chosen to install. Dependencies are determined automatically. For example if you select the emacs package, then go searching in other categories, you will see some packages that have [D] -- these will be installed automatically as dependencies of emacs. So all you have to do is select the top-level packages you want to install. Also, to remove an installed package you clear the 'X'. If the package is a dependency of something else, you will be told about this and you have to remove the other package first (this part sucks because once installed, the installer won't tell you which package is depending on the one you are trying to remove. You have to get that info from the shell i.e. with pkg_* commands).

So there you go.

why would you run the linux_opera when there is a native (FreeBSD) opera package. Seems like you are making life difficult for yourself. ;)

Thanks for the heads-up on Opera!

The info in this blog item is about 15 months old now, and at that time I did not see the native package. Readers should expect many of the details or gotchas to be out-of-date, since this kind of diary article always has a shelf-life.

The BETA releases of FreeBSD 9 (and PC-BSD 9) are available now too, I see: the final for 9.0 is supposed to be available pretty soon: the only sexy new OS feature seems to be to allow booting from USB devices.

News Topics

Recommended for You

Got a Question?