Difference between revisions of "Display manager"

From ArchWiki
Jump to: navigation, search
(Undo revision 251259 by Pedro (talk))
(Run ~/.xinitrc as a session: Added what needs to be done to actually use this thing.)
 
(106 intermediate revisions by 43 users not shown)
Line 1: Line 1:
 
[[Category:Display managers]]
 
[[Category:Display managers]]
[[cs:Display Manager]]
+
[[ar:Display manager]]
 +
[[cs:Display manager]]
 
[[de:Login-Manager]]
 
[[de:Login-Manager]]
[[es:Display Manager]]
+
[[es:Display manager]]
 +
[[fa:Display manager]]
 
[[fr:Gestionnaire de connexions]]
 
[[fr:Gestionnaire de connexions]]
[[he:Display Manager]]
+
[[he:Display manager]]
[[it:Display Manager]]
+
[[it:Display manager]]
[[ja:Display Manager]]
+
[[ja:ディスプレイマネージャ]]
[[ru:Display Manager]]
+
[[pt:Display manager]]
[[tr:Görüntü_yöneticisi]]
+
[[ru:Display manager]]
[[uk:Display Manager]]
+
[[tr:Görüntü yöneticisi]]
[[zh-CN:Display Manager]]
+
[[uk:Display manager]]
{{Article summary start}}
+
[[zh-cn:Display manager]]
{{Article summary text|A display manager presents the user with a login screen which prompts for a user name and password. A session starts when the user successfully enters a valid combination of user name and password. This article covers installation, configuration, and troubleshooting of common display managers.}}
+
[[zh-tw:Display manager]]
{{Article summary heading|Overview}}
+
{{Related articles start}}
{{Article summary text|{{Graphical user interface overview}}}}
+
{{Related|Desktop environment}}
{{Article summary heading|Related}}
+
{{Related|Window manager}}
{{Article summary wiki|Start X at Login}}
+
{{Related|Start X at login}}
{{Article summary end}}
+
{{Related articles end}}
  
A [[Wikipedia:X display manager (program type)|display manager]], or login manager, is a graphical interface screen that is displayed at the end of the boot process in place of the default shell. There are various types of display managers, just as there are various types of window and desktop managers. There is usually a certain amount of customization and themeability available with these managers.
+
A [[Wikipedia:X display manager (program type)|display manager]], or login manager, is typically a graphical user interface that is displayed at the end of the boot process in place of the default shell. There are various implementations of display managers, just as there are various types of [[window managers]] and [[desktop environments]]. There is usually a certain amount of customization and themeability available with each one.
  
 
== List of display managers ==
 
== List of display managers ==
 
{{Tip|If you use a [[desktop environment]], you may consider using the display manager that corresponds to it.}}
 
{{Tip|The following display managers provide an automatic list of installed Window Managers (reading {{ic|/usr/share/xsessions}} entries): GDM, KDM, LXDM, LightDM}}
 
  
 
=== Console ===
 
