Add the following line of Python code to you dot files, like .profile
, .bashrc
, .bash_profile
, .zshrc
, etc.
python -c 'import subprocess as sp; p=sp.Popen(["/mnt/c/Program Files/VcXsrv/vcxsrv.exe", ":0", "-ac", "-terminate", "-lesspointer", "-multiwindow", "-clipboard", "-wgl", "-silent-dup-error"])' 2>/dev/null
VcXsrv.exe
is assumed to be installed inC:\Porgam Files
. Change it if it is not the case.- For safety, I am using Python 2 here. Feel free to change it to Python 3.