Session Manager for FreeBSD

Last update: 11.04.2021

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:

root #: 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:

root #: nano /usr/local/etc/X11/xdm/Xsetup_0 =>

xsetroot -solid black

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


root #: rm /usr/local/etc/X11/xdm/Xresources

root #: 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.

image is taken from the vermaden blog

xdm autostart

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

root #: 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:

root #: pkg install slim

So that Slim is started when booting, we do the following:

root #: 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.

root #: service 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.

Your E-Mail address will be encrypted before saving the comment. It will only be used to display a gravatar. By submitting your data, you agree that all entered data may be saved and displayed as a comment.