πŸ–₯️ A FreeBSD Desktop: Xorg, a Window Manager and KDE Plasma

Turn a FreeBSD 15.1 machine into a desktop, tested step by step in a virtual machine: the X server and its driver, a small window manager to prove it works, then KDE Plasma with the SDDM login screen, a tour of the desktop, and the places to look when it does not start

Video: A FreeBSD Desktop (FreeBSD video)
Prefer to watch? This short video runs this page's main commands on a real FreeBSD 15.0 machine, with on-screen captions and a synthetic voiceover (an AI voice trained on the author's own recording). Click to play, or watch it on YouTube.

What you get

FreeBSD starts as a server: a login prompt and nothing else. A desktop is built from layers, and each layer is a package you can install, test and remove:

  1. The X server (Xorg) draws on the screen and reads the keyboard and the mouse. It needs a video driver and the keyboard map files.
  2. A window manager puts windows on the screen, moves them and gives them borders. Openbox is a small one, and we use it as a first test.
  3. A display manager shows the login screen and starts your session. SDDM is the one KDE uses.
  4. A desktop environment adds the panel, the launcher, the file manager, the settings and a hundred small programs. We install KDE Plasma 6, with Dolphin (files), Konsole (terminal) and Kate (editor).

Everything here was run on a real FreeBSD 15.1 virtual machine (a fresh install, 6 GB of memory, a QEMU virtual graphics card), and the screens were looked at on the virtual monitor. Commands that start with # ran as root, those with $ as the normal user bsd. The versions you get will be newer, as the package repository moves on.

Step 0: be on FreeBSD 15.1

This is the trap that cost us an hour. The binary packages (pkg) are now built for 15.1, and they need the C library of 15.1. On a machine that is still on 15.0-RELEASE the packages install, but programs such as xkbcomp refuse to run, and the X server stops with "Failed to activate virtual core keyboard". The message that gives it away is in the X log:

ld-elf.so.1: /lib/libc.so.7: version FBSD_1.9 required by /usr/local/bin/xkbcomp not found

The cure is to update the system first. The page Upgrading FreeBSD Safely has the whole procedure (freebsd-update -r 15.1-RELEASE upgrade, then install, a reboot, and install again). Check where you are, and that there is room: the desktop needs about 5 GB under /usr/local, and more while the packages are downloaded.

bsd@practice:~ $ freebsd-version -ku
15.1-RELEASE-p5
15.1-RELEASE-p6
bsd@practice:~ $ df -h /
Filesystem            Size    Used   Avail Capacity  Mounted on
zroot/ROOT/default     36G    1.1G     35G     3%    /
root@practice:~ # pkg bootstrap -y
Installing pkg-2.8.4...
Extracting pkg-2.8.4: .......... done
Bootstrapping pkg from pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
bsd@practice:~ $ pkg config ABI
FreeBSD:15:amd64

A fresh FreeBSD has no pkg yet: pkg bootstrap fetches it (a plain pkg install offers to do the same). pkg config ABI shows what the repository is built for: FreeBSD:15:amd64.

Step 1: the X window system

The package xorg-minimal is the X server and its basic tools, without the hundreds of extras in the full xorg package. On top of it we install five things that the minimal set does not bring and that the server needs:

root@practice:~ # pkg install -y xorg-minimal xf86-video-vesa xkbcomp xkeyboard-config font-misc-misc font-cursor-misc dejavu
Updating FreeBSD-ports repository catalogue...
Fetching meta.conf: . done
Fetching data: .......... done
Processing entries: .......... done
FreeBSD-ports repository update completed. 38354 packages processed.
Updating FreeBSD-ports-kmods repository catalogue...
Fetching meta.conf: . done
Fetching data: ...... done
Processing entries: .......... done
FreeBSD-ports-kmods repository update completed. 295 packages processed.
All repositories are up to date.
Updating database digests format: . done
The following 81 package(s) will be affected (of 0 checked):
[... the list of packages and the progress lines are left out to keep this page short ...]
Number of packages to be installed: 81

The process will require 2 GiB more space.
383 MiB to be downloaded.
[ 1/81] Fetching xorg-server-21.1.25,1: .......... done
[... the list of packages and the progress lines are left out to keep this page short ...]
[80/81] Fetching libpciaccess-0.19: ... done
[81/81] Fetching py312-pyudev-0.24.1_1: .......... done
Checking integrity... done (0 conflicting)
[... the list of packages and the progress lines are left out to keep this page short ...]
bsd@practice:~ $ pkg info -x "xorg-minimal|xf86-video-vesa|xkbcomp"
xf86-video-vesa-2.6.0
xkbcomp-1.5.0
xorg-minimal-7.5.2_3

The long lists are left out. It is 81 packages and about 2 GiB on disk, because X needs Python helpers, fonts and a lot of libraries. At the end, pkg info confirms the three packages that matter.

Step 2: a little configuration

Three small things:

root@practice:~ # sysrc dbus_enable=YES
dbus_enable:  -> YES
root@practice:~ # pw groupmod video -m bsd

bsd@practice:~ $ id bsd
uid=1001(bsd) gid=1001(bsd) groups=1001(bsd),0(wheel),44(video)
root@practice:~ # mkdir -p /usr/local/etc/X11
root@practice:~ # cat > /usr/local/etc/X11/xorg.conf <<'EOF'
Section "Device"
    Identifier "card0"
    Driver "vesa"
EndSection
Section "Screen"
    Identifier "screen0"
    Device "card0"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "1280x800"
    EndSubSection
EndSection
EOF
bsd@practice:~ $ cat /usr/local/etc/X11/xorg.conf
Section "Device"
    Identifier "card0"
    Driver "vesa"
EndSection
Section "Screen"
    Identifier "screen0"
    Device "card0"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "1280x800"
    EndSubSection
EndSection

Step 3: a window manager and the login screen, first

Before the big desktop, a small test that proves the X layer works. Openbox is a light window manager, xterm a terminal, sddm the login screen, and py312-pyxdg a small Python library that Openbox needs. In our first try it was missing: the session printed openbox-xdg-autostart requires PyXDG to be installed, ended at once, and the screen stayed grey.

