Session Manager for FreeBSD

πŸ• 2 minutes

πŸ“… 2022-01-22


If we want to use the Xorg Display Manager, we will first install the package xdm:

$: doas pkg install xdm

$: ln -s ~/.xinitrc ~/.xsession

XDM Black Theme

We’re giving xdm a dark theme. To configure this black XDM theme, we are going to change the contents of two files as shown below:

$: doas nano /usr/local/etc/X11/xdm/Xsetup_0 =>

xsetroot -solid black

With this, we set a black background on the login screen.

$: doas rm /usr/local/etc/X11/xdm/Xresources

$: doas nano /usr/local/etc/X11/xdm/Xresources =>

xlogin.Login.fail:                Fail.
xlogin.Login.changePasswdMessage: Change.
xlogin.Login.namePrompt:          Username:
xlogin.Login.passwdPrompt:        Password:
xlogin.Login.echoPasswd:          true
xlogin.Login.background:          black
xlogin.Login.foreground:          white
xlogin.Login.failColor:           #cccccc
xlogin.Login.inpColor:            black
xlogin.Login.promptColor:         #aaaaaa
xlogin.Login.face:                courier:size=13:style=Bold
xlogin.Login.failFace:            courier:size=13:style=Bold
xlogin.Login.promptFace:          courier:size=13:style=normal
xlogin.Login.greetFace:           courier:size=13
xlogin.Login.width:               400

The rest of the XDM Login Manager configuration saved in the Xresources file.

It looks like this in action.

XDM dark theme

xdm autostart

So that xdm is started when booting, we only have to change /etc/ttys as follows.

$: doas nano /etc/ttys =>

ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure


Slim is an acronym for Simple Login Manager. SLiM is lightweight and easy to configure and requires minimal dependencies and none from the GNOME or KDE desktop environments. With this, it contributes to a light system for us if we want to use light desktops like Xfce, Openbox and Fluxbox.

We can install Slim with the following command:

$: doas pkg install slim

To make Slim start at boot time, we do the following:

$: doas service slim enable

Dark Slim Theme

Then we will install the package slim-freebsd-black-theme, which will give us a nice black theme for Slim.

$: doas pkg inst slim-freebsd-black-theme

Then we edit the file β€œ/usr/local/etc/slim.conf” to add the line

current_theme default


current_theme slim-freebsd-black-theme

to replace.

It looks like this in action.

Slim Dark Theme