20 ms·
A FreeBSD 10 Desktop How-To
- redpanda_ua 10y agoAwesome, 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.
- eriknstr 10y agoI'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-setup/screenshots-2016-08-26/screenshot.png https://raw.githubusercontent.com/eriknstr/ThinkPad-FreeBSD-...
- floatboth 10y agoOn a newer ThinkPad — X240 (Haswell), battery life under FreeBSD -CURRENT is close to 9 hours. Doesn't resume from suspend though. But yours should! I know people got suspend/resume working on 20 and 30 ThinkPads. Here's my post about the laptop: https://unrelenting.technology/articles/freebsd-on-the-thinkpad-x240 https://unrelenting.technology/articles/freebsd-on-the-think... — not fully up to date though: I'm using ZFS only now, with boot environments (no GRUB required, it's fully integrated into the FreeBSD EFI loader), and powerd++ https://github.com/lonkamikaze/powerdxx https://github.com/lonkamikaze/powerdxx Brightness works great with Intel graphics. I haven't been able to adjust brightness using the nvidia driver (on an iMac)
- eriknstr 10y agoThanks for your blog post. I'm going to try the power management things you did for your laptop and see how they work for my model. I too use root on ZFS. Boot environments and using powerd++ are things I've been meaning to but have not yet got around to.
- floatboth 10y agoHonestly I'm not seeing any improvement from powerd++, normal powerd worked fine for this dual-core + HT processor.
- dijit 10y agoI 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 10y agoBut will the FreeBSD Nvidia driver work in OpenBSD?
- sreehariani 10y agoThanks, It Was Helpful
- tgarma1234 10y agoI 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 10y ago"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.
- NhanH 10y agoThe whole thing with /efi/boot/bootx64.efi and EFI variables just tripped me up yesterday too. I still have no idea if I need to copy my kernel over to bootx64.efi for it to boot.
- kuschku 10y ago> Why is systemd doing the "* Waiting for some bullshit … [∞ seconds]" thing on shutdown instead of killing everything. Systemd is now just killing everything if you log out or try to shut down the system, which caused a lot of people to run amok over that, too.
- qwertyuiop924 10y ago
- jlgaddis 10y agoI'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 10y agoAre 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 10y agoI 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.
- loeg 10y agoPC-BSD is now called "TrueOS Desktop," FWIW.
- obtino 10y agoI 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 10y agoI 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/README/minimumrequirements.html http://us.download.nvidia.com/XFree86/FreeBSD-x86/367.44/REA... 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.
- toomanythings4 10y agoThere is a whole page for FreeBSD support on nVidia's site. I use FreeBSD 10.3 right now with nVidia cards, multi-monitor support.
- digi_owl 10y ago> 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...
- swiley 10y agoGnome 3 came default on one of the Debian disks I installed a year ago. That was when I stopped using Debian.
- gens 10y agoGNOME3 is also in a fight against any linux system that doesn't use systemd.
- qwertyuiop924 10y agoGnome3 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 10y agoAnd 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.
- dingdingdang 10y agoI would love to trial on a Macbook Pro 15 Retina that I've got available, anyone has experience with this sort of hardware setup?
- janoc 10y agoUff, 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 ...
- cel1ne 10y agoThat's why, after having used Redhat, SuSE, FreeBSD, Gentoo and Ubuntu over the course of 10 years, I switched to Mac/OSX. Everything just works.
- floatboth 10y agoIf you don't want to touch any config files, you can get PC-BSD. Setting up FreeBSD is easier than, say, Arch Linux. The OS install is a menu based "next, next, next" process like in Debian. Installing a desktop environment… honestly I can't imagine how it CAN be difficult. `pacman -S xfce`, `pkg install xfce`, same thing everywhere.
- akerro 10y agoPCBSD is great, unfortunately it lacks better support for functional keyboards and screen brightness controls on laptops, but it's great anyway. I prefer it over ArchLinux.
- janoc 10y agoYou have missed my point. Comparing with Arch and saying it is easier - well, gee, sure - not a particularly high bar to clear! The same about installing the desktop using a package manager. If you have to actually do any of that, you have lost already, at least as far as a productive desktop is concerned. My point is not that it is hard to do but that you shouldn't have to do it in the first place! Desktop OS should come with a working desktop out of the box - many desktop Linux distros actually give you a choice during the install and preconfigure one of the major ones for you. BSDs make excellent servers and there this simplicity and Unix-like approach to running things are a large benefit. Modern Linux distros tend to be way too complex and "black-box" like in this regard. However, having to go through all this to run a desktop is an unnecessary masochism for people who have way too much time on their hands, IMO.
- hs86 10y agoCompared 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?
- lmz 10y agoOther package collections are available for Linux e.g. pkgsrc, Nix, the Linux port of Homebrew, ...
- ucs 10y ago>> Why isn't there a Linux distro like this? Debian stable is that distro in my case. I agree that you shouldn't have to put up with an annoying bug or missing functionality until the next stable release; that's what the backports[1] system is meant to address. And when you cannot find what you're looking for in the backports repository, making your own is relatively simple[2]. The way I see it, the FreeBSD ethos is perfectly applicable in Linux land. It just requires a little bit of extra discipline on our part. [1] https://backports.debian.org https://backports.debian.org [2] https://wiki.debian.org/SimpleBackportCreation https://wiki.debian.org/SimpleBackportCreation
- takeda 10y agoopenSUSE 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.
- legulere 10y agoPretty 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.
- Sir_Substance 10y agoYou say that as if microsoft hasnt gotten a perfect 3/3 for releasing at least one autoinstalling patch per month that breaks peoples stuff in the last three months. Not saying I'd want to walk my grandma through a freebsd setup, but it's hardly without merit. There's a lot to be said for controlling your own computer.
- toast0 10y agoIf 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 10y agoThe 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.
- jsrjenkins 10y agoWell yes it will work after booting, but you usually want your computer to do a bit more than boot. No machine works perfectly after booting, as the machine is just an instrument to do some WORK. It is the nature of the work that means I have to change the instrument from time to time. FreeBSD, being an open system with a detailed manual allows me to change the machine easily and in a determined manner. I still haven't figured out how to change many fundamental things on Windows, as it is designed to keep these options hidden from the user. There are trade-offs for each system. For users who want the power of doing the things how they want to [within limits], FreeBSD is great. If you just want to play Counter-Strike after installing it, well, you can buy another machine for doing that.
- youdontknowtho 10y agoI 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 10y agoNot 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 10y agoSometimes 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 10y agoYeah, 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.
- qwertyuiop924 10y agoI 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 10y agohttps://github.com/SteamOnFreeBSD/SteamOnFreeBSD https://github.com/SteamOnFreeBSD/SteamOnFreeBSD
- qwertyuiop924 10y agoYeah, 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...
- dschiptsov 10y agoSomeday 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.
- cm3 10y agoAnd 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.
- todd8 10y agoAs 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 10y agoI 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 10y agoYes, I've heard that things are much better now. I switched my desktops, not servers, to Linux years ago.
- cs702 10y agoFreeBSD 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 10y agoIsn't the problem that that CUDA for FreeBSD does not exist in the first place?
- deleted 10y ago[deleted]
- loeg 10y agoNvidia can't be bothered to port it.
- vasili111 10y agoWhat about using CUDA with bhyve with "PCI-E passthrough"? It should work near native speed. This was suggested here: https://news.ycombinator.com/item?id=10767172 https://news.ycombinator.com/item?id=10767172
- ChuckMcM 10y agoThis 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.
- andrewfromx 10y agothe 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 10y agoFor 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 :)
- type0 10y ago> really gain something ubuntu doesn't offer me? Native ZFS!
- Lammy 10y agoAuthor 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.
- znpy 10y agoMy 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.
- finid 10y agoIf 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
- xvilka 10y agoThere 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