This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
other:win10_wsl_1 [2022/08/08 16:02] jypeter [Installing an X server] Moved and improved the X server stuff to a new page |
other:win10_wsl_1 [2022/08/12 12:25] jypeter other:win10wsl renamed to other:win10_wsl_1 (Moved the original page to WSL_1, before starting a WSL2 version (with the same name as the original page)) |
||
---|---|---|---|
Line 309: | Line 309: | ||
==== Configuration (in your local Linux account) ==== | ==== Configuration (in your local Linux account) ==== | ||
- | * Set the DISPLAY variable in the shell (by hand, or in the bash shell init file) | + | * Set the ''DISPLAY'' variable in the shell by hand, or automatically in the shell configuration file(s): |
- | * ''export DISPLAY=localhost:0.0'' | + | * //bash// shell: ''export DISPLAY=localhost:0.0''\\ Can be defined in the ''~/.bashrc'' file |
- | * <wrap em>Warning!</wrap> ''export DISPLAY=:0.0'' will also work for using graphical windows locally, but will fail when trying to open a window on a remote computer, with a ''connect /tmp/.X11-unix/X0: No such file or directory'' error message ([[https://unix.stackexchange.com/questions/57138/why-does-my-x11-forwarding-attempt-fail-with-connect-tmp-x11-unix-x0-no-such/|source]]) | + | * //tcsh// shell: ''setenv DISPLAY localhost:0.0''\\ Can be defined in the ''~/.login'', or the ''~/.cshrc'' file |
- | * VcXsrv **and WSL2** : check ''export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0'' in [[https://solvercube.com/how-to-install-ubuntu-20-04-on-windows-using-wsl/|How to install Ubuntu 20.04 on Windows using WSL]] | + | * <wrap em>Warning!</wrap> ''export DISPLAY=:0.0'' will also work for using graphics locally, but **will fail when trying to use graphics on a remote computer**, with a ''connect /tmp/.X11-unix/X0: No such file or directory'' error message ([[https://unix.stackexchange.com/questions/57138/why-does-my-x11-forwarding-attempt-fail-with-connect-tmp-x11-unix-x0-no-such/|source]]) |
- | * FIXME Need to determine if/when ''export LIBGL_ALWAYS_INDIRECT=1'' is useful | + | * FIXME **//X server// and WSL2** : check ''export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0'' in [[https://solvercube.com/how-to-install-ubuntu-20-04-on-windows-using-wsl/|How to install Ubuntu 20.04 on Windows using WSL]] |
- | * it breaks ''glxgears'' with x410 | + | |
- | ==== Resources ==== | ||
- | |||
- | You can skip this! m( | ||
- | |||
- | * Check [[https://askubuntu.com/questions/993225/whats-the-easiest-way-to-run-gui-apps-on-wsl-as-of-2018|What's the easiest way to run GUI apps on WSL as of 2018?]] | ||
- | * Check the X410 [[https://token2shell.com/howto/x410/|Tips and Tricks]] that can probably apply to other X servers | ||
- | * Check the rest of [[https://github.com/QMonkey/wsl-tutorial|wsl-tutorial]] | ||
==== Adding useful packages ==== | ==== Adding useful packages ==== |