Skip to content

Instantly share code, notes, and snippets.

@mohemohe
Created June 16, 2020 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohemohe/e4d73f019c87f5c2dd083f7df4c9a7d8 to your computer and use it in GitHub Desktop.
Save mohemohe/e4d73f019c87f5c2dd083f7df4c9a7d8 to your computer and use it in GitHub Desktop.
WSL2でxfceを使う
#!/bin/bash
cd "${HOME}"
if [ ! -z "$(pidof xfce4-session)" ]; then
exit 1
fi
export DISPLAY="$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0";
export LANG=ja_JP.UTF-8
export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export QT_IM_MODULE=fcitx
fcitx-autostart
xfce4-session
kill -9 "${DBUS_SESSION_BUS_PID}"
pkill gpg-agent
pkill ssh-agent
pkill mozc-server
@echo off
if not "%~0"=="%~dp0.\%~nx0" (
start /min cmd /c,"%~dp0.\%~nx0" %*
exit
)
start /B x410.exe /wm
wsl -e /bin/bash -c "/opt/bin/startx"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment