web-greeter

by Antergos

stableccb1f8f  created January 1st 2018

other versions

7
Classes
21
Functions

LightDMGreeter

    Kind
    class
    Scope
    static

    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:

    fx
    LightDMGreeter#authenticate
    • username

    Kind
    function
    Scope
    instance

    Starts the authentication procedure for a user.

    Arguments:

    1. username, default:

      A username or null to prompt for a username.

    fx
    LightDMGreeter#authenticate_as_guest

      Kind
      function
      Scope
      instance

      Starts the authentication procedure for the guest user.

      LightDMGreeter#autologin_guest

      Kind
      member
      Scope
      instance

      Whether or not the guest account should be automatically logged into when the timer expires.

      fx
      LightDMGreeter#cancel_authentication

        Kind
        function
        Scope
        instance

        Cancel the user authentication that is currently in progress.

        fx
        LightDMGreeter#set_language
        • language

        Kind
        function
        Scope
        instance

        Set the language for the currently authenticated user.

        Arguments:

        1. language

          The language in the form of a locale specification (e.g. 'de_DE.UTF-8')

        Returns:

        1. true if successful, otherwise false

        LightDMGreeterConfig#branding

        Kind
        member
        Type
        Scope
        instance

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

        Properties:

        1. background_images

          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.

        fx
        LightDMGreeterConfig#get_bool
        • config_section
        • key

        Kind
        function
        Scope
        instance
        Deprecated
        yes

        Deprecated! Access config sections directly as properties of this object instead.

        Arguments:

        1. config_section

        2. key

        Returns:

        1. Config value for key.

        fx
        LightDMGreeterConfig#get_num
        • config_section
        • key

        Kind
        function
        Scope
        instance
        Deprecated
        yes

        Deprecated! Access config sections directly as properties of this object instead.

        Arguments:

        1. config_section

        2. key

        Returns:

        1. Config value for key.

        fx
        LightDMGreeterConfig#get_str
        • config_section
        • key

        Kind
        function
        Scope
        instance
        Deprecated
        yes

        Deprecated! Access config sections directly as properties of this object instead.

        Arguments:

        1. config_section

        2. key

        Returns:

        1. Config value for key.

        LightDMGreeterConfig#greeter

        Kind
        member
        Type
        Scope
        instance

        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. webkit_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

        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.

        Returns:

        1. List of abs paths for the files and directories found in path.

        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.