lightdm-webkit2-greeter(1)

πŸ“¦ version 2.2.5, in arch rolling

πŸ’… lightdm-webkit2-greeter β€” the manual page, but make it make sense

okay so real talk: this is a section of the General Commands Manual, and the page you're reading is lightdm-webkit2-greeter(1). yes bestie, the whole thing. let's get into it 🫢


✨ NAME ✨

lightdm-webkit2-greeter β€” she's the login screen, but make her aesthetic. no cap.


🌸 SYNOPSIS 🌸

LightDM greeter that uses webkit2 for theming via HTML/JavaScript.

like, that's literally the whole thing. she's a greeter, she uses webkit2, and your theme is HTML + JavaScript. iconic behavior honestly.


πŸ¦‹ DESCRIPTION πŸ¦‹

lightdm-webkit2-greeter is a LightDM greeter that uses webkit2 for theming. that means themes can be written using a combination of HTML and Javascript. so basically you're not stuck with some crusty default login box β€” you get to design the whole vibe. main character energy fr fr πŸ’…


πŸ‘‘ THEME JAVASCRIPT API πŸ‘‘

⚠️ heads up bestie ⚠️ everything marked as "deprecated" is only there for backwards compatibility and will be removed in a future version of lightdm-webkit2-greeter. do not use deprecated properties or functions in new works, periodt. and if your existing theme uses them, update it so it keeps working β€” future-you will thank you 😭

πŸŽ€ functions your theme MUST provide

these have to be provided by the greeter theme and be callable on the global window object. no skipping.

  • show_prompt(text, type) β€” gets called when LightDM needs to prompt the user for some reason, like asking for a password. text is the prompt text, and type is either text for a visible prompt or password for a prompt where the input should be hidden. yes, hide the secret. πŸ™ˆ
  • show_message(text, type) β€” gets called when LightDM needs to display some info for the user. text is the message text, and type is either info for an information message or error for an error message that LightDM hit. πŸ“
  • authentication_complete() β€” called by LightDM when authentication has completed. that's it. she's done.
  • autologin_timer_expired() β€” called by LightDM when an autologin user's login timer has expired. the greeter should reset the authentication process. don't forget the reset, bestie πŸ’€

⭐ functions your greeter can call (to make LightDM do stuff)

  • lightdm.authenticate(username) β€” specifies the username of the user we'd like to start authenticating as. quick note: if you call lightdm.authenticate with no argument, LightDM (via PAM) will issue a show_prompt() call to ask for the username. also, the older function lightdm.start_authentication() has been deprecated. 🫢
  • lightdm.authenticate_as_guest() β€” authenticates as the guest user. easy.
  • lightdm.cancel_authentication() β€” cancels the authentication of any user currently in the process of authenticating.
  • lightdm.cancel_autologin() β€” cancels the authentication of the autologin user. the older function lightdm.cancel_timed_login() has been deprecated.
  • lightdm.get_hint(hint_name) β€” returns the value of a named hint provided by LightDM.
  • lightdm.suspend() β€” suspends the system, if the greeter has the authority to do so. key words: if.
  • lightdm.hibernate() β€” hibernates the system, if the greeter has the authority to do so.
  • lightdm.start_session_sync(session) β€” once LightDM has successfully authenticated the user, start the user's session by calling this. session is the authenticated user's session. if no session is passed, start the authenticated user with the system default session. the older function lightdm.login(user, session) has been deprecated.
  • lightdm.respond(text) β€” when LightDM has prompted for input, provide the response to LightDM. the deprecated function was provide_secret. it's still available for backwards compatibility, but greeter authors should move to using lightdm.respond(). 🧚
  • lightdm.restart() β€” restarts the system, if the greeter has the authority to do so.
  • lightdm.set_language(lang) β€” will set the language for the current LightDM session.
  • lightdm.shutdown() β€” shuts down the system, if the greeter has the authority to do so.

