FreeBSD

I picked this one up while collecting information on how to install FreeBSD for desktop use at home. As I found it is certainly possible. If the default install of PC-BSD with its full KDE4 installation is too bloated for you, consider reading this. It was originally written for and published on kompasmedia.nl.

The site has been down for a longer period of time and I would hate for this guide that is so easy to follow for newer users interested in the subject to get lost. It was linked on freebsdnews, and there are more useful links at the bottom of this page. If you're new to trying FreeBSD on your desktop - enjoy.

FreeBSD as a desktop OS

Saying that FreeBSD is an excellent choice to build a server upon would be stating the blatantly obvious. Sadly though, FreeBSD as a desktop OS is a much less common sight. This is a shame, particularly for developers who could have a desktop that closely mimics the configuration of FreeBSD servers in a remote datacenter. Very useful if you need to test things locally!

Since FreeBSD is a UNIX-like OS like Linux, just about all the software you can get for Linux is also available for FreeBSD. Significant exceptions are parts that are very closely linked to the OS kernel. Hardware support differs between OS'es so make sure you check the Hardware Notes that accompany every FreeBSD release to make sure your system is compatible.

Software management

To ensure long-term productivity using FreeBSD it would be very wise to use the integrated software management tools. They prevent a lot of problems with dependencies between software packages when it's time to upgrade parts of your system.

FreeBSD allows you to go about package management in two ways: binary packages and ports. Binary packages are completely pre-built installable versions of software. Ports, on the other hand, make use of the original source code of the software to build a tailor-made version of the package completely optimized for your particular system.

Binary packages have one major advantage: speed. They're really easy and fast to install. Ports are much more flexible though, and they usually are closer to the bleeding edge of development. Many ports present you with a configuration menu prior to installation. Using this you can customize the way the software gets built. Binary packages don't allow this flexibility and come with a generic default configuration set.

Best of both worlds

Fortunately you don't have to commit to either one of the mechanisms. For example, setting up a working base system is really fast when you use packages. You can then upgrade your system to the absolute bleeding edge using ports from a terminal session that runs in the background while you get on with some real work.

This article assumes we're building a system completely based on ports, even if installing them takes more time. For a desktop system having the very latest software can be a major improvement. First we'll pull in some tools to make life a little easier on our bare FreeBSD system (install the 'Developer' set without the ports collection).

#portsnap fetch
...
#portsnap extract
These commands fetch the current ports collection and store it in /usr/ports. In theory this is enough to get started using ports. However, the use of the ports collection becomes a whole lot easier thanks to tools like portupgrade, a collection of useful tools to automate much of the ports management.

To prevent a lengthy build of the Ruby programming language we'll cheat just this once and get a working portupgrade toolkit from binary packages:

#pkg_add -r portupgrade

Now that portupgrade is present on the system we only need three commands to install a complete GNOME desktop environment on the system. Like so:

#portinstall -rR xorg
#portinstall -rR gnome2
#portinstall -rR gdm

The 'gnome2' and 'xorg' ports are metaports. A metaport doesn't contain any software itself, it only points towards all the parts needed to assemble a larger collection. A desktop environment like GNOME consists of hundreds of components. Each of these is installed separately. The main advantage of this is the fact that each component can be upgraded or replaced individually without needing to replace the whole desktop environment. The above three commands take hours on a fast systems and may take days on older hardware. Do make sure you have the time for such an operation.

If this takes too long, you can also fetch part of your software from binary packages using the 'P' option with portupgrade. The above commands would change to:

#portinstall -rRP xorg
...

Any component that is available as a binary package in the correct version will now use the package instead of build from source code.

If your system is part of a group of systems that will all get the same configuration, you can use portupgrade to generate binary packages for the other systems so that they won't have to repeat the lengthy build process.

It's not uncommon to find a single system that builds packages from ports for use on the actual production systems. This prevents a surplus of development packages on your production systems. They may be needed to be able to build your software, but they're not required for running it. Automatically building packages, which get stored in /usr/local/ports/packages/All, works with the 'p' option to portupgrade:

#portinstall -rRp xorg
#portinstall -rRp gnome2
#portinstall -rRp gdm

When all ports are done installing, it's time for some configuring. Our goal is a system that boots into a graphical login screen and from there into the GNOME desktop environment.

The days of hand-crafted X11 configurations are long gone. On almost any system you'll only need a single command, as root:

#Xorg -configure

This provides you with a new config file in /root. The above command returns information you can use to test your new config file. If everything goes well (ctrl-alt-backspace shuts down the X11 test session), you should move the file to /etc/X11/xorg.conf.