=== Console ===
* {{App|[[CDM]] (Console Display Manager)|ultra-minimalistic, yet full-featured login manager written in bash|https://github.com/ghost1227/cdm|{{AUR|cdm-git}}}}
+
 
 +
* {{App|[[CDM]]|Ultra-minimalistic, yet full-featured login manager written in Bash.|https://github.com/ghost1227/cdm|{{AUR|cdm-git}}}}
 +
* {{App|[[Console TDM]]|Extension for ''xinit'' written in pure Bash.|https://github.com/dopsi/console-tdm|{{AUR|console-tdm}}}}
 +
* {{App|[[nodm]]|Minimalistic display manager for automatic logins.|https://github.com/spanezz/nodm|{{Pkg|nodm}}}}
  
 
=== Graphical ===
 
=== Graphical ===
* {{App|[[SLiM]] (Simple Login Manager)|lightweight and elegant graphical login solution|http://slim.berlios.de/|{{Pkg|slim}}}}
 
* {{App|[[Qingy]]|ultralight and very configurable graphical login independent on X Windows (uses DirectFB)|http://qingy.sourceforge.net/|{{Pkg|qingy}}}}
 
* {{App|[[XDM]]|X Display Manager with support for XDMCP, host chooser.|http://www.x.org/archive/X11R7.5/doc/man/man1/xdm.1.html|{{Pkg|xorg-xdm}}}}
 
* {{App|[[GDM]]|[[GNOME]] Display Manager|http://projects.gnome.org/gdm/|{{Pkg|gdm}}}}
 
* {{App|[[KDM]]|[[KDE]] Display Manager|http://www.kde.org/|{{Pkg|kdebase-workspace}}}}
 
* {{App|[[LXDM]]|[[LXDE]] Display Manager. Can be used independent of the LXDE desktop environment.|http://sourceforge.net/projects/lxdm/|{{Pkg|lxdm}}}}
 
* {{App|[[wdm]]|WINGs Display Manager|http://voins.program.ru/wdm/|{{Pkg|wdm}}}}
 
* {{App|[[LightDM]]|Ubuntu replacement for GDM using WebKit|http://www.freedesktop.org/wiki/Software/LightDM|{{Pkg|lightdm}}, {{AUR|lightdm-bzr}}}}
 
* {{App|[[SDDM]]|QML-based display manager|https://github.com/sddm/sddm|{{AUR|sddm-git}}, {{AUR|sddm-qt5-git}}}}
 
  
==Loading the display manager==
+
* {{App|[[Enlightenment|Entrance]]|An EFL based display manager, highly experimental.|http://enlightenment.org/|{{AUR|entrance-git}}}}
 +
* {{App|[[GDM]]|[[GNOME]] display manager.|https://wiki.gnome.org/Projects/GDM|{{Pkg|gdm}}}}
 +
* {{App|[[KDM]]|[[KDE]]4 display manager (discontinued).|http://www.kde.org/|{{AUR|kdebase-workspace}}}}
 +
* {{App|[[LightDM]]|Cross-desktop display manager, can use various front-ends written in any toolkit.|http://www.freedesktop.org/wiki/Software/LightDM|{{Pkg|lightdm}}}}
 +
* {{App|[[LXDM]]|[[LXDE]] display manager. Can be used independent of the LXDE desktop environment.|http://sourceforge.net/projects/lxdm/|{{Pkg|lxdm}}}}
 +
* {{App|MDM|MDM display manager, used in Linux Mint, a fork of GDM 2.|https://github.com/linuxmint/mdm|{{AUR|mdm-display-manager}}}}
 +
* {{App|[[SDDM]]|QML-based display manager and successor to KDE4's kdm; recommended for Plasma 5 and LXQt.|https://github.com/sddm/sddm|{{Pkg|sddm}}}}
 +
* {{App|[[SLiM]]|Lightweight and elegant graphical login solution. (discontinued)|http://sourceforge.net/projects/slim.berlios/|{{Pkg|slim}}}}
 +
* {{App|[[XDM]]|X display manager with support for XDMCP, host chooser.|http://www.x.org/archive/X11R7.5/doc/man/man1/xdm.1.html|{{Pkg|xorg-xdm}}}}
 +
 
 +
== Loading the display manager ==
 +
 
 +
To enable graphical login, [[enable]] the appropriate systemd service. For example, for [[SDDM]], enable {{ic|sddm.service}}.
 +
 
 +
This should work out of the box. If not, you might have to reset a custom {{ic|default.target}} symlink to point to the default {{ic|graphical.target}}.
 +
 
 +
After enabling [[SDDM]] a symlink {{ic|display-manager.service}} should be set in {{ic|/etc/systemd/system/}}. You may need to use {{ic|--force}} to override old symlinks.
 +
 
 +
{{hc|$ ls -l /etc/systemd/system/display-manager.service|
 +
[...] /etc/systemd/system/display-manager.service -> /usr/lib/systemd/system/sddm.service}}
 +
 
 +
=== Using systemd-logind ===
 +
 
 +
In order to check the status of your user session, you can use ''loginctl''. All [[polkit]] actions like suspending the system or mounting external drives will work out of the box.
 +
 
 +
$ loginctl show-session $XDG_SESSION_ID
 +
 
 +
== Session configuration ==
 +
 
 +
Many display managers read available sessions from {{ic|/usr/share/xsessions/}} directory. It contains standard [http://standards.freedesktop.org/desktop-entry-spec/latest/ desktop entry files] for each DM/WM.
 +
 
 +
To add/remove entries to your display manager's session list; create/remove the ''.desktop'' files in {{ic|/usr/share/xsessions/}} as desired. A typical ''.desktop'' file will look something like:
 +
 
 +
[Desktop Entry]
 +
Encoding=UTF-8
 +
Name=Openbox
 +
Comment=Log in using the Openbox window manager (without a session manager)
 +
Exec=/usr/bin/openbox-session
 +
TryExec=/usr/bin/openbox-session
 +
Icon=openbox.png
 +
Type=XSession
 +
 
 +
===Run ~/.xinitrc as a session===
 +
Installing {{AUR|xinit-xsession}} will provide an option to run your .xinitrc as a session.  Simply set 'xinitrc' as your session in your display manager's settings.
 +
 
 +
=== Starting applications without a window manager ===
 +
 
 +
You can also launch an application without any decoration, desktop, or window management. For example to launch {{AUR|google-chrome}} create a {{ic|web-browser.desktop}} file in {{ic|/usr/share/xsessions/}} like this:
 +
 
 +
[Desktop Entry]
 +
Encoding=UTF-8
 +
Name=Web Browser
 +
Comment=Use a web browser as your session
 +
Exec=/usr/bin/google-chrome --auto-launch-at-startup
 +
TryExec=/usr/bin/google-chrome --auto-launch-at-startup
 +
Icon=google-chrome
 +
 
 +
In this case, once you login, the application set with {{ic|Exec}} will be launched immediately. When you close the application, you will be taken back to the login manager (same as logging out of a normal DE/WM).
 +
 
 +
It is important to remember that most graphical applications are not intended to be launched this way and you might have manual tweaking to do or limitations to live with (there is no window manager, so do not expect to be able to move or resize ''any'' windows, including dialogs; nonetheless, you might be able to set the window geometry in the application's configuration files).
 +
 
 +
See also [[xinitrc#Starting applications without a window manager]].
 +
 
 +
== Tips and tricks ==
 +
 
 +
=== Autostarting ===
 +
 
 +
Most display managers source {{ic|/etc/xprofile}}, {{ic|~/.xprofile}} and {{ic|/etc/X11/xinit/xinitrc.d/}}. For more details, see [[xprofile]].
 +
 
 +
=== Set the language ===
 +
 
 +
{{Accuracy|This seems to change the locale of the user session but not of the DM itself. Probably better to link to [[Locale#Setting the locale]].}}
 +
 
 +
For display managers that use [http://freedesktop.org/wiki/Software/AccountsService/ AccountsService] the display manager [[locale]] can be set by editing {{ic|/var/lib/AccountsService/users/$USER}}:
 +
 
 +
[User]
 +
Language=''your_locale''
 +
 
 +
where ''your_locale'' is a value such as {{ic|en_GB.UTF-8}}.
 +
 
 +
Restart your display manager for the changes to take effect.
  
Many display managers come packaged with a [[systemd]] service file.
+
== Known issues ==
  
Simply run the following command in accordance with the display manager you choose:
+
=== Incompatibility with systemd ===
  
* '''GDM''':
+
''Affected DMs: Entrance, MDM
# systemctl enable gdm.service
+
* '''KDM''':
+
# systemctl enable kdm.service
+
* '''SLiM'''
+
# systemctl enable slim.service
+
* '''LXDM''':
+
# systemctl enable lxdm.service
+
* '''LightDM''':
+
# systemctl enable lightdm.service
+
* '''SDDM''':
+
# systemctl enable sddm.service
+
  
The next time you reboot, the display manager should run. The display manager will load automatically after start-up and will respawn in the event of a crash.
+
Some display managers are not fully compatible with systemd, because they reuse the [[PAM]] session process. It causes various problems on second login, e.g.:
 +
* NetworkManager applet does not work,
 +
* PulseAudio volume cannot be adjusted,
 +
* login failed into GNOME with another user.

Latest revision as of 17:27, 7 December 2016

A display manager, or login manager, is typically a graphical user interface that is displayed at the end of the boot process in place of the default shell. There are various implementations of display managers, just as there are various types of window managers and desktop environments. There is usually a certain amount of customization and themeability available with each one.

List of display managers

Console

  • CDM — Ultra-minimalistic, yet full-featured login manager written in Bash.
https://github.com/ghost1227/cdm || cdm-gitAUR
  • Console TDM — Extension for xinit written in pure Bash.
https://github.com/dopsi/console-tdm || console-tdmAUR
  • nodm — Minimalistic display manager for automatic logins.
https://github.com/spanezz/nodm || nodm

Graphical

  • Entrance — An EFL based display manager, highly experimental.
http://enlightenment.org/ || entrance-gitAUR
https://wiki.gnome.org/Projects/GDM || gdm
  • KDMKDE4 display manager (discontinued).
http://www.kde.org/ || kdebase-workspaceAUR
  • LightDM — Cross-desktop display manager, can use various front-ends written in any toolkit.
http://www.freedesktop.org/wiki/Software/LightDM || lightdm
  • LXDMLXDE display manager. Can be used independent of the LXDE desktop environment.
http://sourceforge.net/projects/lxdm/ || lxdm
  • MDM — MDM display manager, used in Linux Mint, a fork of GDM 2.
https://github.com/linuxmint/mdm || mdm-display-managerAUR
  • SDDM — QML-based display manager and successor to KDE4's kdm; recommended for Plasma 5 and LXQt.
https://github.com/sddm/sddm || sddm
  • SLiM — Lightweight and elegant graphical login solution. (discontinued)
http://sourceforge.net/projects/slim.berlios/ || slim
  • XDM — X display manager with support for XDMCP, host chooser.
http://www.x.org/archive/X11R7.5/doc/man/man1/xdm.1.html || xorg-xdm

Loading the display manager

To enable graphical login, enable the appropriate systemd service. For example, for SDDM, enable sddm.service.

This should work out of the box. If not, you might have to reset a custom default.target symlink to point to the default graphical.target.

After enabling SDDM a symlink display-manager.service should be set in /etc/systemd/system/. You may need to use --force to override old symlinks.

$ ls -l /etc/systemd/system/display-manager.service
[...] /etc/systemd/system/display-manager.service -> /usr/lib/systemd/system/sddm.service

Using systemd-logind

In order to check the status of your user session, you can use loginctl. All polkit actions like suspending the system or mounting external drives will work out of the box.

$ loginctl show-session $XDG_SESSION_ID

Session configuration

Many display managers read available sessions from /usr/share/xsessions/ directory. It contains standard desktop entry files for each DM/WM.

To add/remove entries to your display manager's session list; create/remove the .desktop files in /usr/share/xsessions/ as desired. A typical .desktop file will look something like:

[Desktop Entry]
Encoding=UTF-8
Name=Openbox
Comment=Log in using the Openbox window manager (without a session manager)
Exec=/usr/bin/openbox-session
TryExec=/usr/bin/openbox-session
Icon=openbox.png
Type=XSession

Run ~/.xinitrc as a session

Installing xinit-xsessionAUR will provide an option to run your .xinitrc as a session. Simply set 'xinitrc' as your session in your display manager's settings.

Starting applications without a window manager

You can also launch an application without any decoration, desktop, or window management. For example to launch google-chromeAUR create a web-browser.desktop file in /usr/share/xsessions/ like this:

[Desktop Entry]
Encoding=UTF-8
Name=Web Browser
Comment=Use a web browser as your session
Exec=/usr/bin/google-chrome --auto-launch-at-startup
TryExec=/usr/bin/google-chrome --auto-launch-at-startup
Icon=google-chrome

In this case, once you login, the application set with Exec will be launched immediately. When you close the application, you will be taken back to the login manager (same as logging out of a normal DE/WM).

It is important to remember that most graphical applications are not intended to be launched this way and you might have manual tweaking to do or limitations to live with (there is no window manager, so do not expect to be able to move or resize any windows, including dialogs; nonetheless, you might be able to set the window geometry in the application's configuration files).

See also xinitrc#Starting applications without a window manager.

Tips and tricks

Autostarting

Most display managers source /etc/xprofile, ~/.xprofile and /etc/X11/xinit/xinitrc.d/. For more details, see xprofile.

Set the language

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: This seems to change the locale of the user session but not of the DM itself. Probably better to link to Locale#Setting the locale. (Discuss in Talk:Display manager#)

For display managers that use AccountsService the display manager locale can be set by editing /var/lib/AccountsService/users/$USER:

[User]
Language=your_locale

where your_locale is a value such as en_GB.UTF-8.

Restart your display manager for the changes to take effect.

Known issues

Incompatibility with systemd

Affected DMs: Entrance, MDM

Some display managers are not fully compatible with systemd, because they reuse the PAM session process. It causes various problems on second login, e.g.:

  • NetworkManager applet does not work,
  • PulseAudio volume cannot be adjusted,
  • login failed into GNOME with another user.