Satisfying Curiosity: FreeBSD as a Desktop OS.
Introduction
The following entry documents my journey into the world of Berkeley Software Distribution (BSD) - or more precisely, its direct descendant FreeBSD. I briefly talk about what FreeBSD is and why I decided to install it as a desktop OS, and then move onto the installation itself including applications that fit my requirements.
Note that this is not an exhaustive step by step guide to installing FreeBSD - it is more of a quick tour around the OS install with some recommendations along the way. There are plenty of Youtube videos and articles on the web covering the installation in depth, including the (excellent) official handbook(1). I'm not a fan of re-inventing the wheel :-)
Note that this is not an exhaustive step by step guide to installing FreeBSD - it is more of a quick tour around the OS install with some recommendations along the way. There are plenty of Youtube videos and articles on the web covering the installation in depth, including the (excellent) official handbook(1). I'm not a fan of re-inventing the wheel :-)
FreeBSD: What is it?
In a nutshell, FreeBSD is a free and open source, Unix-like(2) operating system available for the desktop, server and embedded platforms. It supports multiple system architectures (x86, ARM, Sparc etc.) and sees use in a wide variety of scenarios ranging from academic research to supporting some of the busiest applications on the web. To name but a few examples of its use by high profile or well known vendors:
- (Apple) MacOS X borrows parts of the FreeBSD network stack and virtual file system
- (Netflix) The OpenConnect appliance used to stream movies is based on FreeBSD
- (WhatsApp) FreeBSD supports up to 2.5 million TCP connections per server providing worldwide instant messaging
- (Sony) The Playstation 4 OS is a custom version of FreeBSD 9(3)
"..but why - it's 2017 and the desktop is dying?"
This much is true, desktop PC sales are down(4) year on year in favor of ultra slim laptops and tablets, as we move to a more mobile way of working then our everyday tools must adapt accordingly. That said, desktops still have their use in static office type scenarios or specialist applications and will be with us for quite some time yet. More importantly though, this is just a personal 'journey' and nothing more, in no way am I promoting FreeBSD as a challenger to Windows, Mac OS X or Linux.. that ship sailed a long time ago.
The Rationale
So what is the reason for installing FreeBSD then? Well it mostly has to do with history and curiosity.. I originally came across the OS at Staffordshire University somewhere around 2004, a fellow student and fan of the OS took an interest in my Apple iBook G4 (what a great machine that was) and explained that behind that lovely UI lay FreeBSD. At the time this was purely anecdotal to me, I didn’t particularly lean towards any Operating System nor partake in lengthy debates about which one was ‘best’ (common in an academic setting), I just used whichever one suited my requirements. In addition, most
other students were jumping on the Ubuntu bandwagon back then so it was
all about Linux, only the ‘hardcore’ techies or over 40’s (read: romantics)
were talking about UNIX or BSD.
However, the seed of something unknown was planted, and this usually means that one day I will spend some time researching it. Fast forward 13 years and that day has come, fueled by other reasons too:
- I’ve remained curious about UNIX throughout my career so far - IBM AIX was my main platform for two years while working on an NHS project and I’ve briefly flirted with Solaris, but the BSD’s are unknown territory
- I can’t help but tinker with technology when given the time, especially systems that I have yet to experience and know little about. There is just a desire to install it, play around with it, read the documentation, get a real idea of the ecosystem and the benefits of using such a system*
- I’ve been running Linux Mint 13 on my aging AMD desktop for some time and while it is super stable, it is in need of an update. I’ve tried Mint 18, but the system required me to disable Dynamic Power Management via the ’radeon.dpm=0’ kernel parameter to stop an infinite boot loop. To be fair to Linux, this isn’t particularly a valid reason to jump ship to FreeBSD (it’s more about my hardware), but it annoyed me enough to look elsewhere
Target Hardware
As stated above, the target hardware for the installation will be my AMD(ATI) desktop PC. Normally I would trial any new OS in Oracle Virtualbox first (VM backups are priceless, especially when chances are high that you will screw something up), but one aspect of FreeBSD that I wanted to assess was driver support for my particular hardware. It has been known for years that AMD(ATI) support for *nix isn't great, but to complicate things further my system contains an AMD APU, which can only be described as a mashup of AMD graphics technologies(5).
Anyway, here is a brief summary of the hardware:
- CPU: AMD A4-5300 APU
- Motherboard: MSI FM2-A75IA-E53
- Memory: 4GB DDR3
- Hard Disk: 500GB
Base Installation
As one might expect, installing FreeBSD is very much like installing Linux, you have the ability to control which packages are installed, define how the hard disk should be organised (partitioning) and steps to initialise network interfaces. In addition, boilerplate settings such as timezones and keyboard maps are also included. It is important to note however that with FreeBSD the installation is only a 'base install', meaning that only the packages necessary to get the Operating System up and running are included. If you wish to use a Graphical User Interface (GUI), then additional installations of Xorg(6) and a Desktop Environment(7) will be required.
Here are some of the more interesting screens during a typical installation:
Here are some of the more interesting screens during a typical installation:
![]() | ||||
| ASCII-Art! Good start :-) |
![]() |
| Wow, this reminds me of the Windows XP installer!** |
![]() |
| A recommended disk layout for home use. |
![]() |
| Security Hardening - This would make a great blog entry ;-) |
Before moving onto the other applications that were required to make this a fully fledged desktop OS, I took a moment to look at system resource utilisation; afterall, a base system with access through a shell cannot be using much CPU or memory.
![]() |
| Lean! |
As you can see - 17MB RAM used! To be honest, I totally expected this, I've used slimmed down Linux distro's like Puppy or TinyCore before so this doesn't come as any surprise.
Sudo & Shell Installation
Before I could move on to installing a GUI and all of the applications one might expect from a desktop, there were a few configuration tasks required:
- Install sudo - not mandatory, but I don't want to be working as root more than I need to
- Install bash - again not mandatory, but it has many advantages over the bourne shell
- Add the primary user (stephen) to the video group - required so the GUI (when installed) can access the radeon video driver
- Configure sudo to allow users in the wheel group to run any command - i.e. the user stephen
- Set bash as the default shell
I said I wouldn't be producing a step by step guide in this blog, but command references are always good to look back on..
To install sudo and bash (and bootstrap pkg), run as root: pkg install sudo bash
To add the user stephen to the video group, run as root: pw groupmod video -M stephen
To configure sudo
- Run as root: visudo
- In the resulting editor, uncomment the line: %wheel ALL=(ALL) ALL
To set bash as the default shell
- Login as the primary user (stephen) and run: chsh -s /usr/local/bin/bash
- Logout and then log back in for the change to take effect
Desktop Environment (GUI) Installation
I was now in a position to get the GUI up and running. There are a number of Window Managers or Desktop Environments (DE) that I could choose from within FreeBSD, including the popular Gnome and KDE environments, but I'm a fan of lightweight systems so XFCE is my DE of choice. In addition, FreeBSD doesn't ship with drivers for my graphics hardware, so I had to install them too. Continuing on with the command listings:
To install the Xorg display server, ATI driver and XFCE, run as the primary user: sudo pkg install xorg xf86-video-ati xfce xfce4-mixer
For XFCE to run properly, the dbus and hald services (daemons) must be enabled and started at boot. Dbus provides a message bus for applications to talk to each other (IPC) and Hald provides both a hardware abstraction layer and database of devices connected to the system. To enable these safely, as opposed to editing the rc.conf files by hand, run as the primary user:
sudo sysrc dbus_enable="YES"
sudo sysrc hald_enable="YES"
.. and reboot. Finally, I could start the GUI with: startxfce4
![]() |
| Vanilla GUI with a more appealing background. |
Application Installation(s)
Back in the sudo and shell installation section, I mentioned that I require a desktop with all of the applications one might expect. Expectations of a desktop OS are subjective, but I would expect to have at least:
- Web Browsers - Chromium and Firefox
- Office Suite - LibreOffice
- MS Paint Equivalent*** - KolourPaint
- Image Viewer - GImageView
- Media Player - VLC
- Archivers (Zip, RAR and 7z) - Xarchiver and p7zip
- Games - DOOOM! (OK I wouldn't actually put this as a minimum requirement of a desktop, but you've got to have FUN with these things!)
So putting all of that together, what does my desktop OS look like?
![]() |
| Productive! |
Footnotes & References
* Given my industry experience I already know that FreeBSD excels in the server arena, but this blog isn't about the server of course.
** No I'm not trolling ;-)
*** It may come as a surprise that I have mentioned an MS Paint clone as one of my requirements, I'm sure many of you would have expected me to mention The GNU Image Manipulation Program (GIMP). While GIMP is great, it is more complicated to use than a simple paint application.
(1) https://www.freebsd.org/doc/handbook/
(2) https://en.wikipedia.org/wiki/Unix-like
(3) https://www.theregister.co.uk/2013/11/16/sony_playstation_4_kernel/
(4) https://www.theregister.co.uk/2016/12/01/idc_pc_market_prediction/
(5) https://www.notebookcheck.net/AMD-Radeon-HD-7480D.89982.0.html
(6) https://en.wikipedia.org/wiki/X.Org_Server
(7) https://en.wikipedia.org/wiki/Desktop_environment







Comments
Post a Comment