Frequently Asked Questions for FreeBSD 2.X : The X Window System and Virtual Consoles : How do I start XDM on boot?
Previous: How do I access the virtual consoles from X?
Next: When I run xconsole, I get ``Couldn't open console''.

9.6. How do I start XDM on boot?

There are two schools of thought on how to start xdm. One school starts xdm from /etc/ttys using the supplied example, while the other simply runs xdm from rc.local or from a X.sh script in /usr/local/etc/rc.d. Both are equally valid, and one may work in situations where the other doesn't. In both cases the result is the same: X will popup a graphical login: prompt.

The ttys method has the advantage of documenting which vty X will start on and passing the responsibility of restarting the X server on logout to init. The rc.local method makes it easy to kill xdm if there is a problem starting the X server.

If loaded from rc.local, xdm should be started without any arguments (i.e., as a daemon).

A previous version of the FAQ said to add the vt you want X to use to the /usr/X11R6/lib/X11/xdm/Xservers file. This is not necessary: X will use the first free vt it finds.


Frequently Asked Questions for FreeBSD 2.X : The X Window System and Virtual Consoles : How do I start XDM on boot?
Previous: How do I access the virtual consoles from X?
Next: When I run xconsole, I get ``Couldn't open console''.