LightDMUser

LightDMUser — Get information on a user account

Functions

Properties

gchar * background Read
CommonUser * common-user Write / Construct Only
gchar * display-name Read
gboolean has-messages Read
gchar * home-directory Read
gchar * image Read
gchar * language Read
gchar * layout Read
GStrv layouts Read
gboolean logged-in Read
gchar * name Read
gchar * real-name Read
gchar * session Read
guint64 uid Read

Signals

Object Hierarchy

    GObject
    ╰── LightDMUser

Includes

#include <lightdm.h>

Description

Information about a local user account.

Functions

lightdm_user_get_name ()

const gchar *
lightdm_user_get_name (LightDMUser *user);

Get the name of a user.

Parameters

user

A LightDMUser

 

Returns

The name of the given user


lightdm_user_get_real_name ()

const gchar *
lightdm_user_get_real_name (LightDMUser *user);

Get the real name of a user.

Parameters

user

A LightDMUser

 

Returns

The real name of the given user


lightdm_user_get_display_name ()

const gchar *
lightdm_user_get_display_name (LightDMUser *user);

Get the display name of a user.

Parameters

user

A LightDMUser

 

Returns

The display name of the given user


lightdm_user_get_home_directory ()

const gchar *
lightdm_user_get_home_directory (LightDMUser *user);

Get the home directory for a user.

Parameters

user

A LightDMUser

 

Returns

The users home directory


lightdm_user_get_image ()

const gchar *
lightdm_user_get_image (LightDMUser *user);

Get the image URI for a user.

Parameters

user

A LightDMUser

 

Returns

The image URI for the given user or NULL if no URI.

[nullable]


lightdm_user_get_background ()

const gchar *
lightdm_user_get_background (LightDMUser *user);

Get the background file path for a user.

Parameters

user

A LightDMUser

 

Returns

The background file path for the given user or NULL if no path.

[nullable]


lightdm_user_get_language ()

const gchar *
lightdm_user_get_language (LightDMUser *user);

Get the language for a user.

Parameters

user

A LightDMUser

 

Returns

The language in the form of a local specification (e.g. "de_DE.UTF-8") for the given user or NULL if using the system default locale.

[nullable]


lightdm_user_get_layout ()

const gchar *
lightdm_user_get_layout (LightDMUser *user);

Get the keyboard layout for a user.

Parameters

user

A LightDMUser

 

Returns

The keyboard layout for the given user or NULL if using system defaults. Copy the value if you want to use it long term.

[nullable]


lightdm_user_get_layouts ()

const gchar * const *
lightdm_user_get_layouts (LightDMUser *user);

Get the configured keyboard layouts for a user.

Parameters

user

A LightDMUser

 

Returns

A NULL-terminated array of keyboard layouts for the given user. Copy the values if you want to use them long term.

[transfer none][array zero-terminated=1]


lightdm_user_get_session ()

const gchar *
lightdm_user_get_session (LightDMUser *user);

Get the session for a user.

Parameters

user

A LightDMUser

 

Returns

The session for the given user or NULL if using system defaults.

[nullable]


lightdm_user_get_logged_in ()

gboolean
lightdm_user_get_logged_in (LightDMUser *user);

Check if a user is logged in.

Parameters

user

A LightDMUser

 

Returns

TRUE if the user is currently logged in.


lightdm_user_get_has_messages ()

gboolean
lightdm_user_get_has_messages (LightDMUser *user);

Check if a user has waiting messages.

Parameters

user

A LightDMUser

 

Returns

TRUE if the user has waiting messages.


lightdm_user_get_uid ()

uid_t
lightdm_user_get_uid (LightDMUser *user);

Get the uid of a user.

Parameters

user

A LightDMUser

 

Returns

The uid of the given user

Types and Values

Property Details

The “background” property

  “background”               gchar *

User background.

Flags: Read

Default value: NULL


The “common-user” property

  “common-user”              CommonUser *

Internal user object.

Flags: Write / Construct Only


The “display-name” property

  “display-name”             gchar *

Users display name.

Flags: Read

Default value: NULL


The “has-messages” property

  “has-messages”             gboolean

TRUE if the user is has waiting messages.

Flags: Read

Default value: FALSE


The “home-directory” property

  “home-directory”           gchar *

Home directory.

Flags: Read

Default value: NULL


The “image” property

  “image”                    gchar *

Avatar image.

Flags: Read

Default value: NULL


The “language” property

  “language”                 gchar *

Language used by this user.

Flags: Read

Default value: NULL


The “layout” property

  “layout”                   gchar *

Keyboard layout used by this user.

Flags: Read

Default value: NULL


The “layouts” property

  “layouts”                  GStrv

Keyboard layouts used by this user.

Flags: Read


The “logged-in” property

  “logged-in”                gboolean

TRUE if the user is currently in a session.

Flags: Read

Default value: FALSE


The “name” property

  “name”                     gchar *

Username.

Flags: Read

Default value: NULL


The “real-name” property

  “real-name”                gchar *

Users real name.

Flags: Read

Default value: NULL


The “session” property

  “session”                  gchar *

Session used by this user.

Flags: Read

Default value: NULL


The “uid” property

  “uid”                      guint64

User UID.

Flags: Read

Default value: 0

Signal Details

The “changed” signal

void
user_function (LightDMUser *user,
               gpointer     user_data)

The ::changed signal gets emitted this user account is modified.

Parameters

user

A LightDMUser

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last