Difference between revisions of "Display manager"

From ArchWiki
Jump to: navigation, search
(Troubleshooting)
m (Modify default run-level: I prefer sudo)
Line 61: Line 61:
 
Change to Super User Mode:
 
Change to Super User Mode:
 
  $ su
 
  $ su
 +
or
 +
$ sudo -s
  
 
Edit ''/etc/inittab'' using an editor of your choice:
 
Edit ''/etc/inittab'' using an editor of your choice:

Revision as of 22:58, 15 April 2009

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

Install the package

Entrance:

# pacman -Sy entrance-svn

(Note: entrance-svn is in the [community] repository)

GDM:

# pacman -Sy gdm

KDM:

# pacman -Sy kdebase kdebase-workspace

SLiM:

# pacman -Sy slim

XDM:

# pacman -Sy xorg-xdm

Configure loading the Display Manager

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

  1. Inittab Method
    The Display Manager will load automatically after start-up and will respawn in the event of a crash.
  2. Daemon Method
    The Display Manager will load automatically during the start-up as a daemon.
    (Currently only works with Entrance, GDM, KDM and SLiM)

The inittab method is recommended for various reasons, one being that it 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:

3

to the end of the 'kernel' line to boot directly into framebuffer mode in order to fix your system/X (This is also described more thoroughly & descriptive below.)

Both methods are equally easy.

Inittab Method

The run-levels are:

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

Arch's default run-level is 3 and XDM as its Display Manager.

Modify default run-level

Change to Super User Mode:

$ su

or

$ sudo -s

Edit /etc/inittab using an editor of your choice:

# emacs /etc/inittab
# nano /etc/inittab
# vi /etc/inittab

Find the line that looks like this:

id:3:initdefault:

Modify the '3' to '5' for X11:

id:5:initdefault:

Save the file and exit the editor. The next time you reboot, the 'X Display Manager' should run. For other display managers see below:

Modify default Display Manager

Change to Super User Mode:

$ su

Edit /etc/inittab using an editor of your choice:

# emacs /etc/inittab
# nano /etc/inittab
# vi /etc/inittab

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:

Entrance:

x:5:respawn:/usr/sbin/entranced -nodaemon &> /dev/null

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

Save the file and exit the editor. The next time you reboot, the Display Manager of your choice should run.

Daemon Method

You simply need to add the daemon name to your daemons array in '/etc/rc.conf'.

Change to Super User Mode:

$ su

Edit /etc/rc.conf in your editor of choice:

# emacs /etc/rc.conf
# nano /etc/rc.conf
# vi /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 (entrance, gdm, kdm or slim):

Entrance:

DAEMONS=(syslogd klogd !pcmcia network netfs crond entranced)

GDM:

DAEMONS=(syslogd klogd !pcmcia network netfs crond gdm)

KDM:

DAEMONS=(syslogd klogd !pcmcia network netfs crond kdm)

SLiM:

DAEMONS=(syslogd klogd !pcmcia network netfs crond slim)

Save the file and exit the editor.

The next time you reboot, the Display Manager should run. In the event that it doesn't, make sure that you typed in the name correctly, also make sure that the manager you selected is installed. It also helps to make sure that startx is not stopping with errors.

Switching run-levels

If you want to test out the display manager without rebooting, or you want to change the X configuration and that pesky Display Manager keeps respawning.

Use this command:

/sbin/telinit <run-level>

To switch to run-level 3 (Multi-User):

/sbin/telinit 3

To switch to run-level 5 (X11):

/sbin/telinit 5

By switching you can avoid restarting the system during your testing.

Template:Box Note

GRUB

You can add a menu item in GRUB to allow you to boot with or without X11,

Change to Super User Mode:

$ su

Edit /boot/grub/menu.lst using an editor of your choice:

# emacs /boot/grub/menu.lst
# nano /boot/grub/menu.lst
# vi /boot/grub/menu.lst

Find the first kernel entry you have, the default is '# (0) Arch Linux'

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz26 root=/dev/sda3 ro
initrd /kernel26.img

You can duplicate it and modify both like so:

# (0) Arch Linux Multi-user
title  Arch Linux Multi-user
root   (hd0,0)
kernel /vmlinuz26 root=/dev/sda3 ro 3
initrd /kernel26.img
# (0) Arch Linux X11
title  Arch Linux X11
root   (hd0,0)
kernel /vmlinuz26 root=/dev/sda3 ro 5
initrd /kernel26.img

The run-level was appended to the end so the kernel knows what run-level to start with.

LILO

You can start-up with the run-level of your choice by just selecting or typing in the kernel name and then appending the desired run-level in the lilo boot screen.

Like so:

 : Arch 5

Troubleshooting

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

See Also