Skip to content

Instantly share code, notes, and snippets.

@m8524769
Forked from marfillaster/README.md
Created July 6, 2020 02:21
Show Gist options
  • Save m8524769/8f16b743d1fda669d4993f2ac4b57fe9 to your computer and use it in GitHub Desktop.
Save m8524769/8f16b743d1fda669d4993f2ac4b57fe9 to your computer and use it in GitHub Desktop.
WSL Desktop Launched i3wm

WSL Desktop Launched i3wm

Requirements VcXsrv, i3wm in wsl.

The three files below must be stored in the same directory (%UserProfile%\Desktop).

  • i3.vbs - This is the entrypoint script. It runs i3.bat in the background.
  • i3.bat - Runs VcXsrv using d0.xlaunch profile then starts i3
  • d0.xlaunch - VcXsrv in "One window without titlebar" mode at DISPLAY=:0

Install gnome-terminal for default terminal. unity-settings-daemon and light-themes are also needed for the terminal to run and look nice.

Exit i3 and VcXsrv using i3-nagbar

# cat ~/.config/i3/config
bindsym Mod1+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes' 'taskkill.exe /IM vcxsrv.exe /T'"
<?xml version="1.0" encoding="UTF-8"?>
<XLaunch WindowMode="Nodecoration" ClientMode="NoClient" LocalClient="False" Display="0" LocalProgram="xcalc" RemoteProgram="xterm" RemotePassword="" PrivateKey="" RemoteHost="" RemoteUser="" XDMCPHost="" XDMCPBroadcast="False" XDMCPIndirect="False" Clipboard="True" ClipboardPrimary="True" ExtraParams="" Wgl="True" DisableAC="False" XDMCPTerminate="False"/>
"C:\Program Files\VcXsrv\xlaunch.exe" -run "d0.xlaunch"
wsl DISPLAY=:0 i3
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "i3.bat" & Chr(34), 0
Set WshShell = Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment