是什么让“Xclients”成为可能?系统启动时执行两次?
由于某些特殊目的,我修改了/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 实例停止响应。因此,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 真的知之甚少,所以如果这里有人能给我一些线索,我将不胜感激!
For some special purpose, I modified /etc/X11/xinit/Xclients to start firefox instead of start Desktop Environment.
# 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
This used to work fine until today I tested it on another computer. Firefox reports that there's another running instance of firefox which stops responding. Thus, firefox could not autostart as I expected.
I connected the computer with SSH and I found there are 2 firefox processes:
[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
I guess, for some reason, "Xclients" is executed twice. But I really knows very little about XWindows, so if anyone here could give me some clues, I will appreciate!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
另请检查主目录中的 .xsession 和 .xinitrc 文件。也许它们也包含 firefox?
Check also the .xsession and .xinitrc files that are found in your home directory. Maybe they contain firefox there as well?