Centos X-window remote display 遠端顯示
Centos 5.x 遠端顯示X window
1 2 3 4 5 6 |
cd /etc/ssh vi ssh_config Host * FordwardX11 yes |
將 FordwardX11 yes 加入(原先為: # ForwardX11 no)
1 2 3 4 5 |
vi sshd_config AllowTcpForwarding yes X11Forwarding yes |
修改完後重啟 sshd
1 |
service sshd restart |
之後下 gdmsetup 指令
1 |
gdmsetup |
將 Security 頁的 Deny TCP connection to Xserver 勾勾點掉
然後再下指令 gdm-restart 就可解決 remote display 的問題
1 |
gdm-restart |
Centos 6.x遠端顯示X window
Centos 6.x 因為沒有gdmsetup
所以直接透過ssh下指令 remote display X window
先登入linux工作站,打開terminal,然後輸入
1 |
ssh -X eric@raeva2 |
之後輸入密碼即可
這個指令是指用 eric的帳號登入raeva2工作站,之後在raeva2操作的內容透過X window顯示回來你一開始登入的linux主機
另一個指令也可以
1 |
ssh -X raeva2 xterm |
開啟檔案總管
1 |
nautilus& |
增加新的terminal
1 |
gnome-terminal & |
X-Window 之 Remote Display 應用
A. [遠端執行 , 本機顯示]
1. 開一個終端機使用 “ssh" or “telnet" 連到遠端機器, 然後執行 “export DISPLAY=[你的本地主機IP]:0″ (for bash)
或是 “setenv DISPLAY [你的本地主機IP]:0″ (for tcsh)
2. 然後在本地端的 X-Window 開一個終端機執行 “xhost +[遠端主機IP]"
3. 接著在遠端機器執行 X-Window 應用程式(如 : xclock) 即可把 GUI 畫面顯示過來你的螢幕上面
B. [本機執行 , 遠端顯示]
1. 先在遠端電腦的 X-Window 開一個終端機執行 “xhost +[你的本地主機IP]"
2. 然後在本地主機上開一個終端機執行 “export DISPLAY=[遠端主機IP]:0″ (for bash)
或是 “setenv DISPLAY [遠端主機IP]:0″ (for tcsh)
3. 接著在本地主機執行 X-Window 應用程式(如 : xclock) 即可把 GUI 畫面顯示到遠端主機的螢幕上面
C. [遠端執行 , 遠端顯示]
1. 開一個終端機使用 “ssh" or “telnet" 連到遠端機器, 然後執行 “export DISPLAY=[遠端主機IP]:0″ (for bash)
或是 “setenv DISPLAY [遠端主機IP]:0″ (for tcsh)
2. 然後在遠端電腦的 X-Window 開一個終端機執行 “xhost +[遠端主機IP]"
3. 接著在遠端機器執行 X-Window 應用程式(如 : xclock) 即可把 GUI 畫面顯示在遠端主機的螢幕上面