http://wiki.archlinux.org/index.php/Gaming原文如下。
代码: 全选
Starting games in a separate X server
In some cases like those mentioned above, it may be necessary or desired to run a second X server. Running a second X server has multiple advantages such as better performance, the ability to "tab" our of your game by using CTRL-ALT-F7 / CTRL-ALT-F8, no crashing your primary X session (which may have open work) in case a game conflicts with the graphics driver. To start a second X server (using Nexuiz as an example) you can simply do:
xinit /usr/bin/nexuiz-glx -- :1
This can further be spiced up by using a seperate X configuration file:
xinit /usr/bin/nexuiz-glx -- :1 -xf86config xorg-game.conf
A good reason to provide an alternative xorg.conf here may be that your primary configuration makes use of NVIDIA's Twinview which would render your 3D games like Nexuiz in the middle of your multiscreen setup, spanned across all screens. This is undesirable, thus starting a second X with an alternative config where the second screen is disabled is advised.
A game starting script making use of Openbox for your home directory or /usr/local/bin may look like this:
$ cat ~/game.sh
if [ $# -ge 1 ]; then
game="`which $1`"
openbox="`which openbox`"
tmpgame="/tmp/tmpgame.sh"
DISPLAY=:1.0
echo -e "${openbox} &\n${game}" > ${tmpgame}
echo "starting ${game}"
xinit ${tmpgame} -- :1 -xf86config xorg-game.conf || exit 1
else
echo "not a valid argument"
fi
So after a chmod +x you would be able to use this script like:
$ ~/game.sh nexuiz-glx
比如说目前我系统自动启动kdm引导到kde桌面环境中来,这个xserver占用的是ctrl+alt+f7,然后我ctrl+alt+f1切换到终端中去并以另一个用户登录,执行
代码: 全选
xinit startx -- :1
前面系统默认启动的server编号是0,这里的编号是1,当然还可以xinit kdm -- :2指定为2。/var/log/下面可以看到Xorg.1.log和Xorg.0.log。任务管理器中也有几个X进程。
这两个server是同时运行的,注销其中一个是不影响另一个的。前面的原文中可以看到甚至可以指定不同的server用不同的xorg配置文件,也可以如其中所说的建一个快捷脚本,让什么程序启动直接运行在另一个server中。
果然是“你牛叉”~不知windows可否这样干,请高手来谈谈。
另外ctrl+alt+fN的快捷键可以自定义不?