Now /etc/rc.conf needs a few finishing touches to fully support the GNOME desktop environment:

gdm_enable = "YES"
dbus_enable= " YES"
hal_enable = "YES"

If all went as it should, you'll reboot into a graphical environment that has quite a bit of software ready for you to use.


Stay current using ports

The ports collection is an excellent way to keep the software on your FreeBSD workstation fresh. Maintaining a current ports tree became a snap with the introduction of the portsnap tool.

Apart from the first time using portsnap is practically always the same. You can update your ports tree with:

portsnap fetch && portsnap update

Then you should check if the new ports collection has any upgrades available to software already on your system:

pkg_version -v | grep '<'

This gives you a list of packages for which a newer version is available in the ports tree:

portupgrade -arRp

This command not only upgrades your software but also checks all dependencies. The 'p' in the command line makes portupgrade build binary packages of your upgrades. Most of the time this isn't needed and you can freely leave the 'p' off your command line.

Date posted: 20 August 2010, with thanks. First published 17 November 2008 on http://www.kompasmedia.nl/en/linuxunix/freebsd-als-desktop-os.html

Labels

12.04 LTS (1) 1280x1024 (2) 14.1 (1) absolute (3) accessibility (6) administration (2) afterstep (1) android (3) announcements (13) anonymity (5) anonymous (1) anonymous browsing (1) anti-malware (1) anti-virus (1) antiX (2) applications (1) arch (9) archbang (11) archone (1) authentication (1) backports (1) bash (2) bittorrent (2) block-this (1) bodhi (1) books (1) browsers (5) browsing (1) bsd (2) bug (2) bugs (3) calculate (1) centos (1) certification (1) chakra (2) chat (1) chatzilla (1) chromebook (1) chromium (2) click (1) commodore 64 (1) crunchbang (5) crux (1) ctkarch (1) debian (21) desktop (55) devuan (1) digital certificates (1) digital memories (1) distributions (72) documentaries (1) documentation (2) dr. web (1) drivers (1) duo (1) e17 (1) encryption (3) enlightenment (1) events (1) exit nodes (1) fake (1) fallout (1) fallout 4 (1) fedora (6) firefox (3) flash (1) flush (1) fluxbox (6) fluxflux (1) FPS (2) free software (2) frugalware (1) FSF (1) fusion (1) fvwm (1) fvwm-crystal (1) games (10) gaming (9) gentoo (2) gnome (8) gnome shell (4) gnu/linux (4) google (2) google-chrome (3) graphics (1) grml (1) hangouts (1) hardcore punk (1) hardware (3) how-to (22) humor (2) icewm (3) init (2) init freedom (2) interview (1) introduction (1) jibbed (1) jwm (1) kanotix (2) kde (17) kde3 (2) kernel (6) knoppix (1) kongoni (2) kubuntu (1) LAS (1) libtorrent-rasterbar (1) linux (18) linux light (12) live (40) live medium (13) live system (7) liveslak (1) lxde (12) lxqt (1) mageia (1) mandriva (1) marine life (1) mate (1) media center (4) mepis (2) mint (2) mobile (2) mobile security (1) movies (5) mozilla (3) music (1) netbook (2) networking (4) news (3) nvidia (1) open source (1) openbox (13) openSUSE (2) opinion (12) other (5) overclockix (1) packages (1) pclinuxos (2) perl (1) poll (2) porteus (3) privacy (5) privoxy (1) programming (1) proxy (2) puppy (3) qbittorrent (1) qt (1) quick look (10) ratpoison (1) red hat (6) relax (1) release (1) reviews (49) rhythmbox (1) RPG (2) sabayon (5) salix (15) scientific (7) screenshots (2) scripts (3) security (3) semplice (1) server (3) shell (1) shooter (4) siduction (1) slackel (1) slackware (50) slackware 14.2 (1) slackware-current (10) slax (7) slitaz (1) smart phones (2) sms (1) south africa (2) specialist (1) spoof (1) surfing (1) systemd (2) table mountain (1) TDE (1) tegra k1 (1) themes (1) tinyme (1) tips (1) tor (3) torrenting (1) torrents (1) traffic analysis (2) trinity (2) trisquel (1) ubuntu (4) unity (2) unity linux (3) unix (1) upgrade (5) vector (2) video (3) vinux (2) virtualbsd (1) visual impairment (5) voip (1) vpn (2) wallpapers (3) window maker (4) window managers (1) wireless (10) xfce (13) youtube (1) zenwalk (3) zoo (1)

Linuxtoday.com