Skip to content

Instantly share code, notes, and snippets.

@marfillaster
Last active February 1, 2023 10:07
Show Gist options
  • Select an option

  • Save marfillaster/85a3da3a19902236655db1232fa9d8df to your computer and use it in GitHub Desktop.

Select an option

Save marfillaster/85a3da3a19902236655db1232fa9d8df to your computer and use it in GitHub Desktop.

Revisions

  1. marfillaster revised this gist Nov 8, 2017. 1 changed file with 9 additions and 16 deletions.
    25 changes: 9 additions & 16 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,25 +1,18 @@
    WSL Desktop Launched i3wm
    -------------------------
    =========================

    A guide on how to launch i3wm from the windows desktop. The three files below must be stored in the same directory (`%UserProfile%\Desktop`).
    **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
    - **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' '~/stop-vcxsrv.sh'"

    # cat ~/stop-vcxsrv.sh
    taskkill.exe /IM vcxsrv.exe /T




    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'"
  2. marfillaster revised this gist Nov 7, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,7 @@ A guide on how to launch i3wm from the windows desktop. The three files below mu
    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' '~/stop-vcxsrv.sh'"

    # cat ~/stop-vcxsrv.sh
  3. marfillaster created this gist Nov 7, 2017.
    24 changes: 24 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    WSL Desktop Launched i3wm
    -------------------------

    A guide on how to launch i3wm from the windows desktop. 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


    Exit i3 and VcXsrv using i3-nagbar
    ==================================

    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' '~/stop-vcxsrv.sh'"

    # cat ~/stop-vcxsrv.sh
    taskkill.exe /IM vcxsrv.exe /T




    2 changes: 2 additions & 0 deletions d0.xlaunch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    <?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"/>
    2 changes: 2 additions & 0 deletions i3.bat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    "C:\Program Files\VcXsrv\xlaunch.exe" -run "d0.xlaunch"
    wsl DISPLAY=:0 i3
    3 changes: 3 additions & 0 deletions i3.vbs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run chr(34) & "i3.bat" & Chr(34), 0
    Set WshShell = Nothing