Difference between revisions of "Display manager"

From ArchWiki
Jump to: navigation, search
(Daemon method: dbus is required for all display manager listed above.)
(Loading the display manager)
(2 intermediate revisions by 2 users not shown)
Line 26: Line 26:
  
 
=== Console ===
 
=== Console ===
* {{App|[[CDM]] (Console Display Manager)|ultra-minimalistic, yet full-featured login manager written in bash|https://github.com/ghost1227/cdm|{{AUR|cdm}}}},  {{AUR|cdm-git}}}}
+
* {{App|[[CDM]] (Console Display Manager)|ultra-minimalistic, yet full-featured login manager written in bash|https://github.com/ghost1227/cdm|{{AUR|cdm-git}}}}
  
 
=== Graphical ===
 
=== Graphical ===
Line 42: Line 42:
  
 
; {{ic|inittab}} method : The display manager will load automatically after start-up and will respawn in the event of a crash.
 
; {{ic|inittab}} method : The display manager will load automatically after start-up and will respawn in the event of a crash.
; [[Daemon]] method : The display manager will load automatically during the start-up as a daemon.
 
 
; [[systemd]] method : The display manager will load automatically after start-up and will respawn in the event of a crash.
 
; [[systemd]] method : The display manager will load automatically after start-up and will respawn in the event of a crash.
  
Line 95: Line 94:
  
 
  xt:5:wait:/usr/bin/chvt 7
 
  xt:5:wait:/usr/bin/chvt 7
 
===Daemon method===
 
You simply need to add the daemon name to your daemons array in {{ic|/etc/rc.conf}}
 
 
Near the end of the file you will see a line that looks similar to the following:
 
DAEMONS=(syslogd klogd !pcmcia network netfs crond) # this is the daemons array
 
 
Append the daemon name for the display manager of your choice ({{ic|gdm}}, {{ic|kdm}}, or {{ic|slim}}).[[Dbus]]' daemon should also be added:
 
DAEMONS=(syslogd klogd !pcmcia network netfs crond '''dbus''' '''slim''')
 
 
Ensure you start the display manager '''last''' in the DAEMONS array, otherwise X will later allocate a tty device which was previously claimed by [[Getty]] (see {{ic|/etc/inittab}}). Not placing the display manager at the end can cause X crashes, and is therefore unsupported.
 
 
The next time you reboot, the display manager should run. In the event that it does not, be certain that you typed in the name correctly, and that the manager you selected is installed. It also helps to ensure that {{ic|startx}} is not stopping with errors.
 
 
{{Note|If you use this method and your display manager hangs while loading, or X does not recognize any input device, you will need to boot into single user mode (run-level 1) using the examples above and remove the display manager daemon from {{ic|rc.conf}}.}}
 
  
 
==={{ic|systemd}} method===
 
==={{ic|systemd}} method===

Revision as of 09:05, 19 September 2012

Summary help replacing me
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.
Overview
Template:Graphical user interface overview
Related
Start X at Boot

A 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.

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 /usr/share/xsessions entries): GDM, KDM, LXDM, LightDM

Console

  • CDM (Console Display Manager) — ultra-minimalistic, yet full-featured login manager written in bash
https://github.com/ghost1227/cdm || cdm-gitAUR

Graphical

  • SLiM (Simple Login Manager) — lightweight and elegant graphical login solution
http://slim.berlios.de/ || slim (not actively developed)
  • Qingy — ultralight and very configurable graphical login independent on X Windows (uses DirectFB)
http://qingy.sourceforge.net/ || qingy
  • 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
http://projects.gnome.org/gdm/ || gdm
http://www.kde.org/ || kdebase-workspace
  • LXDMLXDE Display Manager. Can be used independent of the LXDE desktop environment.
http://sourceforge.net/projects/lxdm/ || lxdm
  • wdm — WINGs Display Manager
http://voins.program.ru/wdm/ || wdm
  • LightDM — Ubuntu replacement for GDM using WebKit
http://www.freedesktop.org/wiki/Software/LightDM || lightdmAUR, lightdm-bzrAUR

Loading the display manager

You have three easy methods to make the system load the display manager:

inittab method 
The display manager will load automatically after start-up and will respawn in the event of a crash.
systemd method 
The display manager will load automatically after start-up and will respawn in the event of a crash.

The inittab method will allow you to boot directly into framebuffer mode from GRUB. This is an advantage should the graphics driver crash in X, for example, you would not be forced to fix your system from a live CD or through other needlessly complex means.

With the inittab method all you would have to do is to press 'e' for edit at the GRUB prompt and just add the number of the run-level you prefer, such as run-level 3, to the end of the 'kernel' line to boot directly into framebuffer mode in order to fix your system/X (this described in detail below.)

When using the daemon method you can simply boot into runlevel 1/S which will prevent any daemons, including the login manager, from being started. Then you can fix your system/X and switch into the runlevel 3. Both methods are equally easy.

inittab method

See inittab for additional information.

The run-levels are:

0    Halt
1(S) Single-user
2    Not used
3    Multi-user (default)
4    Not used
5    X11
6    Reboot

Modify default run-level

Edit /etc/inittab and find the line that looks like this:

id:3:initdefault:

Modify the 3 to 5 for X11:

id:5:initdefault:

The next time you reboot, the 'X display manager' should run. For other display managers see below:

Modify default display manager

Edit /etc/inittab and find the line that looks like similar to this one (near the end):

x:5:respawn:/usr/bin/xdm -nodaemon

Modify it so it points to the display manager of your choice:

  • GDM:
x:5:respawn:/usr/sbin/gdm -nodaemon
  • KDM:
x:5:respawn:/usr/bin/kdm -nodaemon
  • SLiM
x:5:respawn:/usr/bin/slim >/dev/null 2>&1
  • LXDM:
x:5:respawn:/usr/sbin/lxdm >& /dev/null
  • LightDM:
x:5:respawn:/usr/sbin/lightdm >& /dev/null

The next time you reboot, the display manager of your choice should run.

Auto switch to tty7

You may find login prompt from agetty appeared before the display manager is started. If you don't like to see this prompt, add this line to inittab:

xt:5:wait:/usr/bin/chvt 7

systemd method

Many display managers come packaged with a systemd service file. Simply run the following command, replacing the daemon name for the display manager of your choice, gdm, kdm, lightdm, or slim.

systemctl enable slim.service

The next time you reboot, the display manager should run.

Troubleshooting

You can switch runlevel if you want to test out the display manager without rebooting. See Switching runlevel for instructions.

D-Bus is required

If system loads the XDM but does not login, check the logs in /var/log/xdm.log If there is a message like:

Dbus error: Unable to open session: Failed to connect to socket 

or GDM displays:

Couldn't connect to system bus: Failed to connect to socket... 

You need to start D-Bus before XDM. You can add it to your DAEMONS array so it starts automatically on boot or start manually by rc.d start dbus. Also, XDM will cycle back and restart itself if you're not starting a window manager session.