auto login on xfce in jessie

This page describes how to enable it.

Edit the LightDM configuration file and ensure these lines are uncommented and correctly configured:

/etc/lightdm/lightdm.conf

[Seat:*]
pam-service=lightdm
pam-autologin-service=lightdm-autologin
autologin-user=username
autologin-user-timeout=0
session-wrapper=/etc/X11/Xsession
greeter-session=lightdm-greeter

LightDM goes through PAM even when autologin is enabled. You must be part of the autologin group to be able to login automatically without entering your password:

# groupadd -r autologin
# gpasswd -a username autologin

here is the correct answer for Debian 9 Jessie, for all of you who need help the correct way.

Add Auto Login to Debian

First you need switch to the LightDM (Desktop Manager).

  1. Switch to LightDM**

    sudo dpkg-reconfigure lightdm
    
  2. Add the Autologin account**

    sudo groupadd -r autologin
    
    sudo gpasswd -a YOURUSERNAME autologin
    
  3. Edit the LightDM Config Files

    sudo leafpad /etc/lightdm/lightdm.conf
    

Add all 3 of these lines below to the file and save it:

[SeatDefaults]
autologin-user=YOURUSERNAME
autologin-user-timeout=0
autologin-session=xfce

Now, notice that above has XFCE as the session. If you use gnome, cinnamon, etc., make sure you specify what session (GUI) you use, otherwise above will log you into XFCE and you may not have it installed.

If you don't know, type

echo $DESKTOP_SESSION

In Debian 9 and 10 with Xfce, all I had to do was add this to /etc/lightdm/lightdm.conf:

[Seat:*]
autologin-user=david

Despite what the other answers say, my user does not need to be in the autologin group and I didn't need to do anything with PAM.

(Source: https://wiki.debian.org/LightDM#Enable_autologin)