I use Debian 8 which runs Gnome 3.14.1.

I want to setup an autologin, but the name of the user to autolog is not fixed so I want to use a script to set it. According to GDM documentation (at https://help.gnome.org/admin/gdm/3.14/configuration.html.en#daemonsection), it is possible to use a "pipe" (|) at the end of the AutomaticLogin property of the /etc/gdm3/daemon.conf file to indicate that a script must be used to get the name of the user:

This is the user that should be logged in immediately if AutomaticLoginEnable is true. If the value ends with a vertical bar | (the pipe symbol), then GDM will execute the program specified and use whatever value is returned on standard out from the program as the user. The program is run with the DISPLAY environment variable set so that it is possible to specify the user in a per-display fashion. For example if the value is "/usr/bin/getloginuser|", then the program "/usr/bin/getloginuser" will be run to get the user value.

However, on my computer, gdm tries to log the user "/usr/bin/getloginuser|" instead of the result of the script. Does anyone know how to make it work?


  • I would try to replace GDM with nodm (packaged with Debian) and have that run gnome-session or whatever entry program GDM runs to bring the GNOME session in. nodm is a dedicated solution intended to handle "autologin" scenarios (for kiosks etc). – kostix Aug 29 '17 at 14:27
  • Update: see the gnome-session and/or gnome-session-bin packages. – kostix Aug 29 '17 at 14:28

I had a look at the source code of the gdm3 package included in Debian 8, and it seems that this "pipe" feature is not correctly implemented and thus cannot be used.

I also had a look on the gnome-session package as indicated in one of the comments but I don't understand how it can solve my problem.

I finally worked around my problem by creating a systemd service that runs before gdm and that change the AutomaticProperty in the /etc/gdm3/daemon.conf depending on the conditions I need.

| improve this answer | |

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.