No reason to reinvent the wheel. Begin by following the excellent instructions provided by solarianprogrammer.com
1. Install WSL on Windows 10
2. Install and configure VcXsrv
Now that you have the necessary setup you should save the config file for VcXsrv.
Follow the instructions from step 2 above. Then, after the Extra Settings choose the option to save the configuration:
Save the config file (config.xlaunch) somewhere easy to find.
Now, create a .bat file on your Desktop.
Right-click on Desktop, select New > Text Document.
Save file as somename.bat
Add the following to your new file:
REM Point to saved config file for VcXsrv
REM Use the path for your config file here
C:\config.xlaunch
REM Just giving it a moment to open two windows; 1 for CMD + 1 for VcXsrv
TIMEOUT /t 3
REM change to directory to run bash.exe
cd C:\Windows\system32\
REM taking another moment, mainly so you can watch what's happening in the CMD window
TIMEOUT /t 3
REM now opening an XFCE session in the VcXsrv window
REM the /k option will leave the window open, thus keeping the session active
CMD /k bash -c "DISPLAY=:0 xfce4-session"
REM when done with XFCE you can simply close the DISPLAY window and then close the CMD window
Note: the "REM" lines are simply notes. You can delete or edit.
Save the file and try it out.
1. Install WSL on Windows 10
2. Install and configure VcXsrv
Now that you have the necessary setup you should save the config file for VcXsrv.
Follow the instructions from step 2 above. Then, after the Extra Settings choose the option to save the configuration:
Save the config file (config.xlaunch) somewhere easy to find.
Now, create a .bat file on your Desktop.
Right-click on Desktop, select New > Text Document.
Save file as somename.bat
Add the following to your new file:
REM Point to saved config file for VcXsrv
REM Use the path for your config file here
C:\config.xlaunch
REM Just giving it a moment to open two windows; 1 for CMD + 1 for VcXsrv
TIMEOUT /t 3
REM change to directory to run bash.exe
cd C:\Windows\system32\
REM taking another moment, mainly so you can watch what's happening in the CMD window
TIMEOUT /t 3
REM now opening an XFCE session in the VcXsrv window
REM the /k option will leave the window open, thus keeping the session active
CMD /k bash -c "DISPLAY=:0 xfce4-session"
REM when done with XFCE you can simply close the DISPLAY window and then close the CMD window
Note: the "REM" lines are simply notes. You can delete or edit.
Save the file and try it out.

Comments
Post a Comment