1

On Ubuntu 16.04 with lightdm, and an autologin account, I can restart the graphical session with command :

sudo service lightdm restart

The account logs in automatically.

On Ubuntu 18.04 (and also on 19.04), the same autologin account is setup, but the command :

sudo service gdm3 restart

fails to autologin, and bring the display to the login page.

In gdm logs, I can find

systemd[1]: gdm.service: Succeeded.
systemd[1]: Stopped GNOME Display Manager.
systemd[1]: Starting GNOME Display Manager...
systemd[1]: Started GNOME Display Manager.
gdm-autologin][4091]: gkr-pam: no password is available for user
gdm-autologin][4091]: pam_unix(gdm-autologin:session): session opened for user screen by (uid=0)
gdm-autologin][4091]: gkr-pam: couldn't unlock the login keyring.

How to properly restart the user session, with autologin user logged in on ubuntu 18.04 ?

2

Had the same issue, I solved it by enabling 'Timed Login' in the /etc/gdm3/custom.conf file. Mine looks like:

# GDM configuration storage
#
# See /usr/share/gdm/gdm.schemas for a list of available options.

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=username

# Uncoment the line below to force the login screen to use Xorg
#WaylandEnable=false

# Enabling automatic login

# Enabling timed login
TimedLoginEnable = true
TimedLogin = username
TimedLoginDelay = 10

[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
# More verbose logs
# Additionally lets the X server dump core if it crashes
#Enable=true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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