User Tools

Site Tools


other:win10_wsl_1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
other:win10_wsl_1 [2022/05/11 16:23]
jypeter Added the "clean up things" section
other:win10_wsl_1 [2022/08/12 12:25] (current)
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 305: Line 305:
 ==== Installing an X server ==== ==== Installing an X server ====
  
-<WRAP center round tip 60%> +Read the [[other:x_conf|Installing and configuring ​an X server]] ​page
-The //X server// will allow you to display graphical windows (i.e. //X windows//) from remote servers or from your local WSL+Ubuntu +
-</​WRAP>​ +
- +
- +
-<WRAP center round important 60%> +
-After the X server is installed and running, some graphical applications and images (or the text displayed by those applications) may appear blurry. This is due to some servers or some Linux applications not handling high resolution (//HiDPI//) screens correctly +
- +
-X410 has several options for this (see [[https://​token2shell.com/​howto/​x410/​running-x410-on-hidpi-screens/​|Running X410 on HiDPI Screens]]) but it may also work correctly with non commercial applications +
-</​WRAP>​ +
- +
-=== Installing ​VcXrsv === +
- +
-<note tip>​VcXrsv is pre-installed on the LSCE computers!</​note>​ +
- +
-Type: <wrap em>​free</​wrap>​ +
- +
-Download the installer from [[https://​sourceforge.net/​projects/​vcxsrv/​|VcXrsv]] ​and install VcXrsv. +
- +
-== VcXrsv Configuration == +
- +
-You need to configure VcXrsv to work in //multiple windows// mode. The following steps will show you how to create a shortcut on your desktop to start VcXrsv in this appropriate mode +
- +
-  * Start //​Xlaunch//:​ ''​Start''​ => ''​VcXrsv''​ => ''​Xlaunch''​ +
-  * Check ''​Multiple windows''​ (the default choice) then ''​Next''​ +
-  * Check ''​Start no client''​ then ''​Next''​ +
-  * Keep the default ''​Clipboard''​ settigs, uncheck ''​Native opengl''​ (not sure about that) then ''​Next''​ +
-  * Click on ''​Save configuration''​ and save an ''​X_Server.xlaunch''​ configuration file on your Desktop, then ''​Terminate''​. You should now have a new ''​X_Server''​ icon/​shortcut on your Desktop +
-  * Click on the new ''​X_Server''​ icon, and check that an ''​X''​ icon appears in the right side of the taskbar (you may have to look for it in the //Display hidden icons// pull-up menu) +
-    * Note: you can right-click on the ''​X''​ icon and select ''​Exit...''​ if you need to quit the X server +
-  * Note: if you notice later that the content of some displayed //X windows// appear **blurry**, see if you can [[other:​win10misc#​vcxsrv_x_server|fix the compatibility settings]], or try to use **x410**. +
-  * You are now **ready**, if you only need VcXrsv to display graphical windows from remote servers +
- +
-  * The following steps allow you to test the X server in a **local** WSL+Ubuntu terminal. **Do not set the DISPLAY variable yourself when you are connected to a remote server with ''​ssh''​!** +
-    * Open a **local** terminal (in WSL+Ubuntu) +
-    * Type ''​export DISPLAY=localhost:​0.0''​ +
-    * Type ''​xterm''​ and check that a new //xterm// terminal appears +
- +
- +
-=== Installing x410 === +
- +
-Type: <wrap em>​commercial</​wrap>​ +
- +
-[[https://​token2shell.com/​x410/​|x410]] is a low cost commercial X server that can be directly installed from the [[https://​www.microsoft.com/​store/​apps/​9nlp712zmn9q|Microsoft store]]. Once installed, it will be automatically updated by the Microsoft Store application. +
- +
-**Starting, configuring and exiting X410**: you can start X410 by clicking on it in the Windows Start Menu, or choose to [[https://​token2shell.com/​howto/​x410/​automatically-start-x410-on-login/​|Automatically Start X410 on Login]] +
-  * Note: nothing actually happens when you start X410, as it is just waiting to display graphics! You will just get a new **X** icon in the //hidden// icons of the taskbar. +
-  * You can configure (and exit) X410 by right clicking on its **X** icon +
- +
-=== Installing MobaXterm === +
- +
-Type: <wrap em>​commercial</​wrap>​ +
- +
-Available at [[https://​mobaxterm.mobatek.net/​|MobaXterm]],​ not tested. This seems to be more than just an X server, and may be an overkill if you just need an X server+
  
 ==== 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]] +
- +
-  *  FIXME Need to determine if/​when ​''​export LIBGL_ALWAYS_INDIRECT=1'' ​is useful +
-    * it breaks ​''​glxgears''​ with x410+
  
-==== Resources ====+  * <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]])
  
-You can skip this! m(+  * 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]]
  
-  * 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 ====
other/win10_wsl_1.1652286186.txt.gz · Last modified: 2022/05/11 16:23 by jypeter