root@practice:~ # pkg install -y openbox py312-pyxdg xterm sddm
Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
All repositories are up to date.
The following 135 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	Imath: 3.2.3_1 [FreeBSD-ports]
	adwaita-icon-theme: 47.0 [FreeBSD-ports]
	adwaita-icon-theme-legacy: 46.2 [FreeBSD-ports]
	aom: 3.15.3 [FreeBSD-ports]
	at-spi2-core: 2.60.4 [FreeBSD-ports]
	avahi-app: 0.8_6 [FreeBSD-ports]
	bash: 5.3.20 [FreeBSD-ports]
	binutils: 2.44,1 [FreeBSD-ports]
	boost-libs: 1.92.0 [FreeBSD-ports]
	cairo: 1.18.2,3 [FreeBSD-ports]
	colord: 1.4.8_2 [FreeBSD-ports]
	consolekit2: 2.0.0_2 [FreeBSD-ports]
	cups: 2.4.20 [FreeBSD-ports]
	dav1d: 1.5.4 [FreeBSD-ports]
	dbus: 1.16.2_4,1 [FreeBSD-ports]
	dbus-glib: 0.116 [FreeBSD-ports]
	double-conversion: 3.4.0 [FreeBSD-ports]
	duktape-lib: 2.7.0_1 [FreeBSD-ports]
	encodings: 1.1.0,1 [FreeBSD-ports]
	ffmpeg: 9.0.2,1 [FreeBSD-ports]
	fribidi: 1.0.17 [FreeBSD-ports]
	gcc14: 14.2.0_7 [FreeBSD-ports]
	gdbm: 1.26 [FreeBSD-ports]
	gdk-pixbuf2: 2.44.1 [FreeBSD-ports]
	giflib: 6.1.3 [FreeBSD-ports]
	gmp: 6.3.0 [FreeBSD-ports]
	gnome_subr: 1.0 [FreeBSD-ports]
	gnutls: 3.8.13 [FreeBSD-ports]
	gobject-introspection: 1.86.0,1 [FreeBSD-ports]
	graphite2: 1.3.15 [FreeBSD-ports]
	gsettings-desktop-schemas: 47.1_2 [FreeBSD-ports]
	gtk-update-icon-cache: 3.24.42 [FreeBSD-ports]
	gtk3: 3.24.52 [FreeBSD-ports]
	harfbuzz: 14.2.1 [FreeBSD-ports]
	hicolor-icon-theme: 0.18 [FreeBSD-ports]
	highway: 1.4.0 [FreeBSD-ports]
	icu: 76.1,1 [FreeBSD-ports]
	imlib2: 1.12.7,2 [FreeBSD-ports]
	jbigkit: 2.1_3 [FreeBSD-ports]
	jpeg-turbo: 3.1.4.1 [FreeBSD-ports]
	json-glib: 1.10.8 [FreeBSD-ports]
	lame: 4.0 [FreeBSD-ports]
	lcms2: 2.19.1 [FreeBSD-ports]
	lerc: 4.2.0 [FreeBSD-ports]
	libXScrnSaver: 1.2.5 [FreeBSD-ports]
	libXaw: 1.0.16,2 [FreeBSD-ports]
	libXcomposite: 0.4.7,1 [FreeBSD-ports]
	libXcursor: 1.2.3 [FreeBSD-ports]
	libXft: 2.3.9 [FreeBSD-ports]
	libXinerama: 1.1.6,1 [FreeBSD-ports]
	libXpm: 3.5.20 [FreeBSD-ports]
	libXres: 1.2.3 [FreeBSD-ports]
	libXtst: 1.2.6 [FreeBSD-ports]
	libass: 0.17.5 [FreeBSD-ports]
	libb2: 0.98.1_1 [FreeBSD-ports]
	libbluray: 1.5.1,1 [FreeBSD-ports]
	libdaemon: 0.14_1 [FreeBSD-ports]
	libdatrie: 0.2.14_1 [FreeBSD-ports]
	libdeflate: 1.26 [FreeBSD-ports]
	libdvdnav: 7.0.0 [FreeBSD-ports]
	libdvdread: 7.1.1 [FreeBSD-ports]
	libevent: 2.1.13 [FreeBSD-ports]
	libgcrypt: 1.12.4 [FreeBSD-ports]
	libgpg-error: 1.61 [FreeBSD-ports]
	libgusb: 0.4.9_1 [FreeBSD-ports]
	libheif: 1.23.6 [FreeBSD-ports]
	libid3tag: 0.16.4 [FreeBSD-ports]
	libidn2: 2.3.8 [FreeBSD-ports]
	libjxl: 0.12.0 [FreeBSD-ports]
	libogg: 1.3.6,4 [FreeBSD-ports]
	libpaper: 1.1.28_1 [FreeBSD-ports]
	libplacebo: 7.360.1 [FreeBSD-ports]
	librsvg2-rust: 2.62.3_2 [FreeBSD-ports]
	libtasn1: 4.21.0 [FreeBSD-ports]
	libthai: 0.1.30 [FreeBSD-ports]
	libudfread: 1.2.0 [FreeBSD-ports]
	libunibreak: 7.0,1 [FreeBSD-ports]
	libunistring: 1.4.2 [FreeBSD-ports]
	libv4l: 1.23.0_5 [FreeBSD-ports]
	libva: 2.24.1 [FreeBSD-ports]
	libvdpau: 1.5 [FreeBSD-ports]
	libvorbis: 1.3.7_2,3 [FreeBSD-ports]
	libvpx: 1.17.0 [FreeBSD-ports]
	libx264: 0.165.3223_1 [FreeBSD-ports]
	libxkbcommon: 1.13.2 [FreeBSD-ports]
	libxslt: 1.1.45 [FreeBSD-ports]
	luit: 20240102_1 [FreeBSD-ports]
	lzo2: 2.10_2 [FreeBSD-ports]
	mpc: 1.4.1 [FreeBSD-ports]
	mpfr: 4.2.2,1 [FreeBSD-ports]
	mpg123: 1.33.7 [FreeBSD-ports]
	nettle: 3.10.2 [FreeBSD-ports]
	openblas: 0.3.34_1,2 [FreeBSD-ports]
	openbox: 3.6_14 [FreeBSD-ports]
	openexr: 3.4.16 [FreeBSD-ports]
	openh264: 2.6.0,2 [FreeBSD-ports]
	openjpeg: 2.5.4_2 [FreeBSD-ports]
	openjph: 0.32.0 [FreeBSD-ports]
	opus: 1.6.1 [FreeBSD-ports]
	p11-kit: 0.26.5_1 [FreeBSD-ports]
	pango: 1.57.1 [FreeBSD-ports]
	polkit: 127 [FreeBSD-ports]
	py312-boost-libs: 1.92.0 [FreeBSD-ports]
	py312-numpy: 2.4.6_1,1 [FreeBSD-ports]
	py312-pyxdg: 0.28 [FreeBSD-ports]
	py312-setuptools: 63.1.0_3 [FreeBSD-ports]
	qt6-base: 6.11.2_1 [FreeBSD-ports]
	qt6-declarative: 6.11.2 [FreeBSD-ports]
	qt6-svg: 6.11.2 [FreeBSD-ports]
	sddm: 0.21.0.36_7 [FreeBSD-ports]
	sdl2: 2.32.10_2 [FreeBSD-ports]
	setxkbmap: 1.3.5 [FreeBSD-ports]
	shaderc: 2026.4 [FreeBSD-ports]
	shared-mime-info: 2.4_2 [FreeBSD-ports]
	sqlite3: 3.54.1,1 [FreeBSD-ports]
	srt: 1.5.7_1 [FreeBSD-ports]
	startup-notification: 0.12_4 [FreeBSD-ports]
	svt-av1: 4.2.0 [FreeBSD-ports]
	tiff: 4.7.2 [FreeBSD-ports]
	vmaf: 3.2.1 [FreeBSD-ports]
	vulkan-loader: 1.4.360 [FreeBSD-ports]
	webp: 1.6.0 [FreeBSD-ports]
	x265: 4.1 [FreeBSD-ports]
	xbitmaps: 1.1.4 [FreeBSD-ports]
	xcb-util: 0.4.1,1 [FreeBSD-ports]
	xcb-util-cursor: 0.1.6 [FreeBSD-ports]
	xcb-util-image: 0.4.1 [FreeBSD-ports]
	xcb-util-keysyms: 0.4.1 [FreeBSD-ports]
	xcb-util-renderutil: 0.3.10 [FreeBSD-ports]
	xcb-util-wm: 0.4.2 [FreeBSD-ports]
	xmessage: 1.0.7 [FreeBSD-ports]
	xrdb: 1.2.3 [FreeBSD-ports]
	xsetroot: 1.1.4 [FreeBSD-ports]
	xterm: 411 [FreeBSD-ports]
	xxhash: 0.8.4 [FreeBSD-ports]

