I have started running Jessie (Debian 8) with a LightDM/Xfce desktop on my HTPC after it grinding to a near-halt on W7. One of the things that I cannot get past is having to type the password -- not a normal thing to do for watching TV.

Following the instructions on the Debian Wiki I got as far as my login being automatically selected. But this still requires the password, and half-fixes like empty / trivial passwords are not allowed.

Is it possible to go straight to the Xfce session without login/password?

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
  • Thanks! The arch docs seem more complete than Debian's... Unfortunately the settings don't translate. I changed it so that lightdm --show-config gives greeter-session=lightdm-greeter and session-wrapper=/etc/X11/Xsession, the lines about pam and auto-login-user are the same. Without the greeter-session line X does not start. <br> I did the bit for the autologin group but still had to type my password. Then I did the bit for the nopasswdlogin group and then neither my password nor the root were accepted by lightdm?? – alle_meije Aug 11 '16 at 19:49
  • ok, so, it does work in the end with some tweaking? – madeddie Aug 11 '16 at 19:50
  • no - the only tweaking I did was adding the other group as documented on the Arch wiki. But I had to remove that to get into X at all.. – alle_meije Aug 11 '16 at 19:55
  • yeah, so those are 2 different things, the autologin group and the nopasswdlogin group, did you add yourself to the nopasswdlogin group before making the changes to PAM? – madeddie Aug 11 '16 at 19:59
  • 1
    i'm at a loss actually and sadly don't have an xfce system i can easily test on – madeddie Aug 11 '16 at 20:13

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
  • Thanks! The only one that worked for me – Gus Apr 28 at 17:43
up vote 1 down vote accepted

I solved it using the Debian wiki page and this page on LinuxServe -- especially the comment!

when I do /usr/sbin/lightdm --show-config I get two files: /etc/lightdm/lightdm.conf and /usr/share/lightdm/lightdm.conf.d/01_debian.conf

These I edited so that in /usr/share/lightdm/lightdm.conf.d/01_debian.conf it says:
greeter-session=lightdm-greeter
session-wrapper=/etc/X11/Xsession

and in /etc/lightdm/lightdm.conf it says:
autologin-user=username
autologin-user-timeout=0

The trick was that, as the comment at the end of the second link says, that the autologin settings need to be in the [SeatDefaults] section of the file. There are two places where the lines appear, commented, and I had uncommented the first place.

It was a bit strange because in normal settings files for Debian, lines like these don't appear twice -- but I should have taken a better look!

  • That's a great answer. For Debian 9.0.3 'stretch', your instructions work perfectly for xcfe, and the values you show for 01_debian.conf are the default values, so all I needed to change was in lightdm.conf – clearlight Jan 28 at 21:28
  • NOTE: root user: If autologin-user=root, autologin will silently fail unless you also comment-out auth required pam_succeed_if.so user != root quiet_success in /etc/pam.d/lightdm-autologin – clearlight Jan 28 at 21:31

Below worked for me. I was logged as root.

  1. Add user to autologin goup

groupadd -r autologin gpasswd -a YOURUSERNAME autologin

  1. Edit config file -> /etc/lightdm/lightdm.conf Change part below [Seat:*] -> uncomment and fill data

autologin-user=YOURUSERNAME autologin-user-timeout=0 autologin-session=DESKTOP_SESSION

2a. If you don't know session name echo $DESKTOP_SESSION

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.