
A FreeBSD 10 Desktop How-To - vasili111
https://cooltrainer.org/a-freebsd-desktop-howto/
======
janoc
Uff, that was a trip down the memory lane. That article strongly reminded me
of what Linux was like - some 10-15 years ago. Nothing preconfigured,
everything had to be set up by hand using config files, sometimes using magic
incantations from the shell.

I do get that some people prefer things this way (I used too when I was a
student and had plenty of time to spend on tinkering - heck I have installed
Slackware from floppies in 1995) and it certainly lets you understand what is
going on your machine in minute detail, but a desktop machine is a tool for
the most people - they need to get work done, and don't want to have to mess
with the OS to get even basic stuff like networking or desktop running.

I think I will stay with my Mageia on my machines ...

~~~
zzzcpan
Don't be ridiculous, Linux [1] is not better at this. Maybe out of the box
experience is a bit nicer, but it's not generally just usable after that. Want
a properly working network? Guess what - network manager is the problem, you
have to disable it and configure network interfaces manually with config files
and everything. Or want vim as a default editor - good luck with config files,
"update-alternatives" shell magic is the only way to change it. Want to
disable avahi, mlocate and other annoying stuff? Dig deep into configs and
.overrides and magic chmods (hud-service). Locales are of course incorrect by
default too. And it's not even close to everything, far from it. That's why I
have like a 500 line shell script to automate configuration after
installation.

The only way to make it better is to recognize the problem and make a new
distribution with a decent well thought out package and configuration manager.

[1] I'm talking about desktop Ubuntu of course.

~~~
Keyframe
That's what Linux on desktop is always about. First contact, and it all looks
fine. But then, you want a certain application installed and use it or
whatever and things start getting haywire (from user experience perspective).
Within half an hour of fresh install you're on some obscure old and closed
topics on forums or IRC begging for help, etc. Once it works it's great, but
that's how it is.

I use MacOS on my laptop, Windows 8.1 on main workstation and Fedora 24 / XFCE
on another workstation daily. Each and every OS has some things I wish the
other OS would have and i can't decide which one is 'the best'. There's no
such thing.

I'd say the closest thing to an ideal situation (for me) would be a Fedora OS
with MacOS-like opaqueness to configurations and upgrade, Adobe, Games, and
Office applications from Windows (they work better on Windows) and preview
(spacebar and app) from MacOS in it. At that point I wouldn't even care if, at
its core, it would be Linux or BSD or NT.

~~~
karma_vaccum123
Chrome OS will get close to this once it gets Android app support.

Microsoft supports Office apps for Android as a first-class port.

Chrome OS is "opaque"...there are very few knobs to turn.

Games will be covered as long as you mean mobile games.

