6.1. 配置 xdm 和 kdm

如果一切正常运行,现在是时候设置在所有显示器上自动启动 X 了。 对于 xdm 和 kdm,您必须修改一个文件。 对于类似 Red Hat 的系统,这将是/etc/X11/xdm/Xservers;对于其他发行版,请检查此文件是否存在。 如果不存在,请找到您的 XFree86 配置目录,您将在其中找到xdm/Xservers.

Note注意
 

  • SuSE 使用

    • /etc/X11/XF86Config

    • /etc/X11/xdm/Xservers用于 xdm

    • /etc/opt/kde3/share/config/kdm/Xservers用于 kdm

    您可以制作一个备份副本/etc/opt/.../kdm/Xservers并从以下位置创建一个符号链接/etc/X11/xdm/Xservers/etc/opt/../kdm/Xservers,以便为 xdm 和 kdm 使用相同的配置文件。

  • Debian 使用

    • /etc/kde3/kdm/Xservers用于 kdm

    您可以制作一个备份副本/etc/kde3/kdm/Xservers并从以下位置创建一个符号链接/etc/X11/xdm/Xservers/etc/kde3/kdm/Xservers,以便为 xdm 和 kdm 使用相同的配置文件。

  • Red Hat 和 Gentoo 使用

    • /etc/X11/XF86Config

对于每个额外的 X 服务器,您应该添加一行。 您可以复制现有行,更改 X 服务器二进制文件和显示编号,并附加-xf86config[您的配置文件]。 我的原始 xdm/Xservers

#####################################################################

# $XConsortium: Xserv.ws.cpp,v 1.3 93/09/28 14:30:30 gildea Exp $
#
#
# $XFree86: xc/programs/xdm/config/Xserv.ws.cpp,v 1.1.1.1.12.2 1998/10/04 15:23:14 hohndel Exp $
#
# Xservers file, workstation prototype
#
# This file should contain an entry to start the server on the
# local display; if you have more than one display (not screen),
# you can add entries to the list (one per line).  If you also
# have some X terminals connected which do not support XDMCP,
# you can add them here as well.  Each X terminal line should
# look like:
#	XTerminalName:0 foreign
#
:0 local /bin/nice -n -10 /usr/X11R6/bin/X :0 -deferglyphs 16 vt7

######################################################################
      

和修改后的版本

######################################################################

# $XConsortium: Xserv.ws.cpp,v 1.3 93/09/28 14:30:30 gildea Exp $
#
#
# $XFree86: xc/programs/xdm/config/Xserv.ws.cpp,v 1.1.1.1.12.2 1998/10/04 15:23:14 hohndel Exp $
#
# Xservers file, workstation prototype
#
# This file should contain an entry to start the server on the
# local display; if you have more than one display (not screen),
# you can add entries to the list (one per line).  If you also
# have some X terminals connected which do not support XDMCP,
# you can add them here as well.  Each X terminal line should
# look like:
#	XTerminalName:0 foreign
#

:0 local /bin/nice -n -10 /usr/X11R6/bin/X0 :0 -deferglyphs 16 vt7
:1 local /bin/nice -n -10 /usr/X11R6/bin/X1 :1 -xf86config /etc/X11/XF86Config-4.TNT2 vt17

#######################################################################
      

如果您有更多显卡,只需添加更多行

:2 local /bin/nice -n -10 /usr/X11R6/bin/X2 :2 -xf86config /etc/X11/XF86Config-4.[your 3rd card] vt18
:3 local .....
      

如果您使用单个 XFree 配置文件

######################################################################

# $XConsortium: Xserv.ws.cpp,v 1.3 93/09/28 14:30:30 gildea Exp $
#
#
# $XFree86: xc/programs/xdm/config/Xserv.ws.cpp,v 1.1.1.1.12.2 1998/10/04 15:23:14 hohndel Exp $
#
# Xservers file, workstation prototype
#
# This file should contain an entry to start the server on the
# local display; if you have more than one display (not screen),
# you can add entries to the list (one per line).  If you also
# have some X terminals connected which do not support XDMCP,
# you can add them here as well.  Each X terminal line should
# look like:
#	XTerminalName:0 foreign
#

:0 local /bin/nice -n -10 /usr/X11R6/bin/X0 :0 -layout first-Xserver -deferglyphs 16 vt7
:1 local /bin/nice -n -10 /usr/X11R6/bin/X1 :1 -layout second-Xserver vt17

#######################################################################

Note注意
 

在旧版本的 Backstreet Ruby(2003 年 10 月 7 日之前发布)下,每个控制台由 8 个 tty 表示,因此您应该使用

.....
:0 local /bin/nice -n -10 /usr/X11R6/bin/X0 :0 -deferglyphs 16 vt7
:1 local /bin/nice -n -10 /usr/X11R6/bin/X1 :1 -xf86config /etc/X11/XF86Config-4.TNT2 vt9
.....

或者如果您有更多显卡,只需添加更多行

:2 local /bin/nice -n -10 /usr/X11R6/bin/X2 :2 -xf86config /etc/X11/XF86Config-4.[your 3rd card] vt16
:3 local .....
      

如果您使用单个 XFree 配置文件

................
:0 local /bin/nice -n -10 /usr/X11R6/bin/X0 :0 -layout first-Xserver -deferglyphs 16 vt7
:1 local /bin/nice -n -10 /usr/X11R6/bin/X1 :1 -layout second-Xserver vt9
................