Number of packages to be installed: 135

The process will require 2 GiB more space.
308 MiB to be downloaded.
[  1/135] Fetching duktape-lib-2.7.0_1: .......... done
[  2/135] Fetching openh264-2.6.0,2: .......... done
[  3/135] Fetching libx264-0.165.3223_1: .......... done
[  4/135] Fetching libidn2-2.3.8: .......... done
[  5/135] Fetching gobject-introspection-1.86.0,1: .......... done
[  6/135] Fetching nettle-3.10.2: .......... done
[  7/135] Fetching lzo2-2.10_2: .......... done
[  8/135] Fetching adwaita-icon-theme-legacy-46.2: .......... done
[  9/135] Fetching lcms2-2.19.1: .......... done
[ 10/135] Fetching adwaita-icon-theme-47.0: .......... done
[ 11/135] Fetching libunistring-1.4.2: .......... done
[ 12/135] Fetching libb2-0.98.1_1: ...... done
[ 13/135] Fetching libthai-0.1.30: .......... done
[ 14/135] Fetching polkit-127: .......... done
[ 15/135] Fetching libXres-1.2.3: .. done
[ 16/135] Fetching gtk-update-icon-cache-3.24.42: .......... done
[ 17/135] Fetching xcb-util-renderutil-0.3.10: .. done
[ 18/135] Fetching vmaf-3.2.1: .......... done
[ 19/135] Fetching libva-2.24.1: .......... done
[ 20/135] Fetching openjpeg-2.5.4_2: .......... done
[ 21/135] Fetching consolekit2-2.0.0_2: .......... done
[ 22/135] Fetching aom-3.15.3: .......... done
[ 23/135] Fetching gdk-pixbuf2-2.44.1: .......... done
[ 24/135] Fetching shaderc-2026.4: .......... done
[ 25/135] Fetching icu-76.1,1: .......... done
[ 26/135] Fetching libgusb-0.4.9_1: .......... done
[ 27/135] Fetching gnutls-3.8.13: .......... done
[ 28/135] Fetching giflib-6.1.3: .......... done
[ 29/135] Fetching libXtst-1.2.6: ... done
[ 30/135] Fetching libXft-2.3.9: .......... done
[ 31/135] Fetching xcb-util-0.4.1,1: .. done
[ 32/135] Fetching xxhash-0.8.4: .......... done
[ 33/135] Fetching cairo-1.18.2,3: .......... done
[ 34/135] Fetching shared-mime-info-2.4_2: .......... done
[ 35/135] Fetching graphite2-1.3.15: .......... done
[ 36/135] Fetching xsetroot-1.1.4: .. done
[ 37/135] Fetching libevent-2.1.13: .......... done
[ 38/135] Fetching xbitmaps-1.1.4: .... done
[ 39/135] Fetching py312-numpy-2.4.6_1,1: .......... done
[ 40/135] Fetching lame-4.0: .......... done
[ 41/135] Fetching gdbm-1.26: .......... done
[ 42/135] Fetching vulkan-loader-1.4.360: .......... done
[ 43/135] Fetching avahi-app-0.8_6: .......... done
[ 44/135] Fetching libass-0.17.5: .......... done
[ 45/135] Fetching openjph-0.32.0: .......... done
[ 46/135] Fetching imlib2-1.12.7,2: .......... done
[ 47/135] Fetching dbus-1.16.2_4,1: .......... done
[ 48/135] Fetching json-glib-1.10.8: .......... done
[ 49/135] Fetching srt-1.5.7_1: .......... done
[ 50/135] Fetching setxkbmap-1.3.5: .. done
[ 51/135] Fetching ffmpeg-9.0.2,1: .......... done
[ 52/135] Fetching opus-1.6.1: .......... done
[ 53/135] Fetching Imath-3.2.3_1: .......... done
[ 54/135] Fetching svt-av1-4.2.0: .......... done
[ 55/135] Fetching dbus-glib-0.116: .......... done
[ 56/135] Fetching libXcomposite-0.4.7,1: .. done
[ 57/135] Fetching libplacebo-7.360.1: .......... done
[ 58/135] Fetching xterm-411: .......... done
[ 59/135] Fetching at-spi2-core-2.60.4: .......... done
[ 60/135] Fetching gsettings-desktop-schemas-47.1_2: .......... done
[ 61/135] Fetching double-conversion-3.4.0: ....... done
[ 62/135] Fetching libxkbcommon-1.13.2: .......... done
[ 63/135] Fetching jbigkit-2.1_3: .......... done
[ 64/135] Fetching startup-notification-0.12_4: ..... done
[ 65/135] Fetching libdaemon-0.14_1: ..... done
[ 66/135] Fetching qt6-base-6.11.2_1: .......... done
[ 67/135] Fetching libvdpau-1.5: ......... done
[ 68/135] Fetching tiff-4.7.2: .......... done
[ 69/135] Fetching sdl2-2.32.10_2: .......... done
[ 70/135] Fetching openblas-0.3.34_1,2: .......... done
[ 71/135] Fetching lerc-4.2.0: .......... done
[ 72/135] Fetching py312-setuptools-63.1.0_3: .......... done
[ 73/135] Fetching libdatrie-0.2.14_1: ...... done
[ 74/135] Fetching sddm-0.21.0.36_7: .......... done
[ 75/135] Fetching jpeg-turbo-3.1.4.1: .......... done
[ 76/135] Fetching librsvg2-rust-2.62.3_2: .......... done
[ 77/135] Fetching libdvdnav-7.0.0: ........ done
[ 78/135] Fetching libxslt-1.1.45: .......... done
[ 79/135] Fetching cups-2.4.20: .......... done
[ 80/135] Fetching boost-libs-1.92.0: .......... done
[ 81/135] Fetching libunibreak-7.0,1: .... done
[ 82/135] Fetching xcb-util-wm-0.4.2: ...... done
[ 83/135] Fetching mpg123-1.33.7: .......... done
[ 84/135] Fetching libXaw-1.0.16,2: .......... done
[ 85/135] Fetching libdeflate-1.26: .......... done
[ 86/135] Fetching fribidi-1.0.17: .......... done
[ 87/135] Fetching libtasn1-4.21.0: .......... done
[ 88/135] Fetching libdvdread-7.1.1: .......... done
[ 89/135] Fetching libXinerama-1.1.6,1: .. done
[ 90/135] Fetching gnome_subr-1.0: . done
[ 91/135] Fetching hicolor-icon-theme-0.18: ... done
[ 92/135] Fetching libXScrnSaver-1.2.5: .. done
[ 93/135] Fetching libpaper-1.1.28_1: .... done
[ 94/135] Fetching colord-1.4.8_2: .......... done
[ 95/135] Fetching libjxl-0.12.0: .......... done
[ 96/135] Fetching gtk3-3.24.52: .......... done
[ 97/135] Fetching xrdb-1.2.3: ... done
[ 98/135] Fetching webp-1.6.0: .......... done
[ 99/135] Fetching xcb-util-keysyms-0.4.1: .. done
[100/135] Fetching gcc14-14.2.0_7: .......... done
[101/135] Fetching bash-5.3.20: .......... done
[102/135] Fetching libv4l-1.23.0_5: .......... done
[103/135] Fetching encodings-1.1.0,1: .......... done
[104/135] Fetching harfbuzz-14.2.1: .......... done
[105/135] Fetching x265-4.1: .......... done
[106/135] Fetching libXcursor-1.2.3: ...... done
[107/135] Fetching highway-1.4.0: .......... done
[108/135] Fetching libgcrypt-1.12.4: .......... done
[109/135] Fetching openbox-3.6_14: .......... done
[110/135] Fetching py312-boost-libs-1.92.0: .......... done
[111/135] Fetching pango-1.57.1: .......... done
[112/135] Fetching libgpg-error-1.61: .......... done
[113/135] Fetching gmp-6.3.0: .......... done
[114/135] Fetching libudfread-1.2.0: .... done
[115/135] Fetching mpfr-4.2.2,1: .......... done
[116/135] Fetching libvorbis-1.3.7_2,3: .......... done
[117/135] Fetching luit-20240102_1: ...... done
[118/135] Fetching libogg-1.3.6,4: .......... done
[119/135] Fetching p11-kit-0.26.5_1: .......... done
[120/135] Fetching libbluray-1.5.1,1: .......... done
[121/135] Fetching dav1d-1.5.4: .......... done
[122/135] Fetching py312-pyxdg-0.28: .......... done
[123/135] Fetching sqlite3-3.54.1,1: .......... done
[124/135] Fetching mpc-1.4.1: .......... done
[125/135] Fetching qt6-svg-6.11.2: .......... done
[126/135] Fetching openexr-3.4.16: .......... done
[127/135] Fetching libheif-1.23.6: .......... done
[128/135] Fetching libvpx-1.17.0: .......... done
[129/135] Fetching xcb-util-image-0.4.1: ... done
[130/135] Fetching libid3tag-0.16.4: ...... done
[131/135] Fetching xmessage-1.0.7: .. done
[132/135] Fetching qt6-declarative-6.11.2: .......... done
[133/135] Fetching libXpm-3.5.20: .......... done
[134/135] Fetching binutils-2.44,1: .......... done
[135/135] Fetching xcb-util-cursor-0.1.6: .. done
Checking integrity... done (0 conflicting)
[  1/135] Installing bash-5.3.20...
[  1/135] Extracting bash-5.3.20: .......... done
[  2/135] Installing binutils-2.44,1...
[  2/135] Extracting binutils-2.44,1: .......... done
[  3/135] Installing dav1d-1.5.4...
[  3/135] Extracting dav1d-1.5.4: .......... done
[  4/135] Installing dbus-1.16.2_4,1...
===> Creating groups
Creating group 'messagebus' with gid '556'
===> Creating users
Creating user 'messagebus' with uid '556'
[  4/135] Extracting dbus-1.16.2_4,1: ......... done
[  5/135] Installing dbus-glib-0.116...
[  5/135] Extracting dbus-glib-0.116: .......... done
[  6/135] Installing double-conversion-3.4.0...
[  6/135] Extracting double-conversion-3.4.0: .......... done
[  7/135] Installing duktape-lib-2.7.0_1...
[  7/135] Extracting duktape-lib-2.7.0_1: ......... done
[  8/135] Installing encodings-1.1.0,1...
[  8/135] Extracting encodings-1.1.0,1: .......... done
[  9/135] Installing fribidi-1.0.17...
[  9/135] Extracting fribidi-1.0.17: .......... done
[ 10/135] Installing gdbm-1.26...
[ 10/135] Extracting gdbm-1.26: .......... done
[ 11/135] Installing giflib-6.1.3...
[ 11/135] Extracting giflib-6.1.3: .......... done
[ 12/135] Installing gmp-6.3.0...
[ 12/135] Extracting gmp-6.3.0: .......... done
[ 13/135] Installing gnome_subr-1.0...
[ 13/135] Extracting gnome_subr-1.0: .... done
[ 14/135] Installing graphite2-1.3.15...
[ 14/135] Extracting graphite2-1.3.15: .......... done
[ 15/135] Installing gsettings-desktop-schemas-47.1_2...
[ 15/135] Extracting gsettings-desktop-schemas-47.1_2: .......... done
[ 16/135] Installing harfbuzz-14.2.1...
[ 16/135] Extracting harfbuzz-14.2.1: .......... done
[ 17/135] Installing hicolor-icon-theme-0.18...
[ 17/135] Extracting hicolor-icon-theme-0.18: . done
[ 18/135] Installing highway-1.4.0...
[ 18/135] Extracting highway-1.4.0: .......... done
[ 19/135] Installing icu-76.1,1...
[ 19/135] Extracting icu-76.1,1: .......... done
[ 20/135] Installing boost-libs-1.92.0...
[ 20/135] Extracting boost-libs-1.92.0: .......... done
[ 21/135] Installing jbigkit-2.1_3...
[ 21/135] Extracting jbigkit-2.1_3: .......... done
[ 22/135] Installing jpeg-turbo-3.1.4.1...
[ 22/135] Extracting jpeg-turbo-3.1.4.1: .......... done
[ 23/135] Installing lerc-4.2.0...
[ 23/135] Extracting lerc-4.2.0: ........ done
[ 24/135] Installing libXScrnSaver-1.2.5...
[ 24/135] Extracting libXScrnSaver-1.2.5: .......... done
[ 25/135] Installing libXcomposite-0.4.7,1...
[ 25/135] Extracting libXcomposite-0.4.7,1: .......... done
[ 26/135] Installing libXcursor-1.2.3...
[ 26/135] Extracting libXcursor-1.2.3: .......... done
[ 27/135] Installing libXft-2.3.9...
[ 27/135] Extracting libXft-2.3.9: .......... done
[ 28/135] Installing libXinerama-1.1.6,1...
[ 28/135] Extracting libXinerama-1.1.6,1: .......... done
[ 29/135] Installing libXpm-3.5.20...
[ 29/135] Extracting libXpm-3.5.20: .......... done
[ 30/135] Installing libXaw-1.0.16,2...
[ 30/135] Extracting libXaw-1.0.16,2: .......... done
[ 31/135] Installing libXres-1.2.3...
[ 31/135] Extracting libXres-1.2.3: .......... done
[ 32/135] Installing libXtst-1.2.6...
[ 32/135] Extracting libXtst-1.2.6: .......... done
[ 33/135] Installing at-spi2-core-2.60.4...
[ 33/135] Extracting at-spi2-core-2.60.4: .......... done
[ 34/135] Installing libb2-0.98.1_1...
[ 34/135] Extracting libb2-0.98.1_1: ........ done
[ 35/135] Installing libdaemon-0.14_1...
[ 35/135] Extracting libdaemon-0.14_1: .......... done
[ 36/135] Installing libdatrie-0.2.14_1...
[ 36/135] Extracting libdatrie-0.2.14_1: .......... done
[ 37/135] Installing libdeflate-1.26...
[ 37/135] Extracting libdeflate-1.26: .......... done
[ 38/135] Installing libdvdread-7.1.1...
[ 38/135] Extracting libdvdread-7.1.1: .......... done
[ 39/135] Installing libdvdnav-7.0.0...
[ 39/135] Extracting libdvdnav-7.0.0: .......... done
[ 40/135] Installing libevent-2.1.13...
[ 40/135] Extracting libevent-2.1.13: .......... done
[ 41/135] Installing avahi-app-0.8_6...
===> Creating groups
Creating group 'avahi' with gid '558'
===> Creating users
Creating user 'avahi' with uid '558'
[ 41/135] Extracting avahi-app-0.8_6: .......... done
[ 42/135] Installing libgpg-error-1.61...
[ 42/135] Extracting libgpg-error-1.61: .......... done
[ 43/135] Installing libgcrypt-1.12.4...
[ 43/135] Extracting libgcrypt-1.12.4: .......... done
[ 44/135] Installing libid3tag-0.16.4...
[ 44/135] Extracting libid3tag-0.16.4: .......... done
[ 45/135] Installing libogg-1.3.6,4...
[ 45/135] Extracting libogg-1.3.6,4: .......... done
[ 46/135] Installing libpaper-1.1.28_1...
[ 46/135] Extracting libpaper-1.1.28_1: .......... done
[ 47/135] Installing cups-2.4.20...
===> Creating groups
Creating group 'cups' with gid '193'
===> Creating users
Creating user 'cups' with uid '193'
[ 47/135] Extracting cups-2.4.20: .......... done
[ 48/135] Installing libtasn1-4.21.0...
[ 48/135] Extracting libtasn1-4.21.0: .......... done
[ 49/135] Installing libthai-0.1.30...
[ 49/135] Extracting libthai-0.1.30: .......... done
[ 50/135] Installing libudfread-1.2.0...
[ 50/135] Extracting libudfread-1.2.0: .......... done
[ 51/135] Installing libbluray-1.5.1,1...
[ 51/135] Extracting libbluray-1.5.1,1: .......... done
[ 52/135] Installing libunibreak-7.0,1...
[ 52/135] Extracting libunibreak-7.0,1: .......... done
[ 53/135] Installing libass-0.17.5...
[ 53/135] Extracting libass-0.17.5: ......... done
[ 54/135] Installing libunistring-1.4.2...
[ 54/135] Extracting libunistring-1.4.2: .......... done
[ 55/135] Installing libidn2-2.3.8...
[ 55/135] Extracting libidn2-2.3.8: .......... done
[ 56/135] Installing libv4l-1.23.0_5...
[ 56/135] Extracting libv4l-1.23.0_5: .......... done
[ 57/135] Installing libva-2.24.1...
[ 57/135] Extracting libva-2.24.1: .......... done
[ 58/135] Installing libvdpau-1.5...
[ 58/135] Extracting libvdpau-1.5: .......... done
[ 59/135] Installing libvorbis-1.3.7_2,3...
[ 59/135] Extracting libvorbis-1.3.7_2,3: .......... done
[ 60/135] Installing libvpx-1.17.0...
[ 60/135] Extracting libvpx-1.17.0: .......... done
[ 61/135] Installing libx264-0.165.3223_1...
[ 61/135] Extracting libx264-0.165.3223_1: ........ done
[ 62/135] Installing libxkbcommon-1.13.2...
[ 62/135] Extracting libxkbcommon-1.13.2: .......... done
[ 63/135] Installing libxslt-1.1.45...
[ 63/135] Extracting libxslt-1.1.45: .......... done
[ 64/135] Installing luit-20240102_1...
[ 64/135] Extracting luit-20240102_1: ..... done
[ 65/135] Installing lzo2-2.10_2...
[ 65/135] Extracting lzo2-2.10_2: .......... done
[ 66/135] Installing cairo-1.18.2,3...
[ 66/135] Extracting cairo-1.18.2,3: .......... done
[ 67/135] Installing mpfr-4.2.2,1...
[ 67/135] Extracting mpfr-4.2.2,1: .......... done
[ 68/135] Installing mpc-1.4.1...
[ 68/135] Extracting mpc-1.4.1: .......... done
[ 69/135] Installing gcc14-14.2.0_7...
[ 69/135] Extracting gcc14-14.2.0_7: .......... done
[ 70/135] Installing mpg123-1.33.7...
[ 70/135] Extracting mpg123-1.33.7: .......... done
[ 71/135] Installing lame-4.0...
[ 71/135] Extracting lame-4.0: .......... done
[ 72/135] Installing nettle-3.10.2...
[ 72/135] Extracting nettle-3.10.2: .......... done
[ 73/135] Installing openblas-0.3.34_1,2...
[ 73/135] Extracting openblas-0.3.34_1,2: .......... done
[ 74/135] Installing openh264-2.6.0,2...
[ 74/135] Extracting openh264-2.6.0,2: .......... done
[ 75/135] Installing opus-1.6.1...
[ 75/135] Extracting opus-1.6.1: .......... done
[ 76/135] Installing p11-kit-0.26.5_1...
[ 76/135] Extracting p11-kit-0.26.5_1: .......... done
[ 77/135] Installing gnutls-3.8.13...
[ 77/135] Extracting gnutls-3.8.13: .......... done
[ 78/135] Installing pango-1.57.1...
[ 78/135] Extracting pango-1.57.1: .......... done
[ 79/135] Installing polkit-127...
===> Creating groups
Creating group 'polkitd' with gid '565'
===> Creating users
Creating user 'polkitd' with uid '565'
[ 79/135] Extracting polkit-127: ......... done
[ 80/135] Installing consolekit2-2.0.0_2...
[ 80/135] Extracting consolekit2-2.0.0_2: .......... done
[ 81/135] Installing py312-boost-libs-1.92.0...
[ 81/135] Extracting py312-boost-libs-1.92.0: .......... done
[ 82/135] Installing py312-numpy-2.4.6_1,1...
[ 82/135] Extracting py312-numpy-2.4.6_1,1: .......... done
[ 83/135] Installing Imath-3.2.3_1...
[ 83/135] Extracting Imath-3.2.3_1: .......... done
[ 84/135] Installing py312-pyxdg-0.28...
[ 84/135] Extracting py312-pyxdg-0.28: .......... done
[ 85/135] Installing py312-setuptools-63.1.0_3...
[ 85/135] Extracting py312-setuptools-63.1.0_3: .......... done
[ 86/135] Installing gobject-introspection-1.86.0,1...
[ 86/135] Extracting gobject-introspection-1.86.0,1: .......... done
[ 87/135] Installing json-glib-1.10.8...
[ 87/135] Extracting json-glib-1.10.8: .......... done
[ 88/135] Installing libgusb-0.4.9_1...
[ 88/135] Extracting libgusb-0.4.9_1: .......... done
[ 89/135] Installing setxkbmap-1.3.5...
[ 89/135] Extracting setxkbmap-1.3.5: ..... done
[ 90/135] Installing shaderc-2026.4...
[ 90/135] Extracting shaderc-2026.4: .......... done
[ 91/135] Installing shared-mime-info-2.4_2...
[ 91/135] Extracting shared-mime-info-2.4_2: ......... done
[ 92/135] Installing sqlite3-3.54.1,1...
[ 92/135] Extracting sqlite3-3.54.1,1: .......... done
[ 93/135] Installing srt-1.5.7_1...
[ 93/135] Extracting srt-1.5.7_1: .......... done
[ 94/135] Installing svt-av1-4.2.0...
[ 94/135] Extracting svt-av1-4.2.0: .......... done
[ 95/135] Installing tiff-4.7.2...
[ 95/135] Extracting tiff-4.7.2: .......... done
[ 96/135] Installing gdk-pixbuf2-2.44.1...
[ 96/135] Extracting gdk-pixbuf2-2.44.1: .......... done
[ 97/135] Installing gtk-update-icon-cache-3.24.42...
[ 97/135] Extracting gtk-update-icon-cache-3.24.42: .......... done
[ 98/135] Installing adwaita-icon-theme-legacy-46.2...
[ 98/135] Extracting adwaita-icon-theme-legacy-46.2: .......... done
[ 99/135] Installing adwaita-icon-theme-47.0...
[ 99/135] Extracting adwaita-icon-theme-47.0: .......... done
[100/135] Installing lcms2-2.19.1...
[100/135] Extracting lcms2-2.19.1: .......... done
[101/135] Installing colord-1.4.8_2...
===> Creating groups
Creating group 'colord' with gid '970'
===> Creating users
Creating user 'colord' with uid '970'
[101/135] Extracting colord-1.4.8_2: .......... done
[102/135] Installing librsvg2-rust-2.62.3_2...
[102/135] Extracting librsvg2-rust-2.62.3_2: .......... done
[103/135] Installing gtk3-3.24.52...
[103/135] Extracting gtk3-3.24.52: .......... done
[104/135] Installing openjpeg-2.5.4_2...
[104/135] Extracting openjpeg-2.5.4_2: .......... done
[105/135] Installing openjph-0.32.0...
[105/135] Extracting openjph-0.32.0: .......... done
[106/135] Installing openexr-3.4.16...
[106/135] Extracting openexr-3.4.16: .......... done
[107/135] Installing libjxl-0.12.0...
[107/135] Extracting libjxl-0.12.0: .......... done
[108/135] Installing vmaf-3.2.1...
[108/135] Extracting vmaf-3.2.1: .......... done
[109/135] Installing aom-3.15.3...
[109/135] Extracting aom-3.15.3: .......... done
[110/135] Installing vulkan-loader-1.4.360...
[110/135] Extracting vulkan-loader-1.4.360: .......... done
[111/135] Installing sdl2-2.32.10_2...
[111/135] Extracting sdl2-2.32.10_2: .......... done
[112/135] Installing webp-1.6.0...
[112/135] Extracting webp-1.6.0: .......... done
[113/135] Installing x265-4.1...
[113/135] Extracting x265-4.1: .......... done
[114/135] Installing xbitmaps-1.1.4...
[114/135] Extracting xbitmaps-1.1.4: .......... done
[115/135] Installing xcb-util-0.4.1,1...
[115/135] Extracting xcb-util-0.4.1,1: .......... done
[116/135] Installing startup-notification-0.12_4...
[116/135] Extracting startup-notification-0.12_4: .......... done
[117/135] Installing xcb-util-image-0.4.1...
[117/135] Extracting xcb-util-image-0.4.1: .......... done
[118/135] Installing xcb-util-keysyms-0.4.1...
[118/135] Extracting xcb-util-keysyms-0.4.1: ......... done
[119/135] Installing xcb-util-renderutil-0.3.10...
[119/135] Extracting xcb-util-renderutil-0.3.10: ......... done
[120/135] Installing xcb-util-cursor-0.1.6...
[120/135] Extracting xcb-util-cursor-0.1.6: ......... done
[121/135] Installing xcb-util-wm-0.4.2...
[121/135] Extracting xcb-util-wm-0.4.2: .......... done
[122/135] Installing qt6-base-6.11.2_1...
[122/135] Extracting qt6-base-6.11.2_1: .......... done
[123/135] Installing qt6-svg-6.11.2...
[123/135] Extracting qt6-svg-6.11.2: .......... done
[124/135] Installing qt6-declarative-6.11.2...
[124/135] Extracting qt6-declarative-6.11.2: .......... done
[125/135] Installing xmessage-1.0.7...
[125/135] Extracting xmessage-1.0.7: .... done
[126/135] Installing xrdb-1.2.3...
[126/135] Extracting xrdb-1.2.3: ..... done
[127/135] Installing xsetroot-1.1.4...
[127/135] Extracting xsetroot-1.1.4: ..... done
[128/135] Installing sddm-0.21.0.36_7...
===> Creating groups
Creating group 'sddm' with gid '219'
Using existing group 'video'
===> Creating users
Creating user 'sddm' with uid '219'
===> Creating homedir(s)
Adding user 'sddm' to group 'video'
[128/135] Extracting sddm-0.21.0.36_7: .......... done
[129/135] Installing xterm-411...
[129/135] Extracting xterm-411: .......... done
[130/135] Installing xxhash-0.8.4...
[130/135] Extracting xxhash-0.8.4: .......... done
[131/135] Installing libplacebo-7.360.1...
[131/135] Extracting libplacebo-7.360.1: .......... done
[132/135] Installing ffmpeg-9.0.2,1...
[132/135] Extracting ffmpeg-9.0.2,1: .......... done
[133/135] Installing libheif-1.23.6...
[133/135] Extracting libheif-1.23.6: .......... done
[134/135] Installing imlib2-1.12.7,2...
[134/135] Extracting imlib2-1.12.7,2: .......... done
[135/135] Installing openbox-3.6_14...
[135/135] Extracting openbox-3.6_14: .......... done
==> Running trigger: gtk-update-icon-cache.ucl
Generating GTK icon cache for /usr/local/share/icons/hicolor
Generating GTK icon cache for /usr/local/share/icons/Adwaita
Generating GTK icon cache for /usr/local/share/icons/AdwaitaLegacy
==> Running trigger: shared-mime-info.ucl
Building the Shared MIME-Info database cache
==> Running trigger: glib-schemas.ucl
Compiling glib schemas
Warning: Schema β€œorg.gnome.system.locale” has path β€œ/system/locale/”.  Paths starting with β€œ/apps/”, β€œ/desktop/” or β€œ/system/” are deprecated.
Warning: Schema β€œorg.gnome.system.proxy” has path β€œ/system/proxy/”.  Paths starting with β€œ/apps/”, β€œ/desktop/” or β€œ/system/” are deprecated.
Warning: Schema β€œorg.gnome.system.proxy.http” has path β€œ/system/proxy/http/”.  Paths starting with β€œ/apps/”, β€œ/desktop/” or β€œ/system/” are deprecated.
Warning: Schema β€œorg.gnome.system.proxy.https” has path β€œ/system/proxy/https/”.  Paths starting with β€œ/apps/”, β€œ/desktop/” or β€œ/system/” are deprecated.
Warning: Schema β€œorg.gnome.system.proxy.ftp” has path β€œ/system/proxy/ftp/”.  Paths starting with β€œ/apps/”, β€œ/desktop/” or β€œ/system/” are deprecated.
Warning: Schema β€œorg.gnome.system.proxy.socks” has path β€œ/system/proxy/socks/”.  Paths starting with β€œ/apps/”, β€œ/desktop/” or β€œ/system/” are deprecated.
==> Running trigger: gdk-pixbuf-query-loaders.ucl
Generating gdk-pixbuf modules cache
=====
Message from boost-libs-1.92.0:

