PDA

View Full Version : [ubuntu] 18.04, gdm3 auto login for multiple users (multiseat)



sfatula
April 23rd, 2019, 08:18 AM
I have 2 seats working, and, I'd like to auto login a user on each of them. So, from reading the doc for gdm on the gnome site, it appears you can do this:


AutomaticLogin=/usr/local/bin/LoginChooser.sh|

In the /etc/gdm3/custom.conf file. SO, I Have said script, and it looks like this:


#!/bin/bash
if [ "$DISPLAY" == ":0" ]; then
echo "user1"
else
echo "user2"
fi


But it does not work. No one auto logs in (the names are not the actual user names I am using or in the script). Without a script, one of the seats screens will show auto login, but, the second will not since you can only seem to login once.

What am I doing wrong? Perhaps that feature is newer than the version in ubuntu 18.04? I added a line as well to log to a file when this is executed, and, nothing was logged, meaning it's not running. I found the documentation for this setting here:

https://help.gnome.org/admin/gdm/stable/configuration.html.en

joedwards32
June 20th, 2019, 04:19 PM
I hit the same problem recently. The functionality was pulled out of GDM a while ago, see my comment (https://gitlab.gnome.org/GNOME/gdm/issues/481) on the bug you raised.

You can achieve what you want to do with lightdm:



sudo apt install lightdm
switch default to lightdm when prompted
edit /etc/lightdm/lightdm.conf.d/10-autologin.conf




[Seat:seat0]
autologin-user=user1

[Seat:seat1]
autologin-user=user2


Reboot

cruzer001
June 20th, 2019, 04:45 PM
Lightdm is a often used work-a-round for gdm problems.

+1 joedwards32 answer