πŸ’œ variables available inside the greeter

  • lightdm.authentication_user β€” String. the username of the authentication user being authenticated, or null if no authentication is in progress.
  • lightdm.autologin_guest β€” Boolean. indicates the guest user should be used for autologin.
  • lightdm.autologin_timeout β€” Number. the number of seconds to wait before automatically logging in. the older variable lightdm.timed_user_delay has been deprecated.
  • lightdm.autologin_user β€” String. the name of the user account that should be logged into automatically after the timed login delay has passed. the older variable lightdm.timed_login_user has been deprecated.
  • lightdm.can_hibernate β€” Boolean. whether or not the system can be made to hibernate by the greeter.
  • lightdm.can_restart β€” Boolean. whether or not the system can be restarted by the greeter.
  • lightdm.can_shutdown β€” Boolean. whether or not the system can be shutdown by the greeter.
  • lightdm.can_suspend β€” Boolean. whether or not the system can be suspended by the greeter.
  • lightdm.default_session β€” String. the name of the default session (as configured in lightdm.conf).
  • lightdm.has_guest_account β€” Boolean. a guest account is available for login.
  • lightdm.hide_users β€” Boolean. the whole list of users should not be displayed.
  • lightdm.hostname β€” String. the hostname of the system.
  • lightdm.is_authenticated β€” Boolean. indicates if the user has successfully authenticated.
  • lightdm.in_authentication β€” Boolean. indicates if lightdm is currently in the authentication phase.
  • lightdm.language β€” String. the currently selected language. the older variable name lightdm.default_language is deprecated.
  • lightdm.layout β€” String. the name of the currently active keyboard layout. to change the layout, assign a valid layout name to this variable. the older variable name lightdm.default_layout is deprecated.
  • lightdm.layouts β€” Array. the keyboard layouts that are available on the system. returns an Array of LightDMLayout objects.
  • lightdm.num_users β€” Number. the number of users able to log in.
  • lightdm.select_guest β€” Boolean. the guest user should be selected by default for login.
  • lightdm.select_user β€” String. the username that should be selected by default for login.
  • lightdm.sessions β€” Array. the sessions that are available on the system. returns an Array of LightDMSession objects.
  • lightdm.users β€” Array. the users that are able to log in. returns an Array of LightDMUser objects.

🌈 config object β€” reading stuff out of the config file

the following calls can be made to read configuration keys out of the lightdm-webkit2-greeter configuration file. yup, that file. πŸŽ€

  • config.get_str(section, key) β€” returns the string value associated with key under section in the configuration file.
  • config.get_num(section, key) β€” returns the numeric value associated with key under section in the configuration file.
  • config.get_bool(section, key) β€” returns the boolean value associated with key under section in the configuration file.

🧚 greeterutil β€” little helpers that make your life easier

the greeterutil object has some utility functions associated with it which are intended to make a theme author's work easier. obsessed. πŸ’–

  • greeterutil.dirlist(path) β€” returns an array of strings of filenames present at path, or Null if the path does not exist.
  • greeterutil.txt2html(txt) β€” returns a simple HTML conversion of the passed text. newlines are replaced with <br>, and the characters &, <, > and " are replaced with their HTML equivalents. escaping queen πŸ‘‘
one more thing! please see the LightDM API documentation for the complete list of calls available. lightdm-webkit2-greeter implements all of the LightDM API. all of it. no crumbs.

πŸ“ CONFIGURATION πŸ“

  • /etc/lightdm/lightdm-webkit2-greeter.conf β€” a Keyfile that contains one key: webkit-theme. this should point to which theme the greeter should use. that's the whole config. one (1) key. she's low maintenance πŸ’…

⭐ FILES ⭐

  • /usr/share/lightdm-webkit/themes β€” directory where themes should be stored. put 'em here bestie.

πŸ”₯ EXAMPLES πŸ”₯

please see the antergos and simple themes that are shipped with lightdm-webkit2-greeter. they're right there, go look πŸ‘€


πŸ¦‹ SEE ALSO πŸ¦‹

http://people.ubuntu.com/~robert-ancell/lightdm/reference/core.html β€” the link, in all its unclickable terminal glory ✨


πŸ’œ AUTHOR πŸ’œ

the legacy lightdm-webkit-greeter was written by Robert Ancell <robert.ancell@canonical.com>. it was ported to webkit2 by the Antergos Developers <dev@antergos.com>. also includes code improvements contributed by Scott Balneaves <sbalneav@ltsp.org>. give them their flowers πŸ’


and that's the whole page, bestie 🫢 this was lightdm-webkit2-greeter(1) from the General Commands Manual, version/date 2016.01.10 β€” yes she's a little vintage, she's still slaying. mwah πŸ’‹

πŸ“¦ where this page comes from