Re: [gdm-list] RFC: Enable timed/automatic login for multiseat displays




On 12 Jul 2013, at 16:57, Glen Gray <slaine slaine org> wrote:

Hey guys,

I've attached a first blush patch to enable timed/automatic logins on seats > seat0. This patch is 
essentially made up of two parts.

1) In daemon/gdm-display.c where it currently checks if the seat != seat0. Rather than doing "goto out;" 
immediately, it queries the username. If the username is utilising the script method** then let the 
automated login proceed.

2) In gdm-simple-slave, rather than using a global level GDM_RAN_ONCE_FILE_MARKER, create one per seat. 
This allows the wants_autologin() to return True on a another seat rather than drop through to simply 
start_greeter().

** 
https://help.gnome.org/admin/gdm/stable/configuration.html.en
...
TimedLogin  (applies to AutomaticLogin also)
This is the user that should be logged in after a specified number of seconds of inactivity.
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.

I've performed some basic testing as follows utilizing a Plugable displaylink usb hub and a PC with 
integrated intel graphics.

1) AutomaticLoginEnabled = False 
  Gdm Greeter is launched on both displays

2) AutomaticLoginEnabled = True / AutomaticLogin=username
  seat0 => username is logged in automtically, no greeter launched.
  seatn => Gdm Greeter is displayed

3) AutomaticLoginEnabled = True / AutomaticLogin=/usr/bin/getSeatUser.sh|
  seat0 => getSeatUser.sh looks for some seat/DISPLAY details and echo's out username, who is logged in 
           automtically, no greeter launched.
  seatn => getSeatUser.sh looks for some seat/DISPLAY details and echo's out username, who is logged in 
           automtically, no greeter launched.

Feedback and suggestions welcome.

Updated to also export the GDM_SEAT_ID for the initial environment as it's a useful variable to query in the 
login user script.

Attachment: fix-autologin-multiseat.patch
Description: Binary data


-- 
Glen Gray
<slaine slaine org>







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]