💾 Archived View for perso.pw › blog › articles › freebsd-workstation.gmi captured on 2022-04-29 at 12:27:59. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-17)
-=-=-=-=-=-=-
NIL=> Comment on Mastodon
I'm using FreeBSD again on a laptop for some reasons so expect to read more
about FreeBSD here. This tutorial explain how to get a graphical desktop using
FreeBSD 12.1.
I used a Lenovo Thinkpad T480 for this tutorial.
If you have a recent Intel integrated graphic card (maybe less than 3 years),
you have to install a package containing the driver:
pkg install drm-kmod
and you also have to tell the system the correct path of the module (because
another i915kms.ko file exist):
sysrc kld_list="/boot/modules/i915kms.ko"
pkg install xfce
Then in your user `~/.xsession` file you must append:
exec ck-launch-session startxfce4
pkg install mate
Then in your user `~/.xsession` file you must append:
exec ck-launch-session mate-session
pkg install kde5
Then in your user `~/.xsession` file you must append:
exec ck-launch-session startplasma-x11
You have to enable a few services to have a working graphical session:
- **moused** to get laptop mouse support
- **dbus** for hald
- **hald** for hardware detection
- **xdm** for display manager where you log-in
You can install them with the command:
pkg install xorg dbus hal xdm
Then you can enable the services at boot using the following commands, order is
important:
sysrc moused_enable="yes"
sysrc dbus_enable="yes"
sysrc hald_enable="yes"
sysrc xdm_enable="yes"
Reboot or start the services in the same order:
service moused start
service dbus start
service hald start
service xdm start
The installer should have prompted for the service powerd, if you didn't
activate it at this time, you can still enable it.
Check if it's running
service powerd status
Enabling
sysrc powerd_enable="yes"
Starting the service
service powerd start
If you have a webcam and want to use it, some configuration is required in
order to make it work.
Install the package webcamd, it will displays all the instructions written
below at the install step.
pkg install webcamd
From here, append this line to the file `/boot/loader.conf` to load webcam
support at boot time:
cuse_load="yes"
Add your user to the webcamd group so it will be able to use the device:
pw groupmod webcamd -m YOUR_USER
Enable webcamd at boot:
sysrc webcamd_enable="yes"
Now, you have to logout from your user for the group change to take place. And
if you want the webcamd daemon to work now and not wait next reboot:
kldload cuse
service webcamd start
service devd restart
You should have a /dev/video0 device now. You can test it easily with the
package `pwcview`.
I found this blog very interesting, I wish I found it before I struggle with
all the configuration as it explains how to install FreeBSD on the exact same
laptop. The author explains how to make a transparent lagg0 interface for
switching from ethernet to wifi automatically with a failover pseudo device.
[https://genneko.github.io/playing-with-bsd/hardware/freebsd-on-thinkpad-t480/](https://genneko.github.io/playing-with-bsd/hardware/freebsd-on-thinkpad-t480/)