Autologin of clients with Gnome

From K12LTSP Wiki

Jump to: navigation, search

From the LTSP mailing list, courtesy of Lott Caskey. The current version of K12LTSP at the time of this writing is 5.0, based on Fedora Core 5. This procedure may or may not work with other versions.

In Gnome (GDM) setup an automatic login as a pipe, the program to run then a pipe (||). I then wrote a simple script that evaluated the $DISPLAY env and then return the appropriate loginname. In my case, I changed the hostnames of the terminals and created matching system accounts. If the user doesn't enter a username within 30 seconds, it defaults to the autologin account.

Example, add the following lines to the specified sections of /etc/gdm/custom.conf:

<verbatim> daemon AutomaticLoginEnable=true TimedLoginEnable=true TimedLogin=/usr/bin/autologin.pl|| TimedLoginDelay=30 security AllowRemoteAutoLogin=true </verbatim>

Create the autologin script "/usr/bin/autologin.pl"

<verbatim>

  1. ====/usr/bin/perl ====

use strict; my ($disp) = split /:/, $ENV{'DISPLAY'};

  1. Add per-machine specific users here:
  2. ie. $disp = "johns" if ($disp eq "ws025");

print $disp; </verbatim>

Make sure autologin.pl is executable and you have restarted gdm.

Personal tools