两个 Xsession、两个显示器和 Chromuim

发布于 2024-10-18 22:25:31 字数 1338 浏览 8 评论 0原文

我运行的是 Ubuntu 10.04。我的网络上有一台计算机,它设置为运行两个不同的 xsession,每个 xsession 都运行 Chromium 并在不同的 (1280*1024) 显示器上显示不同的网页。我没有连接到这台计算机的鼠标或键盘。为了访问它,我通过 SSH 登录。

我遇到了两个问题:

  1. 在第二台显示器上,我在屏幕右侧看到一条黑色条带。 Chromium 窗口适合显示区域,并且根本没有被切断。另一台显示器以全屏运行。如何使黑条消失并使用整个屏幕?

  2. 因为我没有连接到计算机的键盘或鼠标,所以我使用 /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:

  1. 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?

  2. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

长发绾君心 2024-10-25 22:25:31

至于“没有正确关闭”:您确实以“硬”方式关闭它:当您重新启动 gdm 时,它的所有子进程都会立即终止(使用 kill -9) ;你可以做的是运行这个:

killall chromium-browser

它将发送一个 kill -TERM 到每个 chromium-browser 进程。这是关闭进程的“软”方式 - 它有机会进行清理;对于 Chromium,它会干净地退出,并且在下次启动时不会显示烦人的消息。为了安全起见,您可能需要在 Killall 和 gdm 重新启动之间等待几秒钟:

killall chromium-browser
sleep 10
/etc/init.d/gdm restart

在 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:

killall chromium-browser

which will send a kill -TERM to every chromium-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:

killall chromium-browser
sleep 10
/etc/init.d/gdm restart

Tested with Chromium 9 on Ubuntu 10.04.2 .

夜声 2024-10-25 22:25:31

是否进行了 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"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文