------
jlgaddis
I'm a big user of FreeBSD on the server (in production) and came across a link
to this a while back in a forum post and decided to run through it just to see
how accurate it is (there are a _LOT_ of out-of-date FreeBSD "how-to" articles
out there. "n00bs" are often referred at this one and, if you follow it, you
will generally end up with a working system.

There are a few things that could be improved, however.

I would recommend not blindly copying the sysctl values provided. Many of them
were already set _higher_ by default on my test system. By copy/pasting the
suggested values, I was actually lowering the values (maxfiles, shared memory
settings, etc.).

Another big one was device permissions. For a single-user machine, they're
probably okay. If another person will ever have access to your machine,
however, you're probably granting them _way_ too many permissions.

In short, if you're just wanting to bring up a FreeBSD desktop to play around
with, this will probably get you there. You might also consider PC-BSD [0],
which takes of all the hard work for you.

Once you're up and running, head over to the FreeBSD Forums if you encounter
any issues.

Welcome to FreeBSD!

[0]: [http://pcbsd.org](http://pcbsd.org)

[1]: [https://forums.freebsd.org/](https://forums.freebsd.org/)

~~~
isxek
Are there similar guides for those of us wanting to try a dual-boot setup
between PC-/FreeBSD and Windows? I remember not finding any straightforward
guides more than a year ago when I decided to move away from Windows. I'm on a
Linux distro now, but if I can find a suitable guide, I will try it (probably
on a VM first).

~~~
qwertyuiop924
I don't know. But it shouldn't be too hard. Just install FBSD after windows,
and find some instructions for booting windows from boot0/booteasy, the
freebsd bootloader, or take the easy way out and get grub2 from the package
repository, and follow the instructions for setting that up, followed by the
instructions for dual booting windows and linux, with any obvious
modifications.

------
cs702
FreeBSD is _amazing_ , but it suffers from one big problem: the number of
people using it is so small that many things that are easy to accomplish on
Linux and other operating systems prove incredibly inconvenient or impossible
on FreeBSD because no one has bothered to do them before.

This is best explained with an example. Say you want to install TensorFlow
with CUDA 7.5 and cuDNN v4 support, which is necessary for training large
neural nets.

Here's how you do it on, say, Ubuntu:

    
    
      sudo pip3 install --upgrade [Official TensorFlow URL]
    

And here's a blog post with a long list of instructions, explanations, and
caveats for doing the same thing on FreeBSD:

    
    
      https://ecc-comp.blogspot.com/2016/06/tensorflow-on-freebsd.html
    

Except that on FreeBSD apparently no one has posted instructions for getting
CUDA or cuDNN to work with TensorFlow, so you're in for a world of "fun"
trying to figure out how to do that on your own.

~~~
danieldk
Isn't the problem that that CUDA for FreeBSD does not exist in the first
place?

~~~
loeg
Nvidia can't be bothered to port it.

------
hs86
Compared to Linux distributions for me the most interesting difference of
FreeBSD isn't the license or somewhat exclusive features like dtrace/ZFS. It
is the release model which separates the "stable/LTS" base and the rolling 3rd
party software.

In (for example) Debian stable I have a very reliable system but any annoying
bugs in end user software will remain for the next several years. But going to
a rolling release distro could result in unexpected troubleshooting sessions
while I actually had to be productive instead.

So there are drawbacks of going to a full rolling or a full stable distro and
imho the FreeBSD model is the best balance between both extremes. Why isn't
there a Linux distro like this?

~~~
takeda
openSUSE is IMO relatively close to that, due to their superior packaging
system (it's best one I know).

So if you use normal release (not tumbleweed) you are fixed to the package
versions when suse was released, but you can go to OBS[1] where you can obtain
latest version of software. Their 3sat dependency solver makes sure that
dependencies are resolved correctly. Another interesting thing is that they
group package upgrades into patches, with description and other details. You
can for example issue zypper patch --have <cve> and instead everything that
resolved specific vulnerability. I also love zypper ps showing which processes
need to be restarted after the upgrade.

[1] [http://software.opensuse.org](http://software.opensuse.org) which is like
github for packages (it supports other distros as well) most packages are
there in latest versions.

~~~
tavert
The wonderful thing about OBS is you can branch a package, make modifications
to your personal version, and add that new repo as a source for zypper to pull
from, incredibly easily. PPA's and Launchpad are orders of magnitude more
complicated to do the same task.

------
Lammy
Author here. There will be an update to this page soon that talks about
FreeBSD 11, dual booting, laptops (Mac EFI weirdness, lagg for lan/wlan
failover), updates to some out of date sections like the fonts and manually
configuring X. To its credit the reason it's out of date is that I haven't had
to think about my computer at all since 10.0 aside from updating my packages
and freebsd-update-ing to new point releases twice a year.

~~~
quesera
This is a great resource. I've pointed many people to it in the last couple of
years.

Thank you for putting it all together, and I look forward to your updates!

------
obtino
I for one am grateful to NVidia for providing a FreeBSD driver to this day.
Their dedication to providing support for UNIX systems is admirable.

~~~
cm3
I was curious to know what FreeBSD versions NVidia supports, and I cannot
believe it's 7.3 to 10-CURRENT. This makes me believe they will quickly follow
up with 11-CURRENT. This is very cool in terms of FreeBSD's kernel API.

[http://us.download.nvidia.com/XFree86/FreeBSD-x86/367.44/REA...](http://us.download.nvidia.com/XFree86/FreeBSD-x86/367.44/README/minimumrequirements.html)

We know that the likes of Pixar or LANL use NVidia on Linux, for them to take
Linux seriously, but is there information who the important FreeBSD and
Solaris customers are? Is it The Weather Channel's FreeBSD IntelliStar system
that motivates NVidia to support it? And what about Solaris?

I mean, I want to believe NVidia supports FreeBSD and Solaris because they
already support X11, but these are three different kernel drivers. With a
business like NVidia, which isn't supporting open source graphics stacks like
AMD or Intel are, I have to ask myself what the commercial motivators are.

------
todd8
As an ex-Unix kernel developer, I always thought FreeBSD and OpenBSD were just
more comfortable environments for me than Linux. However, the desktop
experience, and especially getting X to work well with my hardware (multiple
monitors and graphics cards for example) eventually won me over and I simply
try to find a Linux distro that supports my hardware best.

I agree with qwertyulop924 who points out its nice being able to understand
the system's configuration. Now though, I'm with johnchristopher, manually
configuring Xorg is where I reach my limit and just want it to be magically
done for me.

~~~
sdkmvx
I haven't needed to configure X on OpenBSD at least five years now. The X
server does that automatically, just like on Linux. For the record, I haven't
needed to on FreeBSD either, but I've run that much more sporadically, so take
that with a grain of salt.

My impression was that Xorg has obviated the need for manual configuration in
all but the most extreme cases. Multiple monitors are easy with xrandr, but
I'm not sure how multiple graphics cards will work.

~~~
todd8
Yes, I've heard that things are much better now. I switched my desktops, not
servers, to Linux years ago.

------
znpy
My two cents: this is all nice and fun if your purpose when using a computer
is learning about computers, but you don't do any _actual_ work.

When you stop "messing" and need to do actual work, you are going to really
appreciate a system with sane defaults (graphic environment working out of the
box, drivers pre-installed, plug&play and audio stuff that just work) that can
work predictably.

Of course, no system is immune to stupidity: yes, even on Ubuntu you must be
aware of what are you doing and what consequences it will have.

For me, avoiding third-parties repository and going from LTS to LTS solves 95%
of the problems, and in exchange I have a stable desktop machine that works
all the day, everyday.

I have been messing around with Slackware, FreeBSD, Gentoo and NetBSD in the
past and I am now a happy Xubuntu (and ubuntu-server) user.

------
tgarma1234
I never got far with FreeBSD on the desktop because every time I thought I
would give it a try I ended up just thinking Linux is easier to use and my Mac
is already basically the same thing but pre-configured, so it's a pretty
expensive hobby unless you have a lot time or just really like playing with
the details of your operating system. I agree there are philosophical reasons
you might prefer FreeBSD to other operating systems. Anyway, my favorite part
of that blog post is this:

# Handle Unicode on removable media libiconv_load="YES" libmchain_load="YES"
cd9660_iconv_load="YES" msdosfs_iconv_load="YES"

~~~
floatboth
"Linux is easier to use" heh. Well I mean Ubuntu is easy to use, sure. Until
you want to change things, then it gets in your way.

Every time I try Linux, nothing makes sense to me. Why is there a weird,
unfriendly `ip` command instead of `ifconfig`. Why is systemd doing the "*
Waiting for some bullshit … [∞ seconds]" thing on shutdown instead of killing
everything. Why does the bootloader (which is now part of the systemd project,
of course) use EFI variables instead of just putting itself at
/EFI/BOOT/BOOTX64.EFI. Why is there so much crap exposed as mounted
filesystems. Why is there no separation between the base system and user
packages (/usr/local).

Modern GNU/systemd/Linux just doesn't feel right.

~~~
sp332
Killing everything on shutdown doesn't seem like a good idea. Programs should
be able to shut down cleanly.

~~~
astrange
Your data isn't safe unless every program can handle being randomly killed.
The power can always go out.

Now, once all your programs can be immediately killed, why would you ever not
want to do that?

~~~
sp332
Isn't it better to neatly close up remote connections instead of leaving them
hanging to time out? I'm thinking of web servers and database clients.

~~~
astrange
The kernel should close all your TCP connections properly when you die, so it
should all be good. Mostly you need to autosave files every so often.

------
digi_owl
> GNOME 3, available on Linux since 3.0 in the spring of 2011, is finally
> available in the official FreeBSD tree as of November 2014. The three and a
> half year delay is thanks to the upstream GNOME project’s years-long fight
> against any operating system that doesn’t have a penguin for a mascot. It
> took several years and a vastly waning userbase, then suddenly they care
> about portability again. Sure, okay. Either way, it’s here and you can
> install it from x11/gnome3.

Well thats interesting...

~~~
qwertyuiop924
Gnome3 is in a fight againt anybody who doesn't just want to look at the
pretty colors. It really doesn't do anything right.

~~~
cm3
And even if you don't use GNOME3, Gtk3 is now required by Firefox, including
Firefox gtk3 bugs, which will be fixed in Firefox. Most importantly the many
regressions of Gtk3 itself. Gtk3 was a good refactoring to support Wayland and
HiDPI, but it's not stable or fast yet for everyone, like Gtk2 has been. I
accept the fact when gtk devs argue that gtk2 has many architectural bugs, but
day to day as a user I don't notice them, and I very much prefer the old file
dialog, for instance.

Gtk3 may be faster in theory due to GPU acceleration as a possibility, but
when Gtk 3.20 for a split second shows a black rectangle for each new dialog
while it's opening, I have a hard time taking their gpu acceleration argument
seriously.

I tried building Firefox 48 with gtk2, but it crashed in the file dialog,
while the gtk3 build is slower and introduces gui regressions (yes, I've
reported the gtk3 bugs). Right now I cannot move past Firefox ESR with gtk2,
and I hope I can still use Firefox next year.

What I'm saying is that GNOME3's stack (especially Gtk3) doesn't seem to work
outside GNOME3 as compatibly as Gtk2 does, and it may be what's intended, if
past communication from the GNOME dev team is any indication.

~~~
badsock
It made me so sad when Firefox switched over to GTK3, and now I'm stuck with
their foolish attempt at improving the file browser. For whatever reason by
default it tries (and fails) to open a network connection, and they broke the
ability to navigate through the filesystem using just the keyboard.

~~~
cm3
> foolish attempt at improving the file browser.

[https://bugzilla.mozilla.org/show_bug.cgi?id=1267863](https://bugzilla.mozilla.org/show_bug.cgi?id=1267863)

[https://bugzilla.mozilla.org/show_bug.cgi?id=635044](https://bugzilla.mozilla.org/show_bug.cgi?id=635044)

I predict that someone will get fed up enough to revive the Firefox Qt port,
since Qt doesn't break as much between releases, and it doesn't conflict with
Mozilla's plans to drop GTK2 support. The memory overhead of Qt is absorbed
within a modern browser's memory needs.

~~~
badsock
An up-to-date QT FireFox port would make me so happy :)

------
ChuckMcM
This is a great intro, it seems it hasn't been updated in a couple of years
(last history update is 12/26/14 (or 26/12/14 :-)) but it shows pretty clearly
all the steps to turn your FreeBSD install into a desktop environment hosting
OS.

Now I just want a company/org that will in conjunction with a decent machine
setup. Basically I want Sun Microsystems back where they have some great
hardware engineers put together a desktop system, and great software engineers
that can put together a well integrated and desktop environment.

------
cm3
And if you want to use an external usb disk that's shared with FreeBSD, you
can use [https://www.freshports.org/sysutils/fusefs-
lkl/](https://www.freshports.org/sysutils/fusefs-lkl/) to fuse-mount with the
original linux kernel filesystem code. Once lkl is updated to 4.7 or 4.8,
ext4's encryption support should allow a shared, external usb drive that work
with Linux and FreeBSD, but I don't know if lkl will also support the keyring
on FreeBSD.

------
qwertyuiop924
I don't love magic - arch is on my desk, but I do love videogames, so as much
as I thing the BSDs are Really Cool, they're not going on my desktop until
they can run steam reliably through the emulation layer (and maybe not even
then: I remember the days of WINE).

Now a laptop or ARM chip, on the other hand...

~~~
cm3
[https://github.com/SteamOnFreeBSD/SteamOnFreeBSD](https://github.com/SteamOnFreeBSD/SteamOnFreeBSD)

~~~
qwertyuiop924
Yeah, but how well can I trust that all my games will work? I don't know. I
might boot it off a second disk or something, to check...

------
finid
If you want to enjoy the benefits of a FreeBSD desktop without all the hassle
of making it to just work, take PC-BSD for a spin.

[http://pcbsd.org](http://pcbsd.org)

------
redpanda_ua
Awesome, thanks for posting. Been a while since I wanted to try any BSD but
never got my hands around it. Might just put in into VM and play around. Just
like I started with Linux.

------
xvilka
There is Gentoo/FreeBSD project[1] too, to provide portage tree on top of
FreeBSD system.

[1]
[https://wiki.gentoo.org/wiki/Gentoo_FreeBSD](https://wiki.gentoo.org/wiki/Gentoo_FreeBSD)

------
youdontknowtho
I can't wait to see this guys face when he finds out that Jordan Hubbard wants
to implement something very much like systemd in a future version of freebsd.

~~~
qwertyuiop924
Not OP, but it depends. If they take the good bits (simple unit files, process
monitoring), and ignore the bad bits (trying to do everyone else's job,
sinister plans for world domination, no fun at parties), than I'd be cool with
it.

heck, just stick process monitoring into the rc.d model. You'll get the Best
of systemd. Especially if you don't take the Rest of systemd.

~~~
VLM
Sometimes I run end user-ish stuff under /usr/ports/sysutils/py-supervisor and
sometimes under the rc system.

The features of supervisord are very nice, the simple config, the password
protected web interface for semi-sysadmin users to access and restart their
memory leaking Java processes. Basically what you list as killer features.

On the other hand its not ready for prime time as a /bin/init replacement, I
don't NEED the features they're just nice, and the only thing more annoying
than having to learn all the peculiarities and bugs and workarounds and syntax
of one init system, is having to learn two init systems.

I can imagine a world where freebsd base uses rc and "Everything in ports and
pkg-ng uses supervisord". I'm not sure if I like it or dislike it, but it is
at least imaginable.

In my infinite spare time I was writing a compiler that translates
supervisord.conf files into shell RC files. Most of the time its pretty
simple.

~~~
qwertyuiop924
Yeah, that's what I mean. I'd be pretty happy if FreeBSD picked up s6, or
something else in the daemontools family, if it really wants to go in that
direction.

Frankly, even SMF would be better. For all its faults, its still got a good
idea of its place: It's an init system, no more, no less.

Here is a list of things I would be concerned about my init system doing:
_anything other than being a good init system._ By coincedence, that's exactly
what systemd does.

------
dingdingdang
I would love to trial on a Macbook Pro 15 Retina that I've got available,
anyone has experience with this sort of hardware setup?

~~~
gf263
Don't run natively, it's almost impossible. Try Virtual Box or VMWare

~~~
floatboth
It's not impossible! It won't support the built-in Wi-Fi (because Apple still
uses goddamn Broadcom), but Intel graphics work great.

------
eriknstr
I've been running FreeBSD servers for several years now and have previously
tried to use FreeBSD on the desktop as well. Recently, I bought a laptop and
put FreeBSD 11.0 with a graphical desktop on it. This is my one and only
laptop I use currently. The laptop is a Lenovo ThinkPad T520 with 8GB RAM and
a 120GB SSD in place of the original spinning disk and four gigs of RAM. The
T520 was released in 2011.

It works pretty nicely, except that the battery discharges from 100% down to
where the laptop shuts down in just 1 hour (pretty much on the second), and
also, suspend doesn't work of course. I also have not found out how to get the
Fn-buttons to work for screen brightness and such. Also, audio over Bluetooth
does not appear to be supported in FreeBSD 11.0, so I can't use my wireless
headphones.

Things that _do_ work include:

\- The fingerprint reader, thanks to security/fprintd and the
security/fprint_demo tool.

\- Webcam using cuse4bsd compiled from upstream source and multimedia/pwcview.
The cuse4bsd in the ports collection does not work with my camera. pwcview
supports up to vga (640x480) resolution and 30 fps, and this works using my
camera. Not sure what the real max resolution and frame rate of the webcam is
supposed to be but this is good enough for me.

\- Hardware accelerated 3d graphics using the proprietary binary driver by
Nvidia.

\- The most important GUI applications I need all work, including but not
limited to; rxvt-unicode, Mozilla Firefox, Chromium, LibreOffice Writer,
Blender, Inkscape and VirtualBox.

\- External monitors connected to the DisplayPort.

\- Built-in WiFi.

\- The SD-card reader.

\- Speakers, as well as the audio jack. Using audio/pavucontrol, I can play
from multiple sources to different destinations at the same time.

There are some parts of the hardware that I have not yet tested, including the
built-in 3G modem, because I do not currently have a subscription with a data
plan. (My cell phone is not a smart phone, I use an iPod touch on WiFi instead
and get _almost_ the same experience I would with an iPhone.) I have also not
yet tested audio over DisplayPort as far as I can remember.

Currently, Blender can not be found in the binary packages provided by
FreeBSD, even though it is in the ports tree, but that's no biggie since I'm
building all the packages myself using Poudriere anyway, because I have some
options which I want set differently from what they are set to for the
packages in the official repositories.

I intend to figure out how to get suspend working and how to get acceptable
battery life eventually. I think most of the bits of what is needed have
already been written, and it's mostly a matter of finding out where these
things are and how to enable them.

In order to have an environment that I can easily modify and recreate, I
forked the FreeBSD source tree and ports tree on GitHub, and I made an
additional repository detailing my configuration.

Here is a screenshot I took of my laptop yesterday:
[https://raw.githubusercontent.com/eriknstr/ThinkPad-
FreeBSD-...](https://raw.githubusercontent.com/eriknstr/ThinkPad-FreeBSD-
setup/screenshots-2016-08-26/screenshot.png)

~~~
dijit
I would recommend OpenBSD for laptops. I'm not sure why, but my machine under
FreeBSD had similar power issues and enabling apmd did nothing to resolve
them.

I installed OpenBSD because someone said it supports think pads better and
they were absolutely right, my machine is cool, quiet and the battery lasts
ages. OpenBSD also requires X11 to be installed for ports to work, so maybe it
is designed more for desktop use?

For reference I'm using a Lenovo Thinkpad x201s

~~~
Assembly64
But will the FreeBSD Nvidia driver work in OpenBSD?

~~~
floatboth
No.

They make their driver for Solaris though :D

------
andrewfromx
the screen shots look amazing but I'm so involved with ubuntu at this point.
should I really try FreeBSD because I really gain something ubuntu doesn't
offer me?

~~~
rev
For some people the problem is that Ubuntu offers _too much_. For some it
offers _the wrong thing_ (systemd craze, for a start). Actually, if you're
being involved with Ubuntu in a good way, learning things, trying out new
concepts, I would say stay with the course. But try *BSD by all means, some
time in the future :)

------
sreehariani
Thanks, It Was Helpful

------
dschiptsov
Someday I might go back to FreeBSD.

The time I have spent doing things like

    
    
       apt-get remove unity* libqt5*
    

to rip off all the bloatware and reduce everything back to just gdm + gnome-
shell + gnome-terminal + emacs-gtk3 + chrome with pdf viewer + hangouts is
comparable with bootstrapping all this from FreeBSD ports (unfortunately
without hangouts).

Notice, by the way, how easy and intuitive plain text configs done right are.

Each time I see systemd processes in some ps output I feel nothing but despair
and disgust.

------
legulere
Pretty ridiculous how much work this is, when you can also go to a shop buy a
pc with windows or a mac and everything works directly after booting the
machine.

~~~
toast0
If you bought a computer with an os preinstalled, of course everything works
on first boot. I haven't seen a lot of computers for sale with FreeBSD
preinstalled though.

~~~
clarry
The last time I bought a computer with an OS preinstalled [a couple months
ago], it threw all sorts of popups at me, flashed command prompts at me, doing
all sorts of nasty stuff while stealing focus from the programs I was trying
to use. And it couldn't find or install any OS updates. Hours and hours of
scanning, and nothing would happen. Hours and hours spent googling, trying to
manually install updates that supposedly fix the problem but cannot be
installed...

I wouldn't say everything worked.

