GNOME/GDM

GDM is the GNOME Display Manager, which provides a graphical login environment.

= Introduction =

Many users want to boot straight into a graphical environment, rather than having to log on through a Linux console and then using the  command to launch the graphical desktop environment (such as GNOME). Graphical display managers provide this service, and GNOME has one called the GNOME Display Manager, or GDM.

There are two main GDM versions available in the portage tree: release 2 and release 3. Those are coupled to the GNOME release and even though GNOME 3 is stable, some users still want to stick to the v2 release.

= GNOME Display Manager v2 =

In order to use GDM v2, it is necessary to mask GDM v3 (which might already be the case if a GNOME 2 deployment was done):

Then, if GDM has not been installed yet, it can simply be emerged.

Configuring GDM
To configure GDM, all that is needed is to tell the system that it should start at boot up.

Below, the common approaches using OpenRC (Gentoo's default init system) and systemd (an alternative init system) are described.

OpenRC
First, configure the XDM (X11 Display Manager) init script to launch GDM. Gentoo uses the XDM init script as a wrapper for the display manager that the user wants.

Add the init script to the default runlevel so that it starts up on boot:

All that is left is to start the service manually now (or reboot the system to have it done automatically):

systemd
To start gdm upon boot, enable the gdm service:

To start gdm immediately, launch it through:

= GNOME Display Manager v3 =

Configuring GDM v3 is only possible through systemd as it does not support other init systems anymore (which is a general feature of GNOME 3).

To start gdm upon boot:

To start gdm immediately:

= Troubleshooting =

GDM and Optimus
For GDM to work with Optimus, add the following two lines to the top of :

Managing users
Unlike the previous major version of GDM, GDM 3 does not rely on the files in /etc/gdm and/or /etc/X11/gdm to manage which users appear on the greeter screen. Everything relies on AccountsService. First of all, AccountsService is forwarding to GDM 3 all the usernames with a user id above 1000. There is not way to force GDM to consider users with a user id less or equal to 1000 unless you customize yourself the ebuild as described here.

If you want to exclude users with user ids greater than 1000 from showing on the greeter screen, you have to drop a file after the name of the user in the /var/lib/AccountsService/users directory and include in this file the stanza SystemAccount=true.

On another hand, if you have a user with a user id greater than 1000 that does not show you should check for a file after his name in the above directory and if there is one, change the stanza SystemAccount from true to false.