クラウドにCentOS 7があり、リモートでのみ実行できます。ssh [email protected]
しかし、リモートでGoogle ChromeまたはChromiumセッションを実行し、リモートナビゲーション用にリモートでGUIを表示するにはどうすればよいですか?
すべての参考文献を試してみましたが、どちらも問題を解決できませんでした。 OSX 10.12xでCentOS 7に接続しています。
ステップ1:
$ which xauth
/usr/bin/xauth
$ cat /etc/ssh/sshd_config | grep X11
X11Forwarding yes
X11DisplayOffset 10
#X11UseLocalhost yes
#X11Forwarding no
$ systemctl restart sshd.service
$ systemctl stop iptables.service
ステップ2:失敗しましたか?
$ echo $DISPLAY
$ ssh -v -X [email protected]
...
debug1: X11 forwarding requested but DISPLAY not set
...
$ export DISPLAY=:0.0 && xclock
xclock Error: Can't open display:
$ chromium-browser https://icanhazip.com
[28207:28207:0323/200459.551890:ERROR:browser_main_loop.cc(272)] Gtk: Locale not supported by C library.
Using the fallback 'C' locale.
[28207:28207:0323/200459.557234:ERROR:browser_main_loop.cc(272)] Gtk: cannot open display:
ベストアンサー1
/etc/ssh/ssh_config
まず、サーバーから次の行のコメントを削除する必要があります。
X11Forwarding yes
2番目のステップは、サーバーに接続して-X
Chromiumを実行することです。
ssh -X user@hostname chromium
クライアントコンピュータで見ることができます。