出于某种特殊目的,我修改了/etc/x11/xinit/xclients来启动firefox,而不是启动桌面环境。
# Argh! Nothing good is installed. Fall back to twm
{
# gosh, neither fvwm95 nor fvwm2 is available;
# fall back to failsafe settings
[ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45'
# if [ -x /usr/bin/xclock ] ; then
# /usr/bin/xclock -geometry 100x100-5+5 &
# elif [ -x /usr/bin/xclock ] ; then
# /usr/bin/xclock -geometry 100x100-5+5 &
# fi
# if [ -x /usr/bin/xterm ] ; then
# /usr/bin/xterm -geometry 80x50-50+150 &
# fi
if [ -x /usr/bin/firefox ]; then
/usr/bin/firefox -chrome http://127.0.0.1/ -width 1280 -height 768
fi
# if [ -x /usr/bin/twm ] ; then
# exec /usr/bin/twm
# fi
直到今天,我在另一台计算机上测试它,它以前一直工作得很好。firefox报告有另一个正在运行的firefox实例停止响应。因此,火狐不能像我预期的那样自动启动。
我用ssh连接了电脑,发现有2个firefox进程:
[root@my113 xinit]# ps -ef | grep firefox
root 4479 4371 0 17:34 ? 00:00:00 /bin/sh /usr/lib/firefox-3.0b5/run-mozilla.sh /usr/lib/firefox-3.0b5/firefox -chrome http://127.0.0.1/ -width 1280 -height 768
root 4600 4479 0 17:34 ? 00:00:01 /usr/lib/firefox-3.0b5/firefox -chrome http://127.0.0.1/ -width 1280 -height 768
root 4940 4906 0 17:35 ? 00:00:00 /bin/sh /usr/lib/firefox-3.0b5/run-mozilla.sh /usr/lib/firefox-3.0b5/firefox -chrome http://127.0.0.1/ -width 1280 -height 768
root 4963 4940 0 17:35 ? 00:00:00 /usr/lib/firefox-3.0b5/firefox -chrome http://127.0.0.1/ -width 1280 -height 768
root 5717 5345 0 17:51 pts/2 00:00:00 grep firefox
我想,出于某种原因,“xclients”被执行了两次。但我对XWindows的了解非常少,所以如果这里有人能给我一些线索,我会很感激的!