/wsl_linux

Windows subsistem linux with xfce guide

Primary LanguageBatchfile

wsl_linux

Windows subsystem for linux with xfce and audio support guide

Intro

In this guide i will show how i set up a full functional linux workstation on the Windows subsystem for linux like the one down bellow: Screenshot To do so some minimum skills ins necessary, like write .bat files on windows and do some commands in the linux command line.The scrips and .bat files used can be founded in this repository.

Initial configuration:

The initial configuration of the WSL can be founded in this doc of microsoft: https://docs.microsoft.com/en-us/windows/wsl/install-win10 The linux distro that i will be covering in this guide is ubuntu. In the final of this initial step covered in the Microsoft doc the user will be able to do bash commands, in the next steps will be covered how to set up video and audio in the ubuntu on the WSL.

Video and audio configuration:

sudo add-apt-repository ppa:aseering/wsl-pulseaudio
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xfce4 xfce4-terminal
sudo apt-get install libpulse0 -y
echo "export DISPLAY=:0.0" >> ~/.bashrc
echo export PULSE_SERVER=tcp:localhost >> ~/.bashrc
  • After that, with the VcXsrv and the pulseaudio installed, create a blank file with the name ubuntu_desktop.bat, or download the file here on the repository, to create the same file click with the right button of the mouse and go in EDIT, and put this:
CD "C:\Program Files\VcXsrv"
START vcxsrv.exe :0 -fullscreen -clipboard -wgl
bash.exe -c "export DISPLAY=:0 && export PULSE_SERVER=tcp:localhost && xfce4-session"
PAUSE
  • the first line : CD "C:\Program Files\VcXsrv" assumes that you installed in the Program Files, if the installed folder was another one change this line.
  • Save the file, create a shortcut to this file and click with the right button of the mouse on the shortcut go in advanced and check the run as administrator, this is extra important if you want to use a web browser such as firefox or chromium, because it avoid some lack of permission bugs.
  • After that launch the shortcut to the .bat file and watch the magic happens.