0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WindowsとUbuntuでssh接続&x11接続

Posted at

今回やったこと

  • 手元のWindows11 laptopから同じネットワーク上のJetson(Ubuntu20.04)に対して, ssh接続を行った.
  • 手元のコマンドラインからJetson上でソフトを動かして, X11でそれを手元のLaptopで表示した

準備

  • jetsonとlaptopが同じネットワーク上にいることを確認
  • 携帯のネットワークスキャンアプリなどでネットワーク上のデバイスのIPアドレスを確認

今回は手元のWindows laptopとjetsonのIPアドレスがわかればよい

  • windowsのlaptopにVcXsrvをインストール

x11接続にはサーバー側とクライアント側が必要です. 今回はwindows側で入力をして, それをjetson側で処理して, windows側でGUIとして表示するので, windows側にx11サーバー用のアプリVcXsrvをインストールする.

手順

1- VcXsrvでx11サーバーを起動
image.png

  • start no client
  • Disable access controlを含めてすべてにチェック

2- ssh接続でwindows側からjetson ubuntu側のコマンドラインを操作できるようにする.
例: ssh -X hoge@192.168.0.104
-Xというオプションはx11を許可するために必要です. Windowsのコマンドラインに打ってください.

3- sshのconfigに次の記述があるか確認

sudo vim /etc/ssh/sshd_config

(これはjetsonのコマンドラインで開いてください)

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes 

4- DISPLAY変数をjetson上で設定
LaptopのIPアドレス:0.0
の形式で登録

export DISPLAY=192.168.0.103:0.0

5- xeyesまたは, xclockをjetson上で実行
GUIが表示されたら成功です.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?