--
You have built the Boost library with thread support.

Don't forget to add -pthread to your linker options when
linking your code.
=====
Message from libxkbcommon-1.13.2:

--
If arrow keys don't work under X11 switch to legacy rules e.g.,

For sh/bash/ksh/zsh run and (optionally) add into ~/.profile:
  export XKB_DEFAULT_RULES=xorg

For csh/tcsh run and (optionally) add into ~/.login:
  setenv XKB_DEFAULT_RULES xorg
=====
Message from gcc14-14.2.0_7:

--
To ensure binaries built with this toolchain find appropriate versions
of the necessary run-time libraries, you may want to link using

  -Wl,-rpath=/usr/local/lib/gcc14

For ports leveraging USE_GCC, USES=compiler, or USES=fortran this happens
transparently.
=====
Message from py312-boost-libs-1.92.0:

--
You have built the Boost library with thread support.

Don't forget to add -pthread to your linker options when
linking your code.
=====
Message from libjxl-0.12.0:

--
Additional packages recommended for new users:
- imlib2-jxl (e.g., feh, scrot)
- kf5-kimageformats (e.g., nomacs, flameshot, skanlite)
- gimp-jxl-plugin
=====
Message from sddm-0.21.0.36_7:

--
SDDM lists a "user session" which needs either an .xinitrc in the user's
home directory, or as a fallback, xterm. In order to use the "user session"
feature, a ~/.xinitrc is recommended.
=====
Message from xterm-411:

