This page looks best with JavaScript enabled

LightDM Configuration

 ·  ☕ 4 min read

In this article I go over lightdm configuration. This will teach you how to modify lightdm to choose a default desktop environment, theme, autologin, and even a VNC connection.

Reference Articles:
Ubuntu Wiki
Arch Wiki
Debian Wiki

Installation

For Debian based systems, install LightDM by typing sudo apt install lightdm
For Arch based systems, install LightDM by typing sudo pacman -S lightdm

Activating LightDM on startup

Before you can enable the lightdm service you will need to disable your current display manager.

For disabling SDDM (KDE Systems) type sudo systemctl disable sddm
For disabling GDM (Gnome Systems) type sudo systemctl disable gdm

Configuration

Start out with opening up your /etc/lightdm/lightdm.conf and this is where most of the modifications will take place.

I will go over the 4 sections in the configuration that most will want to change or modify.

Changing the Theme

lightdm.conf

[Seat:*]
#type=local
#pam-service=lightdm
#pam-autologin-service=lightdm-autologin
#pam-greeter-service=lightdm-greeter
#xserver-command=X
#xmir-command=Xmir
#xserver-config=
#xserver-layout=
#xserver-allow-tcp=false
#xserver-share=true
#xserver-hostname=
#xserver-display-number=
#xdmcp-manager=
#xdmcp-port=177
#xdmcp-key=
greeter-session=lightdm-slick-greeter ### CHANGE THIS 
#greeter-hide-users=false
#greeter-allow-guest=true
#greeter-show-manual-login=false
#greeter-show-remote-login=true

Install what ever theme you want, this is called a greeter in lightdm, and then change the line above. After the changes are made you can either reboot or type sudo systemctl restart lightdm Please Note: This will log you out

Changing the Default Desktop Environment

lightdm.conf

[Seat:*]
#type=local
#pam-service=lightdm
#pam-autologin-service=lightdm-autologin
#pam-greeter-service=lightdm-greeter
#xserver-command=X
#xmir-command=Xmir
#xserver-config=
#xserver-layout=
#xserver-allow-tcp=false
#xserver-share=true
#xserver-hostname=
#xserver-display-number=
#xdmcp-manager=
#xdmcp-port=177
#xdmcp-key=
greeter-session=lightdm-slick-greeter
#greeter-hide-users=false
#greeter-allow-guest=true
#greeter-show-manual-login=false
#greeter-show-remote-login=true
user-session=default ################ CHANGE THIS
#allow-user-switching=true
#allow-guest=true
#guest-session=

To specify a specific desktop environment you need to change the user-session line to be your desktop environment. For example I use the awesome window manager for mine and I put user-session=awesome
Note: If you don’t know the name, the desktop environment list can be found with listing .desktop file from /usr/share/xsessions/*.desktop
For complete listing of user sessions type: ls /usr/share/xsessions/*.desktop

AutoLogin with LightDM

Change the following part of the file to autologin. Note: This does pose a security risk and should never be done in a business

lightdm.conf Under [Seat:*]

autologin-guest=false
autologin-user=username
autologin-user-timeout=0
autologin-in-background=false
#autologin-session=

I generally uncomment the following lines above and just change this line autologin-user=username and then it will autologin that user on the next reboot. Note: You can use the autologin-guest instead of user to have it autologin as a guest account.

VNC Connection

At the buttom of the lightdm.conf file you will see VNC connection information. This information uses the tigervnc package and also is done using secure channel. This means you must establish a SSH connection with a portforward before you can connect to VNC. Example: ssh 192.168.69.10 -L 9901:localhost:5901 This establishes ssh and port forwards your local port 9901 to 5901 of the remote machine. Then you could launch VNC viewer with vncviewer localhost:9901. Even though this says localhost it is forwarding the request through SSH to the remote machine.

Now with that framework lets look at the conf file:

#
# VNC Server configuration
#
# enabled = True if VNC connections should be allowed
# command = Command to run Xvnc server with
# port = TCP/IP port to listen for connections on
# listen-address = Host/address to listen for VNC connections (use all addresses if not present)
# width = Width of display to use
# height = Height of display to use
# depth = Color depth of display to use
#
[VNCServer]
#enabled=false
#command=Xvnc
#port=5900
#listen-address=
#width=1024
#height=768
#depth=8

The main things to change here are enabled=true width - height - depth and then you are off. My typical defaults would look like the following:

[VNCServer]
enabled=true
command=Xvnc
port=5900
#listen-address=
width=1920
height=1080
depth=16

Video Walkthrough

lightdm guide
Note: YouTube Video - Hold Ctrl + Left Click to open in new window

I live stream on Twitch and encourage you to drop in and ask a question. I regularly publish on YouTube and christitus.com, but if you need immediate assistance, check out the Terminal Cafe with Discord Invite Link.

Share on
Support the author with

Chris Titus
WRITTEN BY
Chris Titus
TechGuy On YouTube