From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page LightDM and the translation is 46% complete.
Outdated translations are marked like this.

LightDM est un gestionnaire de connexion multi-bureau conçu pour être le gestionnaire de connexion standard pour le serveur X.

Les fonctionnalités importantes sont :

  • Une API bien construite qui permet d'avoir plusieurs interfaces graphiques.
  • Un support pour tout les usages d'un gestionnaire de connexion, pouvant être complétés par des plugins.
  • Un code source peu complexe.
  • Une grande performance.


Options de la variable USE

USE flags for x11-misc/lightdm A lightweight display manager

audit Enable support for Linux audit subsystem using sys-process/audit
elogind Enable session tracking via sys-auth/elogind
gnome Add GNOME support
gtk Pull in the gtk+ greeter
introspection Add support for GObject based introspection
non-root Use non-root user by default
qt5 Add support for the Qt 5 application and UI framework
systemd Enable use of systemd-specific libraries and features like socket activation or session tracking
vala Enable bindings for dev-lang/vala


Installer lightdm :

root #emerge --ask x11-misc/lightdm


Le fichier de configuration (globale) de LightDM se situe ici :


The GTK greeter configuration can be modified by manually editing the following file:



L'écran de connexion RazorQt ne peut pas actuellement être configuré.

Service de démarrage


With display-manager

Set LightDM as the default display manager:

FILE /etc/conf.d/display-manager

To start LightDM on boot, add dbus and display-manager to the default runlevel. dbus is necessary because LightDM depends on it to pass messages:

root #rc-update add dbus default
root #rc-update add display-manager default

To start LightDM now:

root #rc-service dbus start
root #rc-service display-manager start
With the deprecated xdm init script

Utiliser LightDM comme gestionnaire de connexion par défaut :

FILE /etc/conf.d/xdm

Pour activer LightDM au démarrage du système, ajoutez xdm au niveau d'exécution par défaut :

root #rc-update add dbus default
root #rc-update add xdm default

Pour démarrer LightDM :

root #/etc/init.d/dbus start
root #/etc/init.d/xdm start


Pour démarrer LightDM au démarrage du système :

root #systemctl enable lightdm

Pour démarrer LightDM :

root #systemctl start lightdm

Outil en ligne de commande

LightDM inclue un outil en ligne de commande nommé dm-tool, il peut être utilisé pour changer de session utilisateur, verrouiller la session actuelle, etc. Pour voir toutes les commandes possibles, utilisez l'option --help :

user $dm-tool --help

Par exemple, pour verrouiller la session d'affichage actuelle :

user $dm-tool lock


Running commands at log-in

A user can run some programs automatically when logging in using LightDM by adding commands in ~/.xprofile, which will be sourced by LightDM. For example:

FILE ~/.xprofile
# Starting redshift, setting the dpi with xrandr and set the brightness to 50% with xbacklight
xrandr --dpi 192 &
redshift-gtk &
xbacklight -set 50 &

Unlock GNOME Keyring

To unlock your GNOME Keyring (gnome-base/gnome-keyring) automatically on login, edit /etc/pam.d/lightdm to look as follows. Note: Lines ending with the comment #keyring should be added.

FILE /etc/pam.d/lightdm
auth     substack        system-local-login
auth     optional #keyring
account  substack        system-local-login
password substack        system-local-login
session  substack        system-local-login
session  optional auto_start #keyring

Locking the screen with elogind after suspend or sleep

For security, it is good practice to lock the screen after elogind triggers suspend or sleep. This can be done easily by doing the following:

Install light-locker:

root #emerge --ask x11-misc/light-locker

Start light-locker after the X server has started by putting light-locker & into either an ~/.xprofile or ~/.xinitrc file.

FILE ~/.xprofile
# Starting light-lock with X session
light-locker &

Create a file under /lib64/elogind/system-sleep/ (be sure to add execute permissions to the file):

root #chmod +x /lib64/elogind/system-sleep/


LightDM crashes upon first login if hostname changes during login

In some cases LightDM may crash when trying to log in for the first time if the hostname changes in the time between the boot and login (launchpad bug #1677058).

This may be encountered if net-misc/networkmanager is using the default settings to obtain the hostname from DHCP server and the hostname differs from the default one set on boot.

To disable NetworkManager hostname setting behavior, set the following line in [main] section of /etc/NetworkManager/NetworkManager.conf:

FILE /etc/NetworkManager/NetworkManager.conf

LightDM fails to launch Xorg with a Nvidia GPU

Nvidia GPU users may experience LightDM failures in terms of launching Xorg (GitHub issue #263 ).

A workaround for this bug would be to edit /etc/lightdm/lightdm.conf to include the line logind-check-graphical=false in the [LightDM] section.

FILE /etc/lightdm/lightdm.conf

Voir aussi