LoginSignup
1
4

More than 3 years have passed since last update.

WSLでGUIを使う

Posted at

VcXsrv のインストール

オプションは変更せずに、インストールを行う。

インストールが完了したら、VcXsrvを立ち上げ、以下の順序で設定を行う。

  1. One large window を選択
  2. 次へ
  3. Start no client を選択
  4. 次へ
  5. 以下全てにチェック
    • Clipboard
      • Primary Selection
    • Native opengl
    • Disable access control
  6. 次へ
  7. 完了

Ubuntu側の設定

必要なパッケージのインストール

gnome環境を用意します。

また、apt-fastを用いてインストールを行っています。
無い場合は、apt-fastapt-getに置き換えて使用してください。

sudo apt-fast update -y && sudo apt-fast full-upgrade -y

sudo apt-fast install x11-apps x11-utils x11-xserver-utils dbus-x11 fonts-ipafont ubuntu-desktop -y

.bash_profile の設定

echo 'export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0' >> ~/.bash_profile
echo 'export LIBGL_ALWAYS_INDIRECT=1' >> ~/.bash_profile
source ~/.bash_profile

dbus, x11-common の起動

sudo service dbus start
sudo service x11-common start

GUIを起動

以下コマンドで起動。

gnome-shell --x11 -r

参考

1
4
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
1
4