A Penguin tries out FreeBSD 11 as a desktop operating system

A Penguin tries FreeBSD 11.0 RELEASE on an old i386 PC as his main desktop operating system, for the first time, for a weekend.

The story begins, you guess, with the operating system installation using the FreeBSD i386 hybrid image in order to boot a USB key.


Installation

Installation went without problems and everything flowed as I expected. For a user who lives in the world of Debianized Penguins, being able to install the superb ZFS filesystem is somewhat interesting at least.

A Penguin tries FreeBSD as a desktop operating system, installation stage 1

A Penguin tries FreeBSD as a desktop operating system, installation stage 1

A Penguin tries FreeBSD as a desktop operating system, installation stage 1

I also really enjoyed the system hardening dialog box, especially the possibility, install-time, to hide other users’ processes (on a Debian GNU/Linux installation, the same can be performed by mounting /proc with a hidepid=2 parameter in a later stage) and to randomize the PIDs of the newly created processes. True, those settings are better used in a server environment than in a desktop one as in this Penguin-point-of-view article, but they are damn good.

So far:

  • System installed: done.
  • Hardware recognized, even the wireless adapter: done.
  • All keyboard’s special keys can be used: good.

 

First run

First login in all its glory, behold.

“Ok, we need a desktop environment, let’s go installing GNOME Shell”. So we (me and I) thought, and had a look at the official documentation:

This desktop environment can be installed from a package:

# pkg install gnome3

GNOME requires /proc to be mounted. Add this line to /etc/fstab to mount this file system automatically during system startup:

proc /proc procfs rw 0 0

GNOME uses D-Bus and HAL for a message bus and hardware abstraction. These applications are automatically installed as dependencies of GNOME. Enable them in /etc/rc.conf so they will be started when the system boots:

dbus_enable="YES"
hald_enable="YES"

After installation, configure Xorg to start GNOME. The easiest way to do this is to enable the GNOME Display Manager, GDM, which is installed as part of the GNOME package or port. It can be enabled by adding this line to /etc/rc.conf:

gdm_enable="YES"

It is often desirable to also start all GNOME services. To achieve this, add a second line to /etc/rc.conf:

gnome_enable="YES"

GDM will start automatically when the system boots.

Actually it is not entirely correct, in fact GNOME Shell did not start then – it wasn’t hard to guess what was missing, /var/log/messages was explicative and I just had to install xorg manually:

pkg install xorg

Anyway, I think xorg (or any X.Org replacement) should be set as a gnome3 dependency and I cannot understand why package maintainers chose not to list it as such.

I have to admit that those service_enable statements attracted my curiosity: nowdays most Penguings use (and enjoy using, really) Systemd or at least any modern SysV init replacement. FreeBSD makes use of the traditional BSD-style init instead:

Many Linux distributions use the SysV init system, whereas FreeBSD uses the traditional BSD-style init. Under the BSD-style init, there are no run-levels and /etc/inittab does not exist. Instead, startup is controlled by rc scripts. At system boot, /etc/rc reads /etc/rc.conf and /etc/defaults/rc.conf to determine which services are to be started. The specified services are then started by running the corresponding service initialization scripts located in /etc/rc.d/ and /usr/local/etc/rc.d/. These scripts are similar to the scripts located in /etc/init.d/ on Linux systems.

The scripts found in /etc/rc.d/ are for applications that are part of the “base” system, such as cron, sshd, and syslog. The scripts in /usr/local/etc/rc.d/ are for user-installed applications such as Apache and Squid.

Of course I will forever thank the Linux community for not using this.

The GNOME Display Manager started flawlessly at the following boot and I felt nearly at home. Desktop language, however, was not the one I had previously selected install-time for the console-only operating system, so I had to set up my keyboard and system language (Italian) again. The latter did not work. Never mind. English is good for operating systems 😉

On my Debian 8 desktop, GNOME’s i18n strictly follows the system’s one (when having the package locales-all installed) and eventually can override it by setting its own.

So far:

  • GNOME Shell installed: task accomplished.
  • Setting internationalization: half done.

 

Digging around

At that point I realized (incredibile dictu) that no Network Manager or any other networking GUI was available or easily installable, as far as I understand. So, they worked (free as in beer work) for Apple and Microsoft in creating the networking stack for them and they did not create a network manager for themselves. Smart move.

