💾 Archived View for uscoffings.net › tech › freebsd › freebsd-desktop.gmi captured on 2023-03-20 at 18:08:18. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
[date: 2022-03-30]
On-going notes re: making FreeBSD my daily-driver on a Lenovo x220 laptop.
For years, I have run FreeBSD on my home server, and Ubuntu derivatives on my desktops and laptops. But I have become disillusioned with the increasing size and complexity of modern Linux distributions. Reverting back to more manual Linux distributions (eg Gentoo or Arch) still leaves me dissatisfied, due to the constant churn (due to lack of careful initial design) and lack of documentation. At its core, the Linux world does not have the same attention to detail that the BSDs have: the BSDs engineer; Linux organically grows. Sufficiently dressing Linux up to hide that fact (as Ubuntu and Gnome do) makes it a bloated monstrosity.
A few years ago I toyed with FreeBSD on the desktop, but reverted to Linux. I think the bling called to me in a weak moment when I forgot my engineering roots.
These notes are my attempt to be more analytical this time around.
Not a server, so disable:
sendmail_enable="NONE"
# freebsd-update fetch # freebsd-update install # pkg update
# pkg install sudo # vi /usr/local/etc/sudoers
...and uncomment a WHEEL line.
Add my user to wheel group in /etc/group.
Install X:
# pkg install xorg
Install a video driver. Intel is common:
# pkg install xf86-video-intel drm-fbsd13-kmod # echo 'kld_list="i915kms"' >> /etc/rc.conf
The screen resolution changes during boot as i915kms loads. If you can synchronize the EFI boot screen's resolution, this change won't be so jarring:
kern.vt.fb.default_mode="1366x768" efi_max_resolution="1366x768"
I first attempted to use XFCE as my desktop, but encountered multiple problems. The laptop's volume and mute buttons did not work out-of-the-box. Sometimes the screen in X would become garbled (such as having regions of the screen shifted around). There may have been more problems with suspending, but I am not certain. After I switched to the MATE desktop, my experience improved. I am only going to describe using MATE in these notes.
Install MATE:
# pkg install mate # echo /usr/local/bin/mate-session > ~/.xinitrc
Install a display manager:
# pkg install slim slim-freebsd-black-theme
Enable in /etc/rc.conf
slim_enable="YES" dbus_enable="YES"
Edit /usr/local/etc/slim.conf to make the appearance better match the boot sequence:
current_theme slim-freebsd-black-theme default_user chuck focus_password yes
# sysrc powerd_enable=YES
Test it, then persist it:
# acpiconf -s 3 # echo 'hw.acpi.lid_switch_state=S3' >> /etc/sysctl.conf
TODO Sometimes waking after the screen blank (but before suspend), the mouse pointer comes back but the screen stays blanked. I suspect this is a software (screensaver) issue, not a sleep issue. Switching away from X and back (Ctrl-F1, F9) tends to bring the screen back.
$ sudo pkg install libreoffice fbreader xreader
$ sudo pkg install thunderbird
Disable Thunderbird's notifications for incoming mail
$ sudo pkg install firefox
Install extentions: uBlock Origin, Duck Duck Go
$ sudo pkg install bash
custom ~/.bashrc
$ sudo pkg install vim-gtk3
Update EDITOR=vim in ~/.profile and ~/.bashrc
When using the MATE desktop, the volume control buttons just worked.
Also useful is the `mixer` command line, eg: `mixer vol 50`
https://wiki.freebsd.org/Sound#MixerODO
TODO Describe installing Virtualbox.
https://docs.freebsd.org/en/books/handbook/virtualization/#virtualization-host-virtualbox
Most of my storage (personal files, media, etc) is on an NFS server in my house. I need easy access to the data, but due to the laptop roaming outside of my home network, I'm not going to mount this as my home directory.
nfs_client_enable="YES" lockd_enable="YES"
LibreOffice expects lockd when saving to NFS.
mkdir -p /pool/(chuck,Library,Music,Movies) chown -Rv chuck:chuck /pool
TODO autofs
192.168.1.2:/pool/chuck /pool/chuck nfs rw,noauto 0 0 192.168.1.2:/pool/Library /pool/Library nfs rw,noauto 0 0 192.168.1.2:/pool/Music /pool/Music nfs rw,noauto 0 0 192.168.1.2:/pool/Movies /pool/Movies nfs rw,noauto 0 0
TODO Chromium does not (yet?) support widevine; Some people have done this via linux emulation.
https://github.com/mrclksr/linux-browser-installer
https://forums.freebsd.org/threads/linuxulator-how-to-install-brave-linux-app-on-freebsd-13-0.78879/
Things to still improve and document:
Some websites (I experienced this with a bank) seem to specifically check for Windows or Linux in the user agent string, and refuse to work otherwise, despite running a modern Firefox. This is ridiculous, but can be worked around by manually setting a string in the `about:config` of Firefox:
general.useragent.override Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0
Additional packages that I find useful: