Advertisement
RingtailedFox

X11 + PulseAudio on WSL2

Jun 10th, 2020
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. How to get X11 Linux GUI programs to run on Windows Subsystem for Linux 2 with sound:
  2.  
  3. add these lines to the very bottom of ~/.bashrc :
  4.  
  5. # Export X11 to VcxSrv or whatever Windows X Server [REQUIREMENT: RUN VCXSRV
  6. # with the -ac program switch and make sure it's running!]:
  7. export WSL_HOST=$(dig +noall +answer $(hostname -s) | tail -1 | cut -f 6)
  8. export DISPLAY=$WSL_HOST:0.0
  9.  
  10. # Export PulseAudio to Windows [REQUIREMENT: install PulseAudio via Chocolatey
  11. # and install as service with nssm!]:
  12. export PULSE_SERVER=$(dig +noall +answer $(hostname -s) | tail -1 | cut -f 6)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement