Running xdm automatically
For Linux systems using the System V–style initialization, a runlevel is usually reserved for login under xdm. This line at the bottom of /etc/inittab instructs init to start xdm for runlevel 5:
# Run xdm in runlevel 5 x:5:respawn:/usr/X11R6/bin/xdm -nodaemon
Using this configuration, when the system enters runlevel 5, xdm starts and presents the graphical login as before. See Chapter 4 for more information on runlevels.
It’s also possible to automatically start xdm simply by adding it to the end of an initialization script, such as rc.local. This method offers less control over xdm but may be adequate for some situations and for Linux distributions that don’t offer runlevels.