web-greeter

by Antergos

master51e0d1e  created March 1st 2018

other versions

7
Classes
15
Functions

LightDMGreeter

    Base class for the greeter's Theme JavaScript API. Greeter themes will interact directly with an object derived from this class to facilitate the user log-in process. The greeter will automatically create an instance when it starts. The instance can be accessed using the global variable: lightdm.

    Instance Members:

    LightDMGreeter#show_manual_login_hint

    Check if a manual login option should be shown. If true, the theme should provide a way for a username to be entered manually. Otherwise, themes that show a user list may limit logins to only those users.

    LightDMGreeterConfig#branding

    Holds keys/values from the branding section of the config file.

    Properties:

    1. background_images_dir

      Path to directory that contains background images for use in greeter themes.

    2. logo

      Path to distro logo image for use in greeter themes.

    3. user_image

      Default user image/avatar. This is used by greeter themes for users that have not configured a .face image.

    LightDMGreeterConfig#greeter

    Holds keys/values from the greeter section of the config file.

    Properties:

    1. debug_mode

      Greeter theme debug mode.

    2. detect_theme_errors

      Provide an option to load a fallback theme when theme errors are detected.

    3. screensaver_timeout

      Blank the screen after this many seconds of inactivity.

    4. secure_mode

      Don't allow themes to make remote http requests.

    5. time_format

      A moment.js format string to be used by the greeter to generate localized time for display.

    6. time_language

      Language to use when displaying the time or auto to use the system's language.

    7. theme

      The name of the theme to be used by the greeter.

    fx
    LightDMThemeUtils#bind_this
    • context

    Kind
    function
    Scope
    instance

    Binds this to class, context, for all of the class's methods.

    Arguments:

    1. context

      An ES6 class instance with at least one method.

    Returns:

    1. context with this bound to it for all of its methods.

    fx
    LightDMThemeUtils#dirlist
    • path
    • only_images
    • callback

    Kind
    function
    Scope
    instance

    Returns the contents of directory found at path provided that the (normalized) path meets at least one of the following conditions:

    • Is located within the greeter themes' root directory.
    • Has been explicitly allowed in the greeter's config file.
    • Is located within the greeter's shared data directory (/var/lib/lightdm-data).
    • Is located in /tmp.

    Arguments:

    1. path

      The abs path to desired directory.

    2. only_images, default: true

      Include only images in the results. Default true.

    3. callback

      Callback function to be called with the result.

    fx
    LightDMThemeUtils#get_current_localized_time

      Kind
      function
      Scope
      instance

      Get the current time in a localized format. Time format and language are auto-detected by default, but can be set manually in the greeter config file.

      • language defaults to the system's language, but can be set manually in the config file.
      • When time_format config file option has a valid value, time will be formatted according to that value.
      • When time_format does not have a valid value, the time format will be LT which is 1:00 PM or 13:00 depending on the system's locale.

      Returns:

      1. The current localized time.