两个 Xsession、两个显示器和 Chromuim
我运行的是 Ubuntu 10.04。我的网络上有一台计算机,它设置为运行两个不同的 xsession,每个 xsession 都运行 Chromium 并在不同的 (1280*1024) 显示器上显示不同的网页。我没有连接到这台计算机的鼠标或键盘。为了访问它,我通过 SSH 登录。
我遇到了两个问题:
在第二台显示器上,我在屏幕右侧看到一条黑色条带。 Chromium 窗口适合显示区域,并且根本没有被切断。另一台显示器以全屏运行。如何使黑条消失并使用整个屏幕?
因为我没有连接到计算机的键盘或鼠标,所以我使用 /etc/init.d/gdm 重新启动 重新启动显示器。这会导致“Chromium 未正确关闭...”消息。我怎样才能抑制这个或使其正确关闭 Chromium?
这是我的 xsession 文件:
#!/bin/bash
# run firefox and point to our dashboard
#exec /usr/bin/firefox -width 1024 -height 1280 -URL "localhost"
MYDISPLAY=$DISPLAY
echo $DISPLAY >> test.txt
date >> test.txt
#export DISPLAY=":0.0"
#/usr/bin/unclutter -idle 5 &
#/usr/bin/chromium-browser --screen 1 --start-maximized --bwsi "http://localhost/status" &
#DISPLAY=:0.1 firefox "http://10.16.14.116:8080/job/Nightly/lastCompletedBuild/testReport/?auto_refresh=true" &
DISPLAY=:0.1 /usr/bin/chromium-browser --start-maximized --bwsi --app --user-data-dir=~/.chromium2 "http://localhost/dash2" &
#export DISPLAY=":0.1"
/usr/bin/unclutter -idle 5 &
#DISPLAY=:0.1 gnome-terminal
/usr/bin/chromium-browser --start-maximized --bwsi --app "http://localhost/status/status-device"
#exec gnome-session
非常感谢任何帮助。 谢谢
更新:我做了 apt-get 更新和升级,然后重新启动。现在两台显示器上都是全屏显示。摆脱“未正确关闭消息”的运气不佳
I'm running Ubuntu 10.04. I have a computer on my network that is set up to run two different xsessions with each running Chromium and displaying different web pages on different (1280*1024) monitors. I do not have a mouse or keyboard connected to this computer. To access it I SSH in.
I've got two problems:
On the second monitor I get a black strip down the right hand side of the screen. The Chromium window fits in the displayed area and is not cut off at all. The other monitor runs with a full screen. How can I make the black strip disappear and use the whole screen?
Because I don't have a keyboard or mouse connected to the computer, i use
/etc/init.d/gdm restart
to restart the displays. This results in the "Chromium didn't shut down correctly..." message. How can I suppress this or make it so Chromium does shut down correctly?
here's my xsession file:
#!/bin/bash
# run firefox and point to our dashboard
#exec /usr/bin/firefox -width 1024 -height 1280 -URL "localhost"
MYDISPLAY=$DISPLAY
echo $DISPLAY >> test.txt
date >> test.txt
#export DISPLAY=":0.0"
#/usr/bin/unclutter -idle 5 &
#/usr/bin/chromium-browser --screen 1 --start-maximized --bwsi "http://localhost/status" &
#DISPLAY=:0.1 firefox "http://10.16.14.116:8080/job/Nightly/lastCompletedBuild/testReport/?auto_refresh=true" &
DISPLAY=:0.1 /usr/bin/chromium-browser --start-maximized --bwsi --app --user-data-dir=~/.chromium2 "http://localhost/dash2" &
#export DISPLAY=":0.1"
/usr/bin/unclutter -idle 5 &
#DISPLAY=:0.1 gnome-terminal
/usr/bin/chromium-browser --start-maximized --bwsi --app "http://localhost/status/status-device"
#exec gnome-session
Any help is greatly appreciated.
Thanks
UPDATE: I did apt-get update and upgrade, and a restart. It is now full screen on both monitors. No luck with getting rid of the "didn't shut down properly message"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
至于“没有正确关闭”:您确实以“硬”方式关闭它:当您重新启动 gdm 时,它的所有子进程都会立即终止(使用
kill -9
) ;你可以做的是运行这个:它将发送一个
kill -TERM
到每个chromium-browser
进程。这是关闭进程的“软”方式 - 它有机会进行清理;对于 Chromium,它会干净地退出,并且在下次启动时不会显示烦人的消息。为了安全起见,您可能需要在 Killall 和 gdm 重新启动之间等待几秒钟:在 Ubuntu 10.04.2 上使用 Chromium 9 进行测试。
As for the "didn't shut down properly": you're indeed shutting it down the "hard" way: when you restart gdm, all its child processes are killed instantly (with
kill -9
); what you could do is run this:which will send a
kill -TERM
to everychromium-browser
process. This is the "soft" way to close a process - it gets a chance to clean up ; in the case of Chromium, it exits cleanly and doesn't show that annoying message on next start. Just to be on the safe side, you may want to wait a few seconds between the killall and gdm restart:Tested with Chromium 9 on Ubuntu 10.04.2 .
是否进行了 apt-get 更新和升级,并重新启动。现在两台显示器上都是全屏显示。摆脱“未正确关闭消息”的运气不佳
Did apt-get update and upgrade, and a restart. It is now full screen on both monitors. No luck with getting rid of the "didn't shut down properly message"