$ cat /etc/ssh/sshd_config | grep X11 X11Forwarding yes ←x11転送を許可 X11DisplayOffset 10 ←擬似xサーバのディスプレイ番号が :10 から始まる
$ ssh -X -l <user-name> <remote-host>
$ echo $DISPLAY
$ DISPLAY=<DISPLAY_ID> <X-app-to-be-started>→ remote で起動された X アプリケーションの画面が、 local の画面に表示される
field | description | for example |
---|---|---|
"Remote host*" | 接続先ホストを指定 | 192.168.0.3 |
"Specify username" | 接続時のユーザ名 | - |
field | description | for example |
---|---|---|
"Execute command:" | 何らかのプログラムを自動で起動したい場合に設定 | /usr/bin/gnome-terminal |
"Remote environment:" | WindowManager やデスクトップ環境を起動したい場合に設定(プルダウンから選択) | Gnome desktop |
ex.) 192.168.1.5:11 # IPが192.168.1.5, ディスプレイ番号が :11 の場合
$ Xnest :11 -geometry 1280x1024+0+0 $ DISPLAY=:11 jwm & # WindowManager "jwm" を起動する場合