GDM
Summary |
---|
GDM is the GNOME Display Manager, a graphical login program. This article covers its installation and configuration. |
Related |
Display Manager |
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.
Contents
Installation
To install GDM (which is also part of gnome-extra), type the following at a command prompt:
# pacman -S gdm
To make the graphical login the default method of logging into the system, edit your /etc/inittab file (recommended) enable its systemd service file as shown below:
# systemctl enable gdm
Alternatively you can add gdm to your list of daemons in /etc/rc.conf. These procedures are detailed on the Display Manager page.
If you are used to using the ~/.xinitrc file to pass arguments to the X server when it is started, such as xmodmap or xsetroot, you should note that you can add the same commands to xprofile. Example:
~/.xprofile
#!/bin/sh # # ~/.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
Configuration
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.
Config X server access permission
# xhost +SI:localuser:gdm
To configure the GDM theme use this command:
$ sudo -u gdm dbus-launch gnome-appearance-properties
For more configuration options, use this command:
$ sudo -u gdm dbus-launch gconf-editor
And modify the following hierarchies:
/apps/gdm/simple-greeter /desktop/gnome/interface /desktop/gnome/background
If these commands fail with an error such as "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 (run as root):
# cp -t /usr/share/gdm/autostart/LoginWindow/ /usr/share/applications/gnome-appearance-properties.desktop /usr/share/applications/gconf-editor.desktop
Then logout of your user back to GDM. After the login window appears the two windows should also appear. Configure GDM how you want, then close the windows and log back in. When you're done and want the window to stop opening with GDM run this (as root):
# rm /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow/gconf-editor.desktop
For more information and advanced settings read this.
You may also want to read about GNOME 2.28 Changes.
Note that with version 1.6.1 of xorg-server, Ctrl+Alt+Backspace will NOT restart gdm anymore. For instructions on re-enabling this behavior, see Xorg#Ctrl-Alt-Backspace doesn't work.
Automatic login
To enable automatic login with GDM, add the following to /etc/gdm/custom.conf (replace user with the username that you want auto-logged in):
/etc/gdm/custom.conf
# Enable automatic login for user [daemon] AutomaticLogin=username AutomaticLoginEnable=True
or for an automatic login with a delay:
/etc/gdm/custom.conf
[daemon] # for login with delay TimedLoginEnable=true TimedLogin=username TimedLoginDelay=1
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 pam_succeed_if.so user ingroup nopasswdlogin
Make sure this line goes right before the first line that contains "pam_unix.so" in it.
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 viola, you will now simply and only have to click on your username and you will log right in, password bypassed entirely!
Troubleshooting
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:
GdmXserverTimeout=60
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 pam_deny.so": /etc/pam.d/gdm-password
auth sufficient pam_succeed_if.so uid eq 0 quiet
The file should look something like this: /etc/pam.d/gdm-password
... auth sufficient pam_succeed_if.so uid eq 0 quiet auth sufficient pam_succeed_if.so uid >= 1000 quiet auth required pam_deny.so ...
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
~/.dmrc
[Desktop] 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
/etc/X11/xorg.conf.d/10-evdev.conf
Section "InputClass" Identifier "evdev keyboard catchall" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" Option "XkbLayout" "fr" EndSection