LightDM
LightDM è un cross-desktop display manager whose il cui scopo è quello di essere il display manager standard per il server X.
Le caratteristiche principali (come indicato dagli sviluppatori) includono:
- Un ben definito greeter API consente ambienti grafici GUIs multipli
- Supporto per tutti i display manager utilizzati, con i plugins se necessari
- Bassa complessità del codice
- Performance veloci
Installazione
USE flags
USE flags for x11-misc/lightdm A lightweight display manager
+gnome
Add GNOME support
+gtk
Pull in the gtk+ greeter
+introspection
Add support for GObject based introspection
X
Add support for X11
audit
Enable support for Linux audit subsystem using sys-process/audit
elogind
Enable session tracking via sys-auth/elogind
non-root
Use non-root user by default
systemd
Enable use of systemd-specific libraries and features like socket activation or session tracking
vala
Enable bindings for dev-lang/vala
Emerge
Installare lightdm:
root #emerge --ask x11-misc/lightdmConfigurazione
La configurazione (globale) per LightDM può essere trovata su:
/etc/lightdm/lightdm.conf[Seat:*] ... session-wrapper=/etc/lightdm/Xsession ...
GTK+
The greeter allows to select logging into one of of the installed type of sessions through the icon in the Panel on top of the display. This makes it unnecessary to configure the session startup through user profile configurations. For example, xfce-base/xfce4-session installs /usr/share/xsessions/xfce.desktop which enables the greeter to offer the Xfce session. The default is an Xsession which relies on user profile files.
The GTK greeter configuration can be modified by manually editing the following file:
/etc/lightdm/lightdm-gtk-greeter.conf
RazorQt
Currently Gentoo does not support the Qt greeter since it was moved out into it's own project at https://github.com/surlykke/qt-lightdm-greeter however USE flag support is in the x11-misc/lightdm package if someone wanted to add the greeter support.
Servizio di avvio
OpenRC
With display-manager
root #emerge --ask gui-libs/display-manager-initSet LightDM as the default display manager:
/etc/conf.d/display-managerDISPLAYMANAGER="lightdm"
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 defaultTo start LightDM now:
root #rc-service dbus start
root #rc-service display-manager startWith the deprecated xdm init script
Impostare LightDM come display manager principale:
/etc/conf.d/xdmDISPLAYMANAGER="lightdm"
Per avviare LightDM all'avvio, aggiungere dbus e xdm sul default runlevel (runlevel predefinito):
root #rc-update add dbus defaultroot #rc-update add xdm defaultPer avviare subito LightDM:
root #/etc/init.d/dbus startroot #/etc/init.d/xdm startsystemd
Per avviare LightDM all'avvio:
root #systemctl enable lightdmPer avviare subito LightDM:
root #systemctl start lightdmStrumento da riga di comando
LightDM include uno strumento per la linea di comando, dm-tool, che può essere utilizzato per spostarsi tra le sessioni utente, bloccare la sessione corrente, ecc... Per vedere una lista dei comandi disponibili, utilizzare l'opzione --help:
user $dm-tool --helpPer esempio, per bloccare la sessione corrente:
user $dm-tool lockTips
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:
~/.xprofile# Starting redshift, setting the dpi with xrandr and set the brightness to 50% with xbacklight xrandr--dpi192& redshift-gtk& xbacklight-set50&
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.
/etc/pam.d/lightdmauth substack system-local-login auth optional pam_gnome_keyring.so #keyring account substack system-local-login password substack system-local-login session substack system-local-login session optional pam_gnome_keyring.so 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-lockerStart light-locker after the X server has started by putting light-locker & into either an ~/.xprofile or ~/.xinitrc file.
~/.xprofile# Starting light-lock with X session light-locker&
Create a lock.sh file under /lib64/elogind/system-sleep/ (be sure to add execute permissions to the file):
root #chmod +x /lib64/elogind/system-sleep/lock.shRisoluzione dei problemi
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:
/etc/NetworkManager/NetworkManager.conf[main] ... hostname-mode=none ...
LightDM fails to launch with Nvidia GPU
Users with Nvidia GPUs may encounter failures when using LightDM (GitHub issue #263).
A workaround for this issue involves editing /etc/lightdm/lightdm.conf and adding the line logind-check-graphical=false within the [LightDM] section.
/etc/lightdm/lightdm.conf[LightDM] ... logind-check-graphical=false ...
See also
- SDDM — a modern display manager that supports both the X server and the Wayland protocol.