System Information

System Information — Get system information

Functions

Includes

#include <lightdm.h>

Description

Helper functions to get system information.

Functions

lightdm_get_hostname ()

const gchar *
lightdm_get_hostname (void);

Returns

The name of the host we are running on.


lightdm_get_os_id ()

const gchar *
lightdm_get_os_id (void);

Get a word describing the OS, suitable for checking which OS the greeter is running on. e.g. "ubuntu"

Returns

a string (ID variable from /etc/os-release) or NULL if not set.

[nullable]


lightdm_get_os_name ()

const gchar *
lightdm_get_os_name (void);

Get a line of text describing the OS without version information, suitable for presentation to the user. e.g. "Ubuntu"

Returns

a string (NAME variable from /etc/os-release) or NULL if not set.

[nullable]


lightdm_get_os_pretty_name ()

const gchar *
lightdm_get_os_pretty_name (void);

Get a line of text describing the OS, suitable for presentation to the user. e.g. "Ubuntu 16.04.1 LTS"

Returns

a string (PRETTY_NAME variable from /etc/os-release) or NULL if not set.

[nullable]


lightdm_get_os_version ()

const gchar *
lightdm_get_os_version (void);

Get a line of text describing the OS version, suitable for presentation to the user. e.g. "16.04.1 LTS (Xenial Xapus)"

Returns

a string (VERSION variable from /etc/os-release) or NULL if not set.

[nullable]


lightdm_get_os_version_id ()

const gchar *
lightdm_get_os_version_id (void);

Get a word descibing the OS version, suitable for checking which version of the OS this greeter is running on. e.g. "16.04"

Returns

a string (VERSION_ID variable from /etc/os-release) or NULL if not set.

[nullable]


lightdm_get_motd ()

gchar *
lightdm_get_motd (void);

Get a system message that should be presented to the user. e.g. "Welcome to Yoyodyne"

Returns

a string (the contents of /etc/motd) or NULL if not set.

[nullable]

Types and Values