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

Windows sub-systems for LinuxをGUI環境として使えるようにしてみた

Last updated at Posted at 2019-06-26

はじめに

所属している研究室でネットワークシミュレータns-3を使用することになりました。
ns3を使用する上でネックなのが、Linux環境が推奨とされていました。
Linux環境で動くns-3をなんとかWindowsで動かせないか調べた際、WSL(Windows sub-system for Linux)をGUI環境にできる方法を見つけたので、その方法を書きたいと思います。

使用環境

  • Windows 10

前提

WSLの有効化はすでに様々な記事が出ているので、ここでは割愛します。

WSLのGUI環境の構築手順

1. VcXsrvを入れる

sourceforgeから入手し、インストールします。
https://sourceforge.net/projects/vcxsrv/

2. xfceをUbuntuに入れる

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xfce4-terminal
sudo apt-get install xfce4

3. Ubuntuの環境設定をする

sudo nano ~/.bashrcで.bashrcを開き、

export DISPLAY=:0.0
export LIBG_ALWAYS_INDIRECT=1

を.bashrcに書き込み、Ubuntuを再起動するか、source .bashrcをする.

4. Xlaunchを起動する

VcXsrvをインストールしたら、xlaunchと書かれたアプリを起動する。
'One large window'または'One window without titlebar'のどちらかを選択する。
Display numberは0に設定する。
後は'次に'を押し続けて起動する。

5. xfceを起動する

WSLに戻り、startxfce4でxlaunchの黒い画面にGUI環境が現れる。
これで、Linux環境をWindowsホストで作成できました。

ns3のインストール

GUI環境できたので、ns3をインストールする。インストールの仕方は公式ドキュメントにあるので割愛。

参考資料

WSLでwindows上にLinuxのGUI環境を作る[メモ]
Installation - Nsnam - ns-3

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