HOWTO Activate Graphical login

From Gentoo Linux Wiki

Jump to: navigation, search
This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

[edit] Introduction

This section will explain how to activate graphical login and starting the window manager(WM) of your choice.

The graphical login is handled by a program called a display manager (DM). There are a number of different DMs out there, the most popular being GDM, KDM, XDM and Entrance. All DMs do more or less the same thing: Starts an X session and presents the user with a login prompt.

  • GDM - Gnome Display Manager. Uses gnome libs
  • KDM - KDE Display Manager, which of course uses KDE libs
  • XDM - The original DM, included with XFree/Xorg. Pretty ugly compared to the other ones
  • Entrance - Display manager from enlightenment. Looks very good, but might not be as stable as the others.
  • Qingy - Requires DirectFB and can start console and X session, very themable
  • SLiM - Light and simple, yet very configurable.
  • WDM - WING's Display Manager. Lightweight, based on WindowMaker.

[edit] Setup

Note: This HOWTO assume a recent version of baselayout. As of recently (baselayout-1.12.6 at least), DISPLAYMANAGER has been moved from /etc/rc.conf to /etc/conf.d/xdm (if this is the case you will note that DISPLAYMANAGER isn't in /etc/rc.conf at all, so you can't uncomment it). If you set DISPLAYMANAGER in rc.conf it will override the setting in the new location. Unless you are using an older baselayout you are advised to use the new system!


To use a DM, you first have to install it. All the above DMs are included in portage, so a simple emerge of one of them will work. for example:

 emerge gdm

If you want xdm, it's installed with Xorg/XFree.

After installing it, you have to tell gentoo to start it automatically at boot. This is done in two steps. First, edit /etc/conf.d/xdm. and uncomment the line with DISPLAYMANAGER="xdm", and change it to the DM you have chosen. Second, add the service xdm to the default runlevel so it actually starts:

rc-update add xdm default

Note that the name of the service is always xdm even if you use a different DM: This script checks what DISPLAYMANAGER in /etc/conf.d/xdm is set to, and starts the correct DM.

You can configure a default WM to start by setting XSESSION in /etc/rc.conf to the name of a script in the directory /etc/X11/Sessions/. For example, to set Xfce4 as your default WM, create a simple script to start up xfce and place in there:

File: /etc/X11/Sessions/xfce
#!/bin/sh
/usr/bin/startxfce4

Don't forget to make the script executable: chmod 755 /etc/X11/Sessions/xfce.

Now, set XSESSION="xfce" in /etc/conf.d/xdm. Once you login, your selected WM should appear.

Read the comments in /etc/conf.d/xdm for further explanation.

Now you can do one of 3 steps to actually start the graphical login:

  1. Reboot (a bit silly)
  2. Start the service manually
/etc/init.d/xdm start
  1. Let the rc system start it for you
rc-update add xdm default

This article is still a Stub. You can help Gentoo-Wiki by expanding it.

Personal tools