How To Enable A Display Manager In FreeBSD (SLiM, LightDM, etc.)

Written by: Donovan / Last updated: Nov 1, 2023

Need to enable a display manager in FreeBSD?

Popular display managers in FreeBSD include:

  • SLiM
  • LightDM
  • GDM(3)
  • XDM
  • SDDM

Enabling one of these display managers means that a graphical login screen will open up automatically when you start your computer, instead of running startx in a terminal. Obviously, this assumes that your graphic card drivers are set up correctly.

In FreeBSD, display managers are typically enabled by adding an entry to /etc/rc.conf.

Here’s a general process:

1. Install the display manager if you haven’t already

This should be obvious.

If you want to enable a display manager, you should install it first. This can be done using pkg or compiling from ports.

For example:

$ sudo pkg install slim

2. Enable the service or manually add an entry to rc.conf

Open up your rc.conf file. For example:

$ sudo vim /etc/rc.conf

3. Add the appropriate entry to enable the display manager after boot

Let’s say you want SLiM. Add this line:


For LightDM, add:


And so on (consult the man pages for the others if you need to).

4. Insteading of manually editing rc.conf, enable the service

You can skip step 3 and do this instead if you prefer.

Just enable the service:

sudo service lightdm enable

This adds the appropriate entry to rc.conf.

You can start this service immediately, rather than reboot, just by starting the service like so:

sudo service lightdm start
View Archive