--
You installed xterm with wide chars support. This introduces some limitations
comparing to the plain single chars version: this version of xterm will use
UTF-8 charset for selection buffers, breaking 8-bit copy/paste support unless
you are using UTF-8 or ISO8859-1 locale. If you want 8-bit charset selections to
work as before, use "eightBitSelectTypes" XTerm resource setting.

For further information refer to the SELECT/PASTE section of xterm(1) manual
page.
root@practice:~ # sysrc sddm_enable=YES
sddm_enable:  -> YES
root@practice:~ # service sddm start
Starting sddm.
Detected locale "C" with character encoding "US-ASCII", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
root@practice:~ # sleep 10; pgrep -l "sddm|Xorg"
11597 sddm
11599 Xorg
11637 sddm-helper
11638 sddm-greeter-qt6

sysrc sddm_enable=YES makes SDDM start at every boot, and service sddm start starts it now. The two processes you want to see are sddm and Xorg. On the virtual monitor the login screen came up. At the bottom left is the session list: choose Openbox, log in, and the screen is empty and grey. That is normal. A right click opens the Openbox menu, and from Terminals you can start xterm. If this works, X, the driver and the login screen are all good, and what is left is only the desktop.

Step 4: KDE Plasma

One command brings the whole desktop. plasma6-plasma is the Plasma desktop with its settings, the system monitor and the window manager (KWin). kde-baseapps adds the file manager Dolphin, and we name konsole (the terminal) and kate (the editor) so that they are certainly there.

