0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

サーバー上のGUIアプリを手元のWindowsPCで表示する方法

Posted at

WSL上あるいはサーバー上のGUIアプリを使えるようにする

WSLや研究室の計算サーバ上で動くGUIアプリを、手元のPCで表示できるように設定します。

Windows側のインストール (VcXsrv Windows X Server)

デフォルトのMultiple windowsを選ぶ

xlaunch1

デフォルトのStart no clientを選ぶ

xlaunch2

Extra settings。Disable access controlを有効にするのを忘れずに。

xlaunch3

→ 完了

毎回XLaunchを起動するのが面倒なので、Windowsのスタートアップに登録しておくと便利。こちら

Ubuntu@WSL側の設定

  • x11-appsをインストールする
sudo apt install x11-apps -y
  • 環境変数に反映させる。~/.bashrcをVimで開いて、最終行に以下を追記して保存する
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
  • .bashrcを反映させる
source .bashrc
  • 動作確認。マウスに連動する目玉が出てきたら成功
xeyes
xlaunch4
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?