User Tools

Site Tools


windows_subsystem_for_linux:wsl2:デスクトップ環境の設定

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
windows_subsystem_for_linux:wsl2:デスクトップ環境の設定 [2020/12/01 21:02]
koudai [概要]
windows_subsystem_for_linux:wsl2:デスクトップ環境の設定 [2021/06/27 22:04] (current)
Line 24: Line 24:
 </code> </code>
   - (GUIでパッケージのアップデートやインストールを行いたい場合)PolicyKitの設定をします<code>   - (GUIでパッケージのアップデートやインストールを行いたい場合)PolicyKitの設定をします<code>
-sudo sh -c 'cat <<EOL > /etc/polkit-1/localauthority/50-local.d/99-all.pkla+sudo su 
 +# vi /etc/polkit-1/localauthority/50-local.d/99-all.pkla 
 +</code><file - 99-all.pkla>
 [Allow all] [Allow all]
 Identity=unix-user:* Identity=unix-user:*
Line 31: Line 33:
 ResultInactive=yes ResultInactive=yes
 ResultActive=yes ResultActive=yes
-EOL' +</file>
-</code>+
   - いったん終了して、再起動します<code>   - いったん終了して、再起動します<code>
 $ exit $ exit
Line 91: Line 92:
 XDG_CURRENT_DESKTOP=ubuntu:GNOME XDG_SESSION_TYPE=x11 gnome-session XDG_CURRENT_DESKTOP=ubuntu:GNOME XDG_SESSION_TYPE=x11 gnome-session
 </file> </file>
 +
 +  * (2021年2月追記)上のスクリプトでは起動できなくなったので、次のように書き換えてください<file bash start.sh>
 +#!/bin/bash
 +
 +sudo sh -c 'dbus-uuidgen > /var/lib/dbus/machine-id'
 +sudo service dbus restart
 +export DISPLAY="$(cat /etc/resolv.conf|grep nameserver|awk '{print $2}'):0"
 +/mnt/c/Program\ Files/VcXsrv/vcxsrv.exe :0 -ac -keyhook &
 +XDG_CURRENT_DESKTOP=ubuntu:GNOME XDG_SESSION_TYPE=x11 gnome-session
 +/mnt/c/Windows/System32/taskkill.exe /IM vcxsrv.exe /T /F
 +</file>
 +
 シェルスクリプトができたら実行権限を付与します。 シェルスクリプトができたら実行権限を付与します。
 <code> <code>
windows_subsystem_for_linux/wsl2/デスクトップ環境の設定.1606824161.txt.gz · Last modified: 2021/06/27 22:01 (external edit)