Running arch with i3 in wsl using vcxsrv
The goal of this post is to show a minimal configuration to run i3 in Arch linux under WSL using vcxsrv.
Installing necessary apps
- Make sure you installed Arch linux on WSL
- Download and install VcXsrv
Creating launch scripts
Step 1:
You are going to need 2 files. The first is called arch.vbs and contains the following:
| |
⚠️ Make sure your replace <username> with your actual user.
Step 2:
Next, inside wsl run the following code:
| |
This will create a .config folder in your home, and add a wsl.sh file to it.
Step 3:
Add the following to the wsl.sh file:
| |
Let’s break down the file:
The first 2 line are important to tell wsl how to connect to the X-server. You don’t have to worry about customizing it.
The line that launches vcxsrv is important:
- The
-acis very important. It disables access control. Without it, nothing will work. - The last options are… optional 😆 Try playing around with the
-fullscreenand-multimonitoroptions depending on your setup
You might also want to try -nodecoration in case you don’t want to run the -fullscreen option.
A full breakdown of options is available on the
VcXsrv page
Launch it
Now, when you double click the arch.vbs file in windows, it should run wsl and start i3 for you.
If it fails, try running wsl.sh from a wsl instance running in a standard windows terminal.