Allow testing GDM login dialog from the session
Check an environment variable, GDM_GREETER_TEST. If 1, LoginDialog will skip anything that fails outside a GDM session. It is therefore possible to test the GDM greeter without installing it system-wide, by attempting login as the already logged in user (uses the same code path as the unlock dialog). https://bugzilla.gnome.org/show_bug.cgi?id=683725
This commit is contained in:
parent
a2b1946b01
commit
e249218a9d
@ -638,15 +638,17 @@ const LoginDialog = new Lang.Class({
|
||||
this._userManager = AccountsService.UserManager.get_default()
|
||||
this._greeterClient = new Gdm.Client();
|
||||
|
||||
this._greeter = this._greeterClient.get_greeter_sync(null);
|
||||
if (GLib.getenv('GDM_GREETER_TEST') != '1') {
|
||||
this._greeter = this._greeterClient.get_greeter_sync(null);
|
||||
|
||||
this._greeter.connect('default-session-name-changed',
|
||||
Lang.bind(this, this._onDefaultSessionChanged));
|
||||
this._greeter.connect('default-session-name-changed',
|
||||
Lang.bind(this, this._onDefaultSessionChanged));
|
||||
|
||||
this._greeter.connect('session-opened',
|
||||
Lang.bind(this, this._onSessionOpened));
|
||||
this._greeter.connect('timed-login-requested',
|
||||
Lang.bind(this, this._onTimedLoginRequested));
|
||||
this._greeter.connect('session-opened',
|
||||
Lang.bind(this, this._onSessionOpened));
|
||||
this._greeter.connect('timed-login-requested',
|
||||
Lang.bind(this, this._onTimedLoginRequested));
|
||||
}
|
||||
|
||||
this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient);
|
||||
this._userVerifier.connect('ask-question', Lang.bind(this, this._askQuestion));
|
||||
|
Loading…
Reference in New Issue
Block a user