From ArchWiki
Revision as of 08:51, 28 September 2012 by Fengchao (talk | contribs) (Use internal link and aur template.)
Jump to navigation Jump to search

zh-CN:GDM Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

From GDM - GNOME Display Manager:

GDM is the GNOME Display Manager, it is the little program that runs in the background, runs your X sessions, presents you with a login box and then tells you to bug off because you forgot your password. It does pretty much everything that you would want to use xdm for, but does not involve as much crack. It does not use any code from xdm. It supports XDMCP, and in fact extends XDMCP a little bit in places where I thought xdm was lacking (but is still compatible with xdm's XDMCP).

Display managers provide X Window System users with a graphical login prompt.


GDM (which is also part of gnome-extra) can be [[Pacman|Installed] with the gdm package, available in the Official repositories.

GDM as the default greeter

Template:Box Note To make the graphical login the default method of logging into the system, edit your /etc/inittab file). These procedures are detailed on the Display Manager page.

The arguments passed to the X server by ~/.xinitrc (such as those of xmodmap and xsetroot) can also be added through xprofile:


# ~/.xprofile
# Executed by gdm at login

xmodmap -e "pointer=1 2 3 6 7 4 5" # set mouse buttons up correctly
xsetroot -solid black              # sets the background to black

systemd method

GDM comes packaged with a systemd service file, gdm.service. Simply run the following command once to bring up GDM after on boot:

systemctl enable gdm.service

You may want to consider adding NetworkManager.service for the complete GNOME experience.

systemctl enable NetworkManager.service


You can no longer use the gdmsetup command to configure GDM as of version 2.28. The command has been removed and GDM has been standardized and integrated with the rest of GNOME.

You can install gdm3setupAUR from the AUR to configure GDM, or use the following instructions.

Configure X server access permission:

# xhost +SI:localuser:gdm

Change the theme:

$ sudo -u gdm dbus-launch gnome-control-center

For more configuration options, do:

$ sudo -u gdm dbus-launch gconf-editor

and modify the following hierarchies:


If these commands fail with an error (e.g. "Cannot open display") you can bring the two windows up when GDM starts by adding them to GDM's autostart. To do this first create the entry:

# cp -t /usr/share/gdm/autostart/LoginWindow/ /usr/share/applications/gnome-appearance-properties.desktop /usr/share/applications/gconf-editor.desktop

Then go back to GDM, do your changes and log back in. When you're done and want the window to stop opening with GDM run this:

# rm /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow/gconf-editor.desktop
Note: By using the logout/configure method you can view the changes while you're making them.

For more information and advanced settings read this.

Automatic login

To enable automatic login with GDM, add the following to /etc/gdm/custom.conf (replace username with your own):

# Enable automatic login for user

or for an automatic login with a delay:

# for login with delay

Passwordless login

If you want to bypass the password prompt in GDM then simply add the following line to /etc/pam.d/gdm:

auth sufficient user ingroup nopasswdlogin

Make sure this line goes right before the auth line.

Then, add the group nopasswdlogin to your system. You can do it graphically in System > Administration > Users and Groups. See Groups for group descriptions and group management commands.

Now, when you use System > Administration > Users and Groups (command: users-admin) and set your user for "Password: not asked at login" (by checking the "Don't ask for password on login" option), your user will be automatically added to the nopasswdlogin group and you will only have to click on your username to login.

Warning: Do not do this for a root account.

GDM legacy

If you want to fall back to the old GDM, which also has a tool for configuring its settings, compile and install gdm-oldAUR from AUR.


GDM fails on logout

If GDM starts up properly on boot, but fails after repeated attempts on logout, try adding this line to the daemon section of /etc/gdm/custom.conf:


gconf-sanity-check-2 exited with status 256

If GDM pops up an error about gconf-sanity-check-2, you may check permissions in /home and /etc/gconf/gconf.xml.system (the latter should be 755). If GDM is still printing the message, try to empty the gdm home. Run as root:

rm -rf /var/lib/gdm/.*

If that doesn't help, try to set /tmp owner and permissions to:

# chown -R root:root /tmp
# chmod 777 /tmp

GDM root login

It is not advised to login as root, but if necessary you can edit /etc/pam.d/gdm-password and add the following line before the line auth required /etc/pam.d/gdm-password

auth            sufficient uid eq 0 quiet

The file should look something like this: /etc/pam.d/gdm-password

auth            sufficient uid eq 0 quiet
auth            sufficient uid >= 1000 quiet
auth            required

You should be able to login as root after restarting GDM.

GDM always uses default US-keyboard

Problem: Keyboard layout always switches to us; layout is reset when a new keyboard is plugged in.

GDM 2.x

Solution: edit ~/.dmrc

Language=de_DE.UTF-8   # change to your default lang
Layout=de   nodeadkeys # change to your keyboard layout

GDM 3.x

Solution: add the following line to /etc/X11/xorg.conf.d/10-evdev.conf, replacing fr with the appropriate keymap

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbLayout" "fr"
Warning: Add the line to the keyboard InputClass section, not the pointer one.

GDM Will Not Load After Attempting to Set-Up Automatic Login

To solve this issue, edit /etc/gdm/custom.conf from a TTY and comment "AutomaticLoginEnable" and the "AutomaticLogin" lines.

# GDM configuration storage