root@practice:~ # pkg install -y plasma6-plasma kde-baseapps konsole kate
Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
All repositories are up to date.
The following 484 package(s) will be affected (of 0 checked):

[... the list of packages and the progress lines are left out to keep this page short ...]
Number of packages to be installed: 484

The process will require 4 GiB more space.
1 GiB to be downloaded.
[  1/484] Fetching kdsoap-qt6-2.2.0_1: .......... done
[  2/484] Fetching qt6-location-6.11.2: .......... done
[... the list of packages and the progress lines are left out to keep this page short ...]
[482/484] Extracting plasma6-systemsettings-6.7.5: .......... done
[483/484] Installing plasma6-kinfocenter-6.7.5...
[483/484] Extracting plasma6-kinfocenter-6.7.5: .......... done
[484/484] Installing plasma6-plasma-6.7.5...
[484/484] Extracting plasma6-plasma-6.7.5: ... done
[... the list of packages and the progress lines are left out to keep this page short ...]
bsd@practice:~ $ pkg info | wc -l
     701
bsd@practice:~ $ du -sh /usr/local
4.9G	/usr/local

It is 484 packages, 1 GiB to download and about 4 GiB more on disk, and it took several minutes on this connection. After it, /usr/local holds 4.9 GB and pkg info lists 701 packages in all. The last package, plasma6-plasma, is only a list of the others. The installer also printed some messages from the packages, among them a notice that kf5-kio is deprecated: it is an old library that one of the programs still pulls in, and it can be ignored.

