1. When I change the selected user in lightdm-gtk-greeter user list, function set_displayed_user() is called.
2. lightdm-gtk-greeter's function set_displayed_user(), in turn, calls start_authentication(), which then calls lightdm function lightdm_greeter_authenticate() (or lightdm_greeter_authenticate_as_guest(), if guest login is selected).
3. When autologin timeout expires, greeter calls lightdm_greeter_authenticate_autologin(), which, in turn, calls the same suitable lightdm_greeter_authenticate{,_as_guest}() function as before.
In the end, lightdm_greeter_authenticate{,_as_guest}() is called twice for the same user, and maybe the second call is ignored by lightdm. If this is right, some possible solutions are:
A. In lightdm-gtk-greeter's function set_displayed_user(), check first if selected user matches configured autologin one, and don't call start_authentication() immediately if they match, but only when login button is clicked.
B. In lightdm-gtk-greeters's function start_authentication(), check first if given username matches configured autologin one, and don't call lightdm_greeter_authenticate{,_as_guest}() if they match.
C. In lightdm's function lightdm_greeter_authenticate{,_as_guest}(), allow somehow that a second call for the same user overrides the first call, specially if second call is of autologin kind, and first one is of manual kind.
I guess I can trace out the problem now:
1. When I change the selected user in lightdm-gtk-greeter user list, function set_displayed_ user() is called.
2. lightdm- gtk-greeter' s function set_displayed_ user(), in turn, calls start_authentic ation() , which then calls lightdm function lightdm_ greeter_ authenticate( ) (or lightdm_ greeter_ authenticate_ as_guest( ), if guest login is selected).
3. When autologin timeout expires, greeter calls lightdm_ greeter_ authenticate_ autologin( ), which, in turn, calls the same suitable lightdm_ greeter_ authenticate{ ,_as_guest} () function as before.
In the end, lightdm_ greeter_ authenticate{ ,_as_guest} () is called twice for the same user, and maybe the second call is ignored by lightdm. If this is right, some possible solutions are:
A. In lightdm- gtk-greeter' s function set_displayed_ user(), check first if selected user matches configured autologin one, and don't call start_authentic ation() immediately if they match, but only when login button is clicked.
B. In lightdm- gtk-greeters' s function start_authentic ation() , check first if given username matches configured autologin one, and don't call lightdm_ greeter_ authenticate{ ,_as_guest} () if they match.
C. In lightdm's function lightdm_ greeter_ authenticate{ ,_as_guest} (), allow somehow that a second call for the same user overrides the first call, specially if second call is of autologin kind, and first one is of manual kind.