Come to my senses again, at that point I launched the GNOME Tweak Tool in order to reduce fonts’ size a bit. Mmmm. It did not run; by launching it via terminal, it was clear that the Python interpreter was missing (dependencies are a bit aleatory, it seems). Nothing to worry about:

su -
su: Sorry

Wtf? A forum helped a lot:

Are you a member of group “wheel”? If not, you need to add that to use su. Check the output of % groups . It’s a fundamental part of FreeBSD’s security model. FreeBSD won’t let regular users su to root. They must be part of the wheel group. If you don’t like it, learn to like it, because it prevents hackers who manage to crack a user account from grabbing root without too much additional effort.

Good to know, of course I did not learn to like it. Anyway, this way I was able to install the missing interpreter and use the Tweak Tool.

 

Further customizing GNOME Shell

Usually, one has to spend some time upon their newly created GNOME Shell environment in order to make it usable and productive. For example, enabling all the titlebar buttons and installing the TaskBar extension by zpydr to me are two mandatory tasks.

I tried to install the Taskbar extension via extensions.gnome.org (I installed Firefox with GNOME Shell integration a bit sooner), but the browser gently returned an obscure “Attempting to use a disconnected port object” message.

I then chose the other way: once downloaded from GitHub as a zip package file, I moved the uncompressed extension folder (with proper permissions) to /home/<me>/.local/share/gnome-shell/extensions/. After a refreshing Alt+F2/R, setting the extension via the Tweak Tool eventually did the job.

As a note, extracting the compressed archive via GUI did not work, and file-roller was correctly installed. I did not indagate further – I guess a dependency is missing, again.

Likewise, I finally installed a GNOME Shell theme and those magnificent icons from the Secure-K operating system I own, thus resulting in a desktop customization as pictured in the following image.

FreeBSD Desktop

 

Installing other software

I went on installing the Chromium web browser and LibreOffice and some other security restrictions became evident, which have to be relaxed:

Message from chromium-56.0.2924.87_2:
For correct operation, shared memory support has to be enabled in Chromium by performing the following command as root:
sysctl kern.ipc.shm_allow_removed=1

To preserve this setting across reboots, append the following to /etc/sysctl.conf:
kern.ipc.shm_allow_removed=1

Chromium did hang or freeze on my system most of the times I launched it; maybe I did something wrong, maybe not. On the contrary, LibreOffice run like a charm.

 

Enjoying the enjoyable

So, system was set up more or less as I needed and I used it for some hours as it was my Debian desktop. Briefly, I encountered several performance issues:

  • HTML5 video on YouTube played sluggish on Firefox.
  • Desktop environment looked slow when compared to the same Debian Linux GNOME environment on the same machine.
  • I also experienced temporary freezes when pkg was installing packages.
  • Computer fan started working when doing nothing.

Something I dislike, too:

Linux users are often surprised to find that Bash is not the default shell in FreeBSD. In fact, Bash is not included in the default installation. Instead, FreeBSD uses tcsh as the default root shell, and the Bourne shell-compatible sh as the default user shell.

 

My personal conclusion

My FreeBSD weekend was nice. I managed to install the FreeBSD 11 RELEASE on my old i386 laptop without any particular fatal problem and the hardware worked completely.

I am pretty sure (and I know) that FreeBSD is an impressive operating system for servers and I like some of its default security features and of course its filesystem.

As a desktop operating system, however, it seems a bit crude and sluggish. Some package dependency problems prevent a flawless installation of the software and it lacks (as far as I know) a proper graphical network manager.

At the end of the day, I’ll continue keeping a highly modified Debian Jessie on my newer Macbook Pro as the sole operating system (I got rid of OS X a long time ago), prone to update soon to Stretch.

As a final note, even if I tested FreeBSD 11 RELEASE on the bare metal first, all screenshots of this article have been taken from a VirtualBox instance of FreeBSD on a later stage.
By the way:

  • pkg refused to work with a virtual NAT network configuration, use Bridged;
  • Virtualbox Guest Additons installed perfectly;
  • also the “VirtualBoxed” FreeBSD feels a lot less responsive than a virtualized Debian Jessie, at least on my i7 Windows 10 Intel-based super-laptop.

 

Looking for more BSD-ish road tests?