Nothing more is needed in /etc/rc.conf: sddm_enable and dbus_enable from the earlier steps are the whole setup. What the packages did add is a second session for the login screen:

bsd@practice:~ $ ls /usr/local/share/xsessions
openbox-gnome.desktop
openbox-kde.desktop
openbox.desktop
plasmax11.desktop
xinitrc.desktop
bsd@practice:~ $ grep -E '^(Name|Exec)=' /usr/local/share/xsessions/plasmax11.desktop
Exec=/usr/local/bin/startplasma-x11
Name=Plasma (X11)
bsd@practice:~ $ sysrc -n sddm_enable dbus_enable
YES
YES

The files in /usr/local/share/xsessions are the sessions that SDDM offers. plasmax11.desktop is the one that starts Plasma, with the command startplasma-x11.

Step 5: log in to Plasma

On the login screen, open the session list at the bottom left, choose Plasma (X11), and log in. The first start takes a few seconds while the desktop builds its caches. SDDM remembers the choice for the next time.

What you see is the Plasma desktop: a wallpaper, and a panel at the bottom with the application launcher on the left, four pinned programs (System Settings, Discover, which is the software centre, Dolphin and the web browser Konqueror), and the system tray with the sound, the brightness and the clock on the right. A click on the clock opens a calendar.

To skip the login screen on a machine that nobody else uses, give SDDM an autologin in a small file. We tried it: after the restart, the machine went straight to the desktop.

root@practice:~ # mkdir -p /usr/local/etc/sddm.conf.d

root@practice:~ # printf '[Autologin]\nUser=bsd\nSession=plasmax11\n' > /usr/local/etc/sddm.conf.d/autologin.conf

bsd@practice:~ $ cat /usr/local/etc/sddm.conf.d/autologin.conf
[Autologin]
User=bsd
Session=plasmax11
root@practice:~ # service sddm restart > /dev/null 2>&1; sleep 25; pgrep -l plasmashell
25097 plasmashell

The session name is the name of the file in xsessions, without .desktop. Be careful with this on a laptop or a shared machine: the desktop is open to anyone who can switch the machine on.

A tour of the desktop in ten minutes

One thing to know about a virtual machine: it has no 3D graphics, so KDE draws its effects in software. The normal desktop is fine, but heavy effects can break it: in our test the Overview effect (Meta+W) made the window manager crash and restart. On real hardware with a proper driver this is not a problem.

When it does not start

There are two logs, and the screen stays black or returns to the login screen when one of them has something to say:

bsd@practice:~ $ grep -c '(EE)' /var/log/Xorg.0.log
1
bsd@practice:~ $ grep -E '\(EE\)|Setting up VESA' /var/log/Xorg.0.log | head -n 4
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  4978.013] (II) VESA(0): Setting up VESA Mode 0x17A (1280x800)
bsd@practice:~ $ tail -n 4 /var/log/sddm.log
[17:05:45.744] (WW) DAEMON: Authentication information: SDDM::Auth::INFO_UNKNOWN "Last login: Mon Oct  5 21:02:39 from 10.0.2.2"
[17:05:45.746] (II) HELPER: Writing cookie to "/tmp/xauth_WYxhUO"
[17:05:45.747] (II) HELPER: Starting X11 session: "" "/usr/local/share/sddm/scripts/Xsession \"/usr/local/bin/startplasma-x11\""
[17:05:45.752] (II) DAEMON: Session started true
bsd@practice:~ $ ls /home/bsd/.local/share/sddm/
xorg-session.log

The faults we met on the way, and what they were:

On real hardware you will want the driver for your graphics card in place of vesa. On FreeBSD that is the drm-kmod package with the kernel module of your card, loaded from /etc/rc.conf (for example kld_list="amdgpu" or kld_list="i915kms"), after which the X server uses the modesetting driver and Plasma can use 3D. We did not test this: the virtual machine has no such card. The FreeBSD Handbook chapter on the desktop lists the modules.

What we did not do

The cheat sheet

← The FreeBSD Corner Cheat Sheet: Every Command in One Place · ↑ FreeBSD Corner