Session Manager for FreeBSD

If we are not using Gnome or KDE, we can use Slim or XDM as the session manager.

XDM

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.greeting:
xlogin.Login.unsecureGreeting:
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 is saved in the Xresources file.

It looks like this in action.

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

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

by

current_theme slim-freebsd-black-theme

to replace.

It looks like this in action.

Discuss...