LightDM.Greeter¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
| do_authentication_complete() | |
| do_autologin_timer_expired() | |
| do_idle() | |
| do_reset() | |
| do_show_message(text, type) | |
| do_show_prompt(text, type) | 
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| authentication-user | str | r | The user being authenticated | 
| autologin-guest-hint | bool | r | Autologin guest account hint | 
| autologin-session-hint | str | r | Autologin session hint | 
| autologin-timeout-hint | int | r | Autologin timeout hint | 
| autologin-user-hint | str | r | Autologin user hint | 
| default-session-hint | str | r | Default session hint | 
| has-guest-account-hint | bool | r | Has guest account hint | 
| hide-users-hint | bool | r | Hide users hint | 
| in-authentication | bool | r | Trueif a user is being authenticated | 
| is-authenticated | bool | r | Trueif the selected user is authenticated | 
| lock-hint | bool | r | Lock hint | 
| select-guest-hint | bool | r | Select guest account hint | 
| select-user-hint | str | r | Select user hint | 
| show-manual-login-hint | bool | r | Show manual login hint | 
| show-remote-login-hint | bool | r | Show remote login hint | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| authentication-complete | The ::authentication-completesignal gets emitted when the greeter has completed authentication. | 
| autologin-timer-expired | The ::timed-loginsignal gets emitted when the automatic login timer has expired. | 
| idle | The ::idlesignal gets emitted when the user has logged in and the greeter is no longer needed. | 
| reset | The ::resetsignal gets emitted when the user is returning to a greeter that was previously marked idle. | 
| show-message | The ::show-messagesignal gets emitted when the greeter should show a message to the user. | 
| show-prompt | The ::show-promptsignal gets emitted when the greeter should show a prompt to the user. | 
Class Details¶
- 
class LightDM.Greeter(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - Structure: - LightDM.GreeterClass- LightDM.Greeteris an opaque data structure and can only be accessed using the provided functions.- 
classmethod new()¶
- Returns: - the new - LightDM.Greeter- Return type: - LightDM.Greeter- Create a new greeter. 
 - 
authenticate(username)¶
- Parameters: - username ( - stror- None) – A username or- Noneto prompt for a username.- Raises: - GLib.Error- Returns: - Trueif authentication request sent.- Return type: - bool- Starts the authentication procedure for a user. 
 - 
authenticate_as_guest()¶
- Raises: - GLib.Error- Returns: - Trueif authentication request sent.- Return type: - bool- Starts the authentication procedure for the guest user. 
 - 
authenticate_autologin()¶
- Raises: - GLib.Error- Returns: - Trueif authentication request sent.- Return type: - bool- Starts the authentication procedure for the automatic login user. 
 - 
authenticate_remote(session, username)¶
- Parameters: - Raises: - Returns: - Trueif authentication request sent.- Return type: - Start authentication for a remote session type. 
 - 
cancel_authentication()¶
- Raises: - GLib.Error- Returns: - Trueif cancel request sent.- Return type: - bool- Cancel the current user authentication. 
 - 
cancel_autologin()¶
- Cancel the automatic login. 
 - 
connect_sync()¶
- Raises: - GLib.Error- Returns: - Trueif successfully connected- Return type: - bool- Connects the greeter to the display manager. Will block until connected. - Deprecated since version 1.11.1: Use - LightDM.Greeter.connect_to_daemon_sync() instead
 - 
connect_to_daemon(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when completed orNone.
- user_data (objectorNone) – data to pass to the callback orNone.
 - Asynchronously connects the greeter to the display manager. - When the operation is finished, callback will be invoked. You can then call - LightDM.Greeter.connect_to_daemon_finish() to get the result of the operation.- See - LightDM.Greeter.connect_to_daemon_sync() for the synchronous version.
- cancellable (
 - 
connect_to_daemon_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – A- Gio.AsyncResult.- Raises: - GLib.Error- Returns: - Trueif successfully connected- Return type: - bool- Finishes an operation started with - LightDM.Greeter.connect_to_daemon().
 - 
connect_to_daemon_sync()¶
- Raises: - GLib.Error- Returns: - Trueif successfully connected- Return type: - bool- Connects the greeter to the display manager. Will block until connected. 
 - Parameters: - username (str) – A username
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when completed orNone.
- user_data (objectorNone) – data to pass to the callback orNone.
 - Ensure that a shared data dir for the given user is available. Both the greeter user and username will have write access to that folder. The intention is that larger pieces of shared data would be stored there (files that the greeter creates but wants to give to a user – like camera photos – or files that the user creates but wants the greeter to see – like contact avatars). - LightDM will automatically create these if the user actually logs in, so greeters only need to call this method if they want to store something in the directory themselves. 
- username (
 - Parameters: - result ( - Gio.AsyncResult) – A- Gio.AsyncResult.- Raises: - GLib.Error- Returns: - The path to the shared directory, free with - GLib.free.- Return type: - str- Function to call from - LightDM.Greeter.ensure_shared_data_dircallback.
 - Parameters: - username ( - str) – A username- Raises: - GLib.Error- Returns: - The path to the shared directory, free with - GLib.free.- Return type: - str- Ensure that a shared data dir for the given user is available. Both the greeter user and username will have write access to that folder. The intention is that larger pieces of shared data would be stored there (files that the greeter creates but wants to give to a user – like camera photos – or files that the user creates but wants the greeter to see – like contact avatars). - LightDM will automatically create these if the user actually logs in, so greeters only need to call this method if they want to store something in the directory themselves. 
 - 
get_authentication_user()¶
- Returns: - The username of the authentication user being authenticated or - Noneif no authentication in progress.- Return type: - stror- None- Get the user that is being authenticated. 
 - 
get_autologin_guest_hint()¶
- Returns: - Trueif the guest account should be automatically logged into.- Return type: - bool- Check if the guest account should be automatically logged into when the timer expires. 
 - 
get_autologin_session_hint()¶
- Returns: - The session name or - Noneif configured to use the default.- Return type: - stror- None- Get the session used to automatically log into when the timer expires. 
 - 
get_autologin_timeout_hint()¶
- Returns: - The number of seconds to wait before automatically logging in or 0 for no timeout. - Return type: - int- Get the number of seconds to wait before automatically logging in. 
 - 
get_autologin_user_hint()¶
- Returns: - The user account to automatically log into or - Noneif none configured.- Return type: - stror- None- Get the user account to automatically log into when the timer expires. 
 - 
get_default_session_hint()¶
- Returns: - The session name - Return type: - str- Get the default session to use. 
 - 
get_has_guest_account_hint()¶
- Returns: - Trueif guest sessions are supported.- Return type: - bool- Check if guest sessions are supported. 
 - 
get_hide_users_hint()¶
- Returns: - Trueif the available users should not be shown.- Return type: - bool- Check if user accounts should be shown. If this is - Truethen the list of accounts should be taken from- LightDM.UserListand displayed in the greeter for the user to choose from. Note that this list can be empty and it is recommended you show a method for the user to enter a username manually.- If this option is shown the greeter should only allow these users to be chosen for login unless the manual login hint is set. 
 - 
get_hint(name)¶
- Parameters: - name ( - str) – The hint name to query.- Returns: - The value for this hint or - Noneif not set.- Return type: - stror- None- Get a hint. 
 - 
get_in_authentication()¶
- Returns: - Trueif the greeter is authenticating a user.- Return type: - bool- Checks if the greeter is in the process of authenticating. 
 - 
get_is_authenticated()¶
- Returns: - Trueif the greeter is authenticated for login.- Return type: - bool- Checks if the greeter has successfully authenticated. 
 - 
get_lock_hint()¶
- Returns: - Trueif the greeter was triggered by locking the seat.- Return type: - bool- Check if the greeter is acting as a lock screen. 
 - 
get_select_guest_hint()¶
- Returns: - Trueif the guest account should be selected by default.- Return type: - bool- Check if the guest account should be selected by default. 
 - 
get_select_user_hint()¶
- Returns: - A username or - Noneif no particular user should be selected.- Return type: - stror- None- Get the user to select by default. 
 - 
get_show_manual_login_hint()¶
- Returns: - Trueif a manual login option should be shown.- Return type: - bool- Check if a manual login option should be shown. If set the GUI should provide a way for a username to be entered manually. Without this hint a greeter which is showing a user list can limit logins to only those users. 
 - 
get_show_remote_login_hint()¶
- Returns: - Trueif a remote login option should be shown.- Return type: - bool- Check if a remote login option should be shown. If set the GUI should provide a way for a user to log into a remote desktop server. 
 - 
respond(response)¶
- Parameters: - response ( - str) – Response to a prompt- Raises: - GLib.Error- Returns: - Trueif response sent.- Return type: - bool- Provide response to a prompt. May be one in a series. 
 - 
set_language(language)¶
- Parameters: - language ( - str) – The language to use for this user in the form of a locale specification (e.g. “de_DE.UTF-8”).- Raises: - GLib.Error- Returns: - Trueif set language request sent.- Return type: - bool- Set the language for the currently authenticated user. 
 - 
set_resettable(resettable)¶
- Parameters: - resettable ( - bool) – Whether the greeter wants to be reset instead of killed after the user logs in- Set whether the greeter will be reset instead of killed after the user logs in. This must be called before lightdm_greeter_connect is called. 
 - 
start_session(session, cancellable, callback, *user_data)¶
- Parameters: - session (strorNone) – The session to log into orNoneto use the default.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when completed orNone.
- user_data (objectorNone) – data to pass to the callback orNone.
 - Asynchronously start a session for the authenticated user. - When the operation is finished, callback will be invoked. You can then call - LightDM.Greeter.start_session_finish() to get the result of the operation.- See - LightDM.Greeter.start_session_sync() for the synchronous version.
- session (
 - 
start_session_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – A- Gio.AsyncResult.- Raises: - GLib.Error- Returns: - Trueif the session was started.- Return type: - bool- Start a session for the authenticated user. 
 - 
start_session_sync(session)¶
- Parameters: - session ( - stror- None) – The session to log into or- Noneto use the default.- Raises: - GLib.Error- Returns: - Trueif the session was started.- Return type: - bool- Start a session for the authenticated user. 
 - 
do_authentication_complete() virtual¶
 - 
do_autologin_timer_expired() virtual¶
 - 
do_idle() virtual¶
 - 
do_reset() virtual¶
 - 
do_show_message(text, type) virtual¶
- Parameters: - text (str) –
- type (LightDM.MessageType) –
 
- text (
 - 
do_show_prompt(text, type) virtual¶
- Parameters: - text (str) –
- type (LightDM.PromptType) –
 
- text (
 
- 
classmethod 
Signal Details¶
- 
LightDM.Greeter.signals.authentication_complete(greeter)¶
- Signal Name: - authentication-complete- Flags: - RUN_LAST- Parameters: - greeter ( - LightDM.Greeter) – The object which received the signal- The - ::authentication-completesignal gets emitted when the greeter has completed authentication.- Call - LightDM.Greeter.get_is_authenticated() to check if the authentication was successful.
- 
LightDM.Greeter.signals.autologin_timer_expired(greeter)¶
- Signal Name: - autologin-timer-expired- Flags: - RUN_LAST- Parameters: - greeter ( - LightDM.Greeter) – The object which received the signal- The - ::timed-loginsignal gets emitted when the automatic login timer has expired. The application should then call- LightDM.Greeter.authenticate_autologin().
- 
LightDM.Greeter.signals.idle(greeter)¶
- Signal Name: - idle- Flags: - RUN_LAST- Parameters: - greeter ( - LightDM.Greeter) – The object which received the signal- The - ::idlesignal gets emitted when the user has logged in and the greeter is no longer needed.- This signal only matters if the greeter has marked itself as resettable using - LightDM.Greeter.set_resettable().
- 
LightDM.Greeter.signals.reset(greeter)¶
- Signal Name: - reset- Flags: - RUN_LAST- Parameters: - greeter ( - LightDM.Greeter) – The object which received the signal- The - ::resetsignal gets emitted when the user is returning to a greeter that was previously marked idle.- This signal only matters if the greeter has marked itself as resettable using - LightDM.Greeter.set_resettable().
- 
LightDM.Greeter.signals.show_message(greeter, text, type)¶
- Signal Name: - show-message- Flags: - Parameters: - greeter (LightDM.Greeter) – The object which received the signal
- text (str) – Message text
- type (LightDM.MessageType) – Message type
 - The - ::show-messagesignal gets emitted when the greeter should show a message to the user.
- greeter (
- 
LightDM.Greeter.signals.show_prompt(greeter, text, type)¶
- Signal Name: - show-prompt- Flags: - Parameters: - greeter (LightDM.Greeter) – The object which received the signal
- text (str) – Prompt text
- type (LightDM.PromptType) – Prompt type
 - The - ::show-promptsignal gets emitted when the greeter should show a prompt to the user. The given text should be displayed and an input field for the user to provide a response.- Call - LightDM.Greeter.respond() with the resultant input or- LightDM.Greeter.cancel_authentication() to abort the authentication.
- greeter (
Property Details¶
- 
LightDM.Greeter.props.authentication_user¶
- Name: - authentication-user- Type: - str- Default Value: - None- Flags: - READABLE- The user being authenticated 
- 
LightDM.Greeter.props.autologin_guest_hint¶
- Name: - autologin-guest-hint- Type: - bool- Default Value: - False- Flags: - READABLE- Autologin guest account hint 
- 
LightDM.Greeter.props.autologin_session_hint¶
- Name: - autologin-session-hint- Type: - str- Default Value: - None- Flags: - READABLE- Autologin session hint 
- 
LightDM.Greeter.props.autologin_timeout_hint¶
- Name: - autologin-timeout-hint- Type: - int- Default Value: - 0- Flags: - READABLE- Autologin timeout hint 
- 
LightDM.Greeter.props.autologin_user_hint¶
- Name: - autologin-user-hint- Type: - str- Default Value: - None- Flags: - READABLE- Autologin user hint 
- 
LightDM.Greeter.props.default_session_hint¶
- Name: - default-session-hint- Type: - str- Default Value: - None- Flags: - READABLE- Default session hint 
- 
LightDM.Greeter.props.has_guest_account_hint¶
- Name: - has-guest-account-hint- Type: - bool- Default Value: - False- Flags: - READABLE- Has guest account hint 
- 
LightDM.Greeter.props.hide_users_hint¶
- Name: - hide-users-hint- Type: - bool- Default Value: - False- Flags: - READABLE- Hide users hint 
- 
LightDM.Greeter.props.in_authentication¶
- Name: - in-authentication- Type: - bool- Default Value: - False- Flags: - READABLE- Trueif a user is being authenticated
- 
LightDM.Greeter.props.is_authenticated¶
- Name: - is-authenticated- Type: - bool- Default Value: - False- Flags: - READABLE- Trueif the selected user is authenticated
- 
LightDM.Greeter.props.lock_hint¶
- Name: - lock-hint- Type: - bool- Default Value: - False- Flags: - READABLE- Lock hint 
- 
LightDM.Greeter.props.select_guest_hint¶
- Name: - select-guest-hint- Type: - bool- Default Value: - False- Flags: - READABLE- Select guest account hint 
- 
LightDM.Greeter.props.select_user_hint¶
- Name: - select-user-hint- Type: - str- Default Value: - None- Flags: - READABLE- Select user hint