Windows 10 WSL で Ubuntu 18.04 Gnome 3 デスクトップ環境 [WSL]
こんな感じにWindows 10 で Ubuntu 18.04 LTS の Gnome 3 が起動した。
Windows 10 バージョン1809
-- インストール方法 --
Microsoft Store から Ubuntu 18.04 LTS をダウンロード & インストールする。
WSL はコントロールパネルの「Windows の機能の有効化または無効化」で有効にする。
Windows 10 で動作するX-Window サーバ VcXsrv X Server をインストールする。
VcXsrv X Server https://sourceforge.net/projects/vcxsrv/
コマンドプロンプトで ubuntu1804.exe を実行すると bash が起動する(時間が掛かる)。
アップデートする(これには時間が掛かる)。
sudo –s
apt update && apt upgrade
ubuntu-desktopとgnome-tweak-toolをインストールする(時間が掛かる)。
apt install ubuntu-desktop
apt install gnome-tweak-tool
シェルスクリプト start-ubuntu (ファイル名は任意)を作成する。内容は以下のとおり。
(dbusを再起動,VcXsrvを起動,gnomeを起動,最後はgnomeが終了したあとVcXsrvをキル)
#!/bin/sh
sudo service dbus restart
/mnt/c/Program\ Files/VcXsrv/vcxsrv.exe :0 -ac -nodecoration &
DISPLAY=0:0 XDG_SESSION_TYPE=x11 gnome-session
/mnt/c/Windows/System32/taskkill.exe /IM vcxsrv.exe /T /F
シェルスクリプトを実行可能にする。
chmod u+x start-ubuntu
シェルスクリプトを実行。
./start-ubuntu
ホームディレクトリの. cache のオーナーがroot になっており,パーミッションエラーになったので,オーナーを変更。
sudo chown –R atc5:atc5 .cache
Tweaks を起動して Appearance –>Themes –>Applications を ambiance にしたり Extensions でUbuntu appindicators 及び Ubuntu Dock をONにする(左側にDockが表示される)。
終了はログアウトを実行する。ログアウトするとスクリプトでVcXsrvも終了する。
記事をありがとうございます。
>sudo chown –R atc5:atc5 .cache
この箇所ですが、ユーザー指定が不正とメッセージされてしまいます。
また、立ち上がったUBUNTUのGUI画面ですが、ぼやけた感じの画面になっています。これはなんとかならないでしょうか? 高DPI設定の問題かと思うのですが、解決策は分かりません。
by jazzwalker (2019-07-15 23:35)
>sudo chown –R atc5:atc5 .cache
atc5:atc5 は あなたの <ユーザー名>:<グループ名> に置き換えましょう。
by お名前(必須) (2019-08-29 17:39)
while trying to excute that sh file showing error bad interpreter
by gokul (2020-01-28 03:20)
GUIが開かず、mainが例外をスローした旨を示しているんですが、
どうすればいいんでしょうかね?
一応スクショを。
https://cdn.discordapp.com/attachments/698060504911839252/706747480443715664/unknown.png
https://cdn.discordapp.com/attachments/698060504911839252/706747754487218226/unknown.png
by 渡波 空 (2020-05-04 15:06)