-
-
Save JucaRei/11018b3326b01a489fc87c6647584405 to your computer and use it in GitHub Desktop.
Revisions
-
tdcosta100 revised this gist
Aug 10, 2024 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -176,13 +176,13 @@ By default, the display manager call multiple `Xorg` instances, one for each use 1. First, let's backup the original `Xorg` script. ``` sudo mv /usr/bin/Xorg /usr/bin/Xorg.original ``` 1. Then, we create a new `Xorg` script. ``` sudo nano /usr/bin/Xorg.Xvnc ``` 1. Paste the code below in the editor: @@ -228,8 +228,8 @@ By default, the display manager call multiple `Xorg` instances, one for each use 1. Finally, we set the correct permissions for the file and create a link to it: ``` sudo chmod 0755 /usr/bin/Xorg.Xvnc sudo ln -sf Xorg.Xvnc /usr/bin/Xorg ``` > [!WARNING] -
tdcosta100 revised this gist
Jul 30, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -136,7 +136,7 @@ echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale > [!WARNING] > Please read the editor instructions about the correct place to position the text cursor before pasting. If you paste the code in the wrong place, it will be discarded. 7. Restart WSL using `wsl.exe --shutdown`, then reopen your distro terminal. ### Creating VNC Server passwords -
tdcosta100 revised this gist
Jul 29, 2024 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -133,6 +133,8 @@ echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale [Service] ExecStartPost=-/usr/bin/rm -f /run/user/%i/wayland-0 /run/user/%i/wayland-0.lock ``` > [!WARNING] > Please read the editor instructions about the correct place to position the text cursor before pasting. If you paste the code in the wrong place, it will be discarded. 1. Restart WSL using `wsl.exe --shutdown`, then reopen your distro terminal. -
tdcosta100 revised this gist
Jul 28, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # WSL2 with GUI using Xvnc > [!NOTE] > If you want to use pure WSLg, you can try the new [WSLg (XWayland) tutorial](../e28636c216515ca88d1f2e7a2e188912) or the [WSLg (Wayland) tutorial](../7def60bccc8ae32cf9cacb41064b1c0f). In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer ([RealVNC](https://www.realvnc.com/en/connect/download/viewer/), [TightVNC](https://www.tightvnc.com/download.php), [TigerVNC](https://github.com/TigerVNC/tigervnc/releases/latest), [UVNC](https://www.uvnc.com/downloads/ultravnc.html), etc, all of them might work flawlessly). -
tdcosta100 revised this gist
Jul 9, 2024 . 1 changed file with 6 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ You also need to make sure `/etc/wsl.conf` have the following lines: systemd=true ``` If not, create/edit this file, add these lines and restart WSL (for example, using `wsl.exe --shutdown`, then reopening the distro terminal). Now we are ready to go. @@ -134,7 +134,7 @@ echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale ExecStartPost=-/usr/bin/rm -f /run/user/%i/wayland-0 /run/user/%i/wayland-0.lock ``` 1. Restart WSL using `wsl.exe --shutdown`, then reopen your distro terminal. ### Creating VNC Server passwords @@ -235,10 +235,10 @@ By default, the display manager call multiple `Xorg` instances, one for each use ## Running your distro with GUI enabled Now you have everything ready to start. First we shut down WSL: ``` wsl.exe --shutdown ``` Then reopen your distro terminal. @@ -269,7 +269,7 @@ One important thing is: once you start your WSL instance, you cannot just stop i - Power off option on GUI menu - `sudo poweroff` After doing that, you can safely shut down your WSL instance, either by `wsl.exe --terminate` or `wsl.exe --shutdown`. Not doing the shutdown process may cause damage to your WSL instance. So be careful. ## Tips and tricks @@ -298,12 +298,7 @@ After doing that, you can safely shut down your WSL instance, either by `wsl --t 1. If you can connect to 59XX ports, but receive an error like `Authentication failure: No password configured for VNC Auth`, the file `$HOME/.vnc/passwd` is missing for that particular user (on port 5901, the user is `gdm`). Try to repeat the steps described in section [Creating VNC Server passwords](#creating-vnc-server-passwords) and try to connect again. 1. If it still doesn't work, you can try to restart WSL with `wsl.exe --shutdown` (don't forget to save everything that is unsaved before, because WSL will shut down completely), then open your distro shell again and repeat the steps of section [Accessing the VNC screen](#accessing-the-vnc-screen). ## Sample screenshots -
tdcosta100 revised this gist
Jul 4, 2024 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,9 +43,14 @@ Now we are ready to go. <tr><th>Distro</th><th>Desktop Environment</th><th>Metapackage</th></tr> </thead> <tbody> <tr><td rowspan="9">Ubuntu</td><td>Budgie</td><td><code>ubuntu-budgie-desktop</code></td></tr> <tr><td>GNOME</td><td><code>ubuntu-desktop</code></td></tr> <tr><td>KDE</td><td><code>kubuntu-desktop</code></td></tr> <tr><td>Kylin</td><td><code>ubuntukylin-desktop</code></td></tr> <tr><td>LXDE</td><td><code>lubuntu-desktop</code></td></tr> <tr><td>MATE</td><td><code>ubuntu-mate-desktop</code></td></tr> <tr><td>Studio</td><td><code>ubuntustudio-desktop</code></td></tr> <tr><td>Unity</td><td><code>ubuntu-unity-desktop</code></td></tr> <tr><td>Xfce</td><td><code>xubuntu-desktop</code></td></tr> <tr><td rowspan="8">Ubuntu/Debian</td><td>Cinnamon</td><td><code>task-cinnamon-desktop</code></td></tr> <tr><td>GNOME</td><td><code>task-gnome-desktop</code></td></tr> -
tdcosta100 revised this gist
Jul 3, 2024 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,8 @@ # WSL2 with GUI using Xvnc > [!NOTE] > If you want to use pure WSLg, you can try the new [WSLg tutorial](../7def60bccc8ae32cf9cacb41064b1c0f). In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer ([RealVNC](https://www.realvnc.com/en/connect/download/viewer/), [TightVNC](https://www.tightvnc.com/download.php), [TigerVNC](https://github.com/TigerVNC/tigervnc/releases/latest), [UVNC](https://www.uvnc.com/downloads/ultravnc.html), etc, all of them might work flawlessly). The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc) and `tigervnc-standalone-server`. -
tdcosta100 revised this gist
Jul 3, 2024 . 1 changed file with 29 additions and 29 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ You also need to make sure `/etc/wsl.conf` have the following lines: systemd=true ``` If not, create/edit this file, add these lines and restart WSL (for example, using `wsl --shutdown` in a `Windows PowerShell` or a `Command Prompt` terminal, then reopening the distro terminal). Now we are ready to go. @@ -84,7 +84,7 @@ echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale ### Create and modify services 1. Now we have everything installed, we need to fix the directory `/tmp/.X11-unix/`, because it's mounted as read-only by default. We will create a new systemd unit: ``` sudo systemctl edit --full --force wslg-fix.service @@ -126,7 +126,7 @@ echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale ExecStartPost=-/usr/bin/rm -f /run/user/%i/wayland-0 /run/user/%i/wayland-0.lock ``` 1. Restart WSL using `wsl --shutdown` in a `Windows PowerShell` or a `Command Prompt` terminal, then reopen your distro terminal. ### Creating VNC Server passwords @@ -139,7 +139,7 @@ echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale sudo chown gdm:gdm /var/lib/gdm3/ ``` 1. In this setup, each user has a different VNC password. So you have to configure at least three passwords, one for the current user, other for root, and other for GDM, who will present the login screen. If you don't configure the password, you won't able to access the login screen, or the user's desktop. First, let's configure the VNC password current user: ``` vncpasswd @@ -151,29 +151,31 @@ echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale sudo -H vncpasswd ``` 1. Finally, let's configure the VNC password for GDM (skip this step if you are not using GDM): ``` sudo -H -u gdm vncpasswd ``` You can repeat the process for other existing users. ### Replacing default Xorg by Xvnc By default, the display manager call multiple `Xorg` instances, one for each user session, including the login screen, provided by GDM. So we will replace `Xorg` script by a new version which calls `Xvnc` instead the classic `Xorg`. This is the real magic we are trying to do. 1. First, let's backup the original `Xorg` script. ``` sudo mv /usr/bin/Xorg /usr/bin/Xorg_old ``` 1. Then, we create a new `Xorg` script. ``` sudo nano /usr/bin/Xorg_new ``` 1. Paste the code below in the editor: ``` #!/bin/bash @@ -211,9 +213,10 @@ By default, the display manager call multiple X instances, one for each user ses exec "${command[@]}" ``` Please note the resolution of the virtual screen. You can change that to fit your needs (1366x768, 1920x1080, etc). Also, you can change the `-rfbauth` option to point to a fixed location instead the home of current user, so you don't need to have a password for each user. 1. Finally, we set the correct permissions for the file and create a link to it: ``` sudo chmod 0755 /usr/bin/Xorg_new sudo ln -sf Xorg_new /usr/bin/Xorg @@ -224,25 +227,26 @@ By default, the display manager call multiple X instances, one for each user ses ## Running your distro with GUI enabled Now you have everything ready to start. Open a `Windows Powershell` or a `Command Prompt` terminal and shut down WSL: ``` wsl --shutdown ``` Then reopen your distro terminal. Doing this is like booting Linux again, and GDM will start automatically, and will create a `Xorg` instance to display the login interface. We changed this process to make it create `Xvnc` instances, so we can access them. The first instance will listen to port 5901, the second instance will listen to port 5902, and so on. ## Accessing the VNC screen After a while (usually a few seconds, but it can take more if you don't have a SSD), you can test if it's working properly. Use your favorite VNC Viewer to connect to your localhost port 5901 (`localhost:5901`). Use the VNC password set for user `gdm` (or `Debian-gdm`, if in Debian). The login screen must appear. After logging in, the screen will be blank and eventually will be closed automatically. This is because a new instance of `Xvnc` was created for user desktop, listening to port 5902. Connect to this port now. The logged user's desktop must appear. When you log out, the screen at port 5901 will show the login interface again. This applies to GDM (which is the case if you installed Ubuntu Desktop). You can change this behavior changing the configuration file like this: 1. `sudo nano /etc/gdm3/custom.conf` 1. Uncomment and edit the following lines: ``` AutomaticLoginEnable=true AutomaticLogin=[your username without the brackets] @@ -252,7 +256,7 @@ If you are using LightDM, the desktop screen will appear in port 5901, so there' ## Shutting down One important thing is: once you start your WSL instance, you cannot just stop it. You must perform a standard Linux shutdown. You can do one of the alternatives below: - Power off option on GUI menu - `sudo poweroff` @@ -263,14 +267,10 @@ After doing that, you can safely shut down your WSL instance, either by `wsl --t - VNC is a very adaptive protocol, and by default tries to use the most aggressive compression available, for better networking performance. But in our case, doing this only adds unnecessary CPU extra load, since you are connecting to localhost ("infinite" bandwith, near zero ping). To remove all compression algorithms and reduce lagging, force your VNC Viewer to connect using RAW encoding. The performance gain is noticeable, specially when playing videos (not a spectacular performance in this particular scenario, though). ## Troubleshooting 1. If it doesn't work at first, try to check your `journalctl` logs: ``` journalctl -b -t /usr/lib/gdm3/gdm-x-session -t /usr/bin/Xorg --no-pager ``` @@ -280,15 +280,15 @@ After doing that, you can safely shut down your WSL instance, either by `wsl --t journalctl -b -t /usr/libexec/gdm-x-session -t /usr/bin/Xorg --no-pager ``` In the output, you must see what command line was generated for `Xvnc`, and which error messages appear. Of course, even if it works correctly, you can check the logs just to see what is happening, or for debugging. 1. You must check if the custom `Xorg` script was not replaced by the default version of it. If it was the case, just repeat the steps of [Replacing default X by Xvnc](#replacing-default-xorg-by-xvnc) section. 1. Check if `Xorg` is your default display server, not `Xephyr` or `Wayland`. If it's not, you must change it to have `Xorg` as your default display server. 1. If you are using LightDM, you also need to check logs at `/var/log/lightdm` (you will need to use sudo to cat files in that directory). The `Xvnc` output will be in the file `/var/log/lightdm/x-0.log`. 1. If you can connect to 59XX ports, but receive an error like `Authentication failure: No password configured for VNC Auth`, the file `$HOME/.vnc/passwd` is missing for that particular user (on port 5901, the user is `gdm`). Try to repeat the steps described in section [Creating VNC Server passwords](#creating-vnc-server-passwords) and try to connect again. 1. If it still doesn't work, you can try to restart WSL. Open a Windows PowerShell command prompt, and execute the following command (don't forget to save everything that is unsaved before, because WSL will shut down completely): ``` -
tdcosta100 revised this gist
Jul 3, 2024 . 1 changed file with 124 additions and 55 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,15 @@ # WSL2 with GUI using Xvnc In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer ([RealVNC](https://www.realvnc.com/en/connect/download/viewer/), [TightVNC](https://www.tightvnc.com/download.php), [TigerVNC](https://github.com/TigerVNC/tigervnc/releases/latest), [UVNC](https://www.uvnc.com/downloads/ultravnc.html), etc, all of them might work flawlessly). The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc) and `tigervnc-standalone-server`. For this setup, I will use Ubuntu (20.04, 22.04 and 24.04 are working), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample screenshots](#sample-screenshots) section for examples. So let's go. First, we need a working [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install) installation. > [!WARNING] > WSLg may not work as expected, since Wayland sockets are disabled for everyone, and not every app can handle this. Before going to real business, let's make sure we are updated. @@ -17,66 +18,150 @@ sudo apt update sudo apt upgrade ``` You also need to make sure `/etc/wsl.conf` have the following lines: ``` [boot] systemd=true ``` If not, create/edit this file, add these lines and restart WSL (for example, using `wsl --shutdown` in a `Windows PowerShell` or a `Command Prompt` terminal, then reopening the distro terminal again). Now we are ready to go. ## Installing components ### Installing GUI 1. First you select your favorite desktop environment metapackage. Here is a list of the most common metapackages: <table> <thead> <tr><th>Distro</th><th>Desktop Environment</th><th>Metapackage</th></tr> </thead> <tbody> <tr><td rowspan="4">Ubuntu</td><td>GNOME</td><td><code>ubuntu-desktop</code></td></tr> <tr><td>KDE</td><td><code>kubuntu-desktop</code></td></tr> <tr><td>LXDE</td><td><code>lubuntu-desktop</code></td></tr> <tr><td>Xfce</td><td><code>xubuntu-desktop</code></td></tr> <tr><td rowspan="8">Ubuntu/Debian</td><td>Cinnamon</td><td><code>task-cinnamon-desktop</code></td></tr> <tr><td>GNOME</td><td><code>task-gnome-desktop</code></td></tr> <tr><td>GNOME Flashback</td><td><code>task-gnome-flashback-desktop</code></td></tr> <tr><td>KDE Plasma</td><td><code>task-kde-desktop</code></td></tr> <tr><td>LXDE</td><td><code>task-lxde-desktop</code></td></tr> <tr><td>LXQt</td><td><code>task-lxqt-desktop</code></td></tr> <tr><td>MATE</td><td><code>task-mate-desktop</code></td></tr> <tr><td>Xfce</td><td><code>task-xfce-desktop</code></td></tr> </tbody> </table> 1. Once you have chosen the metapackage, let's install it. For example, if you choose `ubuntu-desktop`, the command will be: ``` sudo apt install \ `[ ! -z "$(apt-cache search ^acpi-support$)" ] && echo "acpi-support-"` \ tigervnc-standalone-server \ ubuntu-desktop ``` This will install the `ubuntu-desktop` and `tigervnc-standalone-server`, but excluding the `acpi-support` dependency, if included. If `acpi-support` is installed, it will render your distro almost unusable (see microsoft/WSL#10059), so we will tell apt to not install it. The installation will take a while, so be patient. 1. If in Ubuntu, you may want to install `snap-store`. If you don't need it, you can skip this step: ``` sudo snap install snap-store ``` ## Configuring the environment If you are using Debian, you need to configure the locale (this is not needed in Ubuntu): ``` echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale ``` ### Create and modify services 1. Now we have everything installed, we need to fix the directory /tmp/.X11-unix/, because it's mounted as read-only by default. We will create a new systemd unit: ``` sudo systemctl edit --full --force wslg-fix.service ``` 1. Paste the code below in the editor: ``` [Service] Type=oneshot ExecStart=-/usr/bin/umount /tmp/.X11-unix ExecStart=/usr/bin/rm -rf /tmp/.X11-unix ExecStart=/usr/bin/mkdir /tmp/.X11-unix ExecStart=/usr/bin/chmod 1777 /tmp/.X11-unix ExecStart=/usr/bin/ln -s /mnt/wslg/.X11-unix/X0 /tmp/.X11-unix/X0 [Install] WantedBy=multi-user.target ``` 1. Exit the editor saving the changes to the file. 1. Let's enable `wslg-fix.service`: ``` sudo systemctl enable wslg-fix.service ``` 1. We also need to remove all references to Wayland, because if not, some apps (`gnome-terminal`, for example) will open outside the desktop shell. We will edit the `[email protected]` service: ``` sudo systemctl edit [email protected] ``` 1. Paste the code below in the editor: ``` [Service] ExecStartPost=-/usr/bin/rm -f /run/user/%i/wayland-0 /run/user/%i/wayland-0.lock ``` 1. Restart WSL using `wsl --shutdown` in a `Windows PowerShell` or a `Command Prompt` terminal, then open your distro terminal again. ### Creating VNC Server passwords > [!IMPORTANT] > In Debian, the GDM user is `Debian-gdm`, so you need to replace `gdm` by `Debian-gdm` in the commands below. 1. In some distros, the directory `/var/lib/gdm3/` has an incorrect owner, so let's fix it before setting the VNC Server passwords: ``` sudo chown gdm:gdm /var/lib/gdm3/ ``` 1. In this setup, each user has a different VNC password. So you have to configure at least three passwords, one for the current user, other for root, and other for gdm, who whill present the login screen. If you don't configure the password, you won't able to access the login screen, or the user's desktop. First, let's configure the VNC password current user: ``` vncpasswd ``` 1. Now, let's configure the VNC password for root (needed if you use LightDM instead GDM): ``` sudo -H vncpasswd ``` 1. Finally, let's configure the VNC password for GDM (you need to skip this step if you didn't install GNOME): ``` sudo -H -u gdm vncpasswd ``` You can repeat the process for other existing users. ### Replacing default X by Xvnc By default, the display manager call multiple X instances, one for each user session, including the login screen, provided by GDM. So we will replace `Xorg` script by a new version which calls `Xvnc` instead the classic `Xorg`. This is the real magic we are trying to do. 1. First, let's backup the original Xorg script. ``` @@ -112,45 +197,32 @@ By default, the display manager call multiple X instances, one for each user ses esac done # Find an available display number for displayNumber in $(seq 1 100) do [ ! -e /tmp/.X11-unix/X$displayNumber ] && break done # Here you can change or add options to fit your needs command=("/usr/bin/Xvnc" ":${displayNumber}" "-geometry" "1024x768" "-rfbport" "$((5900 + $displayNumber))" "-rfbauth" "${HOME:-/root}/.vnc/passwd" "$@") systemd-cat -t /usr/bin/Xorg echo "Starting Xvnc:" "${command[@]}" exec "${command[@]}" ``` Please note the resolution of the virtual screen. You can change that to fit your needs (1366x768, 1920x1080, etc). Also, you can change the ```-rfbauth``` option to point to a fixed location instead the home of current user, so you don't need to have a password for each user. 4. Finally, we set the correct permissions for the file and create a link to it: ``` sudo chmod 0755 /usr/bin/Xorg_new sudo ln -sf Xorg_new /usr/bin/Xorg ``` > [!WARNING] > Sometimes, system updates replace `Xorg` link with the original version. Just repeat this step if this happens, and `Xvnc` will work again as `Xorg` replacement. ## Running your distro with GUI enabled Now you have everything ready to start. Open a `Command Prompt` or a `Windows Powershell` window and shut down WSL: @@ -160,16 +232,13 @@ wsl --shutdown Then reopen your distro window. Doing this is like booting Linux again, and GDM will start automatically, and will create a X instance to display the login interface. We changed this process to make it create Xvnc instances, so we can access them. The first instance will listen to port 5901, the second instance will listen to port 5902, and so on. ## Accessing the VNC screen After a while (usually a few seconds, but it can take more if you don't have a SSD, maybe take more time), you can test if it's working properly. Use your favorite VNC Viewer to connect to your localhost port 5901. Use the VNC password set for user `gdm` (or `Debian-gdm`, if in Debian). The login screen must appear. After logging in, the screen will be blank and eventually will be closed automatically. This is because a new instance of `Xvnc` was created for user desktop, listening to port 5902. Connect to this screen now. The logged user's desktop must appear. When you log out, the screen at port 5901 will show the login interface again. This applies to GDM (which is the case if you installed Ubuntu Desktop). You can change this behavior changing the configuration file like this: 1. `sudo nano /etc/gdm3/custom.conf` @@ -179,7 +248,7 @@ After logging in, the screen will be blank. This is because a new instance of Xv AutomaticLogin=[your username without the brackets] ``` If you are using LightDM, the desktop screen will appear in port 5901, so there's no need to connect to port 5902. ## Shutting down @@ -213,20 +282,20 @@ After doing that, you can safely shut down your WSL instance, either by `wsl --t In the output, you must see what command line was generated for Xvnc, and which error messages appear. Of course, even if it works correctly, you can check the logs just to see what is happening, or for debugging. 1. You must check if the custom Xorg script was not replaced by the default version of it. If it was the case, just repeat the steps of [Replacing default X by Xvnc](#replacing-default-x-by-xvnc) section. 1. Check if Xorg is your default display server, not Xephyr or Wayland. If it's not, you must change it to have Xorg as your default display server. 1. If you are using LightDM, you also need to check logs at /var/log/lightdm (you will need to use sudo to cat files in that directory). The Xvnc output will be in the file /var/log/lightdm/x-0.log. 1. If you can connect to 59XX ports, but receive an error like ```Authentication failure: No password configured for VNC Auth```, the file $HOME/.vnc/passwd is missing for that particular user (on port 5901, the user is gdm). Try to repeat the steps described in section [Creating VNC Server passwords](#creating-vnc-server-passwords) and try to connect again. 1. If it still doesn't work, you can try to restart WSL. Open a Windows PowerShell command prompt, and execute the following command (don't forget to save everything that is unsaved before, because WSL will shut down completely): ``` PS > wsl --shutdown ``` After that, open your distro shell again and repeat the steps of section [Accessing the VNC screen](#accessing-the-vnc-screen). ## Sample screenshots -
tdcosta100 revised this gist
Mar 9, 2023 . 1 changed file with 33 additions and 52 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,11 +2,13 @@ In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer ([RealVNC](https://www.realvnc.com/pt/connect/download/viewer/), [TightVNC](https://www.tightvnc.com/download.php), [TigerVNC](https://bintray.com/tigervnc/stable/tigervnc/1.10.1), [UVNC](https://www.uvnc.com/downloads/ultravnc.html), etc, all of them might work flawlessly). The key component we need to install is `tigervnc-standalone-server`. For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa, unfortunately 22.04 does not work), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample screenshots](https://gist.github.com/tdcosta100/385636cbae39fc8cd0937139e87b1c74#sample-screenshots) section for examples. So let's go. First, we need a working [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install) installation. Then you must [disable WSLg](https://github.com/microsoft/wslg#wslg-system-distro), because unfortunately it messes with the graphical internal workings of Linux. You can make them coexist, but it's painful. Do it at your own if you want to. Don't forget to reboot your computer after disabling WSLg, just shutting WSL down is not enough to bring WSLg down. Before going to real business, let's make sure we are updated. @@ -47,45 +49,6 @@ Pretty easy, one command and you are done: sudo apt install tigervnc-standalone-server ``` The installation process is finally done. ## Configuring the environment @@ -150,7 +113,7 @@ By default, the display manager call multiple X instances, one for each user ses done # Here you can change or add options to fit your needs command=("/usr/bin/Xvnc" "-geometry" "1024x768" "-PasswordFile" "${HOME:-/root}/.vnc/passwd" "$@") systemd-cat -t /usr/bin/Xorg echo "Starting Xvnc:" "${command[@]}" @@ -167,21 +130,40 @@ By default, the display manager call multiple X instances, one for each user ses **Attention:** sometimes, system updates replace Xorg link with the original version. Just repeat this step if this happens, and Xvnc will work again as Xorg replacement. ## Enabling `systemd` in your distro WSL normally boots a minimal version of the system, without systemd. In order to enable using all the good things we are used to Linux, we must [enable `systemd`](https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/#set-the-systemd-flag-set-in-your-wsl-distro-settings): 1. Create the file `/etc/wsl.conf`: ``` sudo nano /etc/wsl.conf ``` 1. Paste the following content in the editor: ``` [boot] systemd=true ``` **Important:** If you are using Debian, you need one extra step: ``` echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale ``` ## Running your distro with `systemd` Now you have everything ready to start. Open a `Command Prompt` or a `Windows Powershell` window and shut down WSL: ``` wsl --shutdown ``` Then reopen your distro window. Doing this is like booting Linux again, this time with `systemd`. Because of `systemd`, gdm will start automatically, and will create a X instance to display the login interface. We changed this process to make it create Xvnc instances, so we can access them. The first instance will listen to port 5900, the second instance will listen to port 5901, and so on. **Attention:** `systemd` keeps running only if you have at least one distro shell Window (in Windows, not inside VNC) open. If you close all shell windows (outside VNC), your gui will shut down. If you want to prevent this from occurring, you can consider [`bottle-imp`](https://github.com/arkane-systems/bottle-imp), but you have to compile it for Ubuntu 20.04. ## Accessing the VNC screen @@ -204,8 +186,7 @@ If you are using LightDM, the desktop screen will appear in port 5900, so there' One important thing is: once you start systemd services, you cannot just stop your Linux instance. You must perform a standard Linux shutdown. You can do one of one alternatives below: - Power off option on GUI menu - `sudo poweroff` After doing that, you can safely shut down your WSL instance, either by `wsl --terminate` or `wsl --shutdown`. Not doing the shutdown process may cause damage to your WSL instance. So be careful. -
tdcosta100 revised this gist
Oct 25, 2021 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -232,6 +232,10 @@ After doing that, you can safely shut down your WSL instance, either by `wsl --t In the output, you must see what command line was generated for Xvnc, and which error messages appear. Of course, even if it works correctly, you can check the logs just to see what is happening, or for debugging. 1. You must check if the custom Xorg script was not replaced by the default version of it. If it was the case, just repeat the steps of [Replacing default X by Xvnc](https://gist.github.com/tdcosta100/385636cbae39fc8cd0937139e87b1c74#replacing-default-x-by-xvnc) section. 1. Check if Xorg is your default display server, not Xephyr or Wayland. If it's not, you must change it to have Xorg as your default display server. 1. If you are using LightDM, you also need to check logs at /var/log/lightdm (you will need to use sudo to cat files in that directory). The Xvnc output will be in the file /var/log/lightdm/x-0.log. 1. If you can connect to 59XX ports, but receive an error like ```Authentication failure: No password configured for VNC Auth```, the file $HOME/.vnc/passwd is missing for that particular user (on port 5900, the user is gdm). Try to repeat the steps described in section [Creating VNC Server passwords](https://gist.github.com/tdcosta100/385636cbae39fc8cd0937139e87b1c74#creating-vnc-server-passwords) and try to connect again. -
tdcosta100 revised this gist
Sep 19, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -71,7 +71,7 @@ sudo apt install dotnet-runtime-5.0 ### Installing systemd-genie Now we will install systemd-genie, which is responsible for turning the minimalist WSL into a more complete Linux instance, with systemd and other related stuff. This is necessary to run GDM (GNOME Display Manager) and LightDM properly, giving the user a full graphic interface experience, with login and everything. Here are the [install instructions](https://github.com/arkane-systems/genie#installation). As of April 6th, 2021, these following commands are needed to install it (and I only guarantee they will work Ubuntu and Debian. For other distros, you must check how to get the appropriate package for your system): ``` sudo apt install apt-transport-https -
tdcosta100 revised this gist
Sep 19, 2021 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -283,4 +283,5 @@ Thanks to this guys, whose feedback made this tutorial reach the current level o - [siegLoesch](https://github.com/siegLoesch) - [adamgranthendry](https://github.com/adamgranthendry) - [cerebrate](https://github.com/cerebrate) - Creator of `systemd-genie` - [hdhnl](https://gist.github.com/hdhnl) - [MrRendroc](https://github.com/MrRendroc) -
tdcosta100 revised this gist
Sep 19, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -181,7 +181,7 @@ echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale Doing this is like booting Linux again, this time with systemd. Because of systemd, gdm will start automatically, and will create a X instance to display the login interface. We changed this process to make it create Xvnc instances, so we can access them. The first instance will listen to port 5900, the second instance will listen to port 5901, and so on. **Attention:** When running `genie` for the first time, it will take a lot of time, and probably will show an error message. After that, you must check what `systemd` units have failed. You can check that with a `systemctl list-units --failed`, then you must check [this page](https://github.com/arkane-systems/genie/wiki/Systemd-units-known-to-be-problematic-under-WSL) to see what to do with each failed unit. Most of them can be simply disabled/masked with no harm or side effects, and after doing that, `genie` will start much faster and without any error messages. ## Accessing the VNC screen -
tdcosta100 revised this gist
Sep 17, 2021 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -282,4 +282,5 @@ Thanks to this guys, whose feedback made this tutorial reach the current level o - [Greasy-Monkey](https://gist.github.com/Greasy-Monkey) - [siegLoesch](https://github.com/siegLoesch) - [adamgranthendry](https://github.com/adamgranthendry) - [cerebrate](https://github.com/cerebrate) - Creator of `systemd-genie` - [hdhnl](https://gist.github.com/hdhnl) -
tdcosta100 revised this gist
Sep 17, 2021 . 1 changed file with 17 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -54,6 +54,17 @@ systemd-genie requires dotnet-runtime, but it ins't installed automatically. Fol ``` wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb sudo apt update sudo apt install dotnet-runtime-5.0 ``` If you are using Debian, the commands are almost the same: ``` wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb sudo apt update sudo apt install dotnet-runtime-5.0 ``` @@ -163,9 +174,14 @@ Finally, it's time to put everything together. genie -s ``` If you are using Debian, you need one extra step: ``` echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale ``` Doing this is like booting Linux again, this time with systemd. Because of systemd, gdm will start automatically, and will create a X instance to display the login interface. We changed this process to make it create Xvnc instances, so we can access them. The first instance will listen to port 5900, the second instance will listen to port 5901, and so on. **Attention:** if you want to avoid initialization errors that show up upon genie start, or make it start faster, you must check [this page](https://github.com/arkane-systems/genie/wiki/Systemd-units-known-to-be-problematic-under-WSL). Debian users MUST check this page, otherwise, your setup probably will fail. ## Accessing the VNC screen -
tdcosta100 revised this gist
Sep 16, 2021 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -208,6 +208,11 @@ After doing that, you can safely shut down your WSL instance, either by `wsl --t ``` journalctl -b -t /usr/lib/gdm3/gdm-x-session -t /usr/bin/Xorg --no-pager ``` If you are using Debian, then the command is: ``` journalctl -b -t /usr/libexec/gdm-x-session -t /usr/bin/Xorg --no-pager ``` In the output, you must see what command line was generated for Xvnc, and which error messages appear. Of course, even if it works correctly, you can check the logs just to see what is happening, or for debugging. -
tdcosta100 revised this gist
Sep 14, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,7 +37,7 @@ Now we are ready to go. sudo tasksel ``` 1. At the package list, select your favorite GUI package. Use spacebar to select the package, and Tab to confirm your choice. I selected Ubuntu Desktop. The installation will take a while, so be patient. ### Installing VNC Server -
tdcosta100 revised this gist
Sep 12, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -206,7 +206,7 @@ After doing that, you can safely shut down your WSL instance, either by `wsl --t 1. If it doesn't work at first, try to check your journalctl logs: ``` journalctl -b -t /usr/lib/gdm3/gdm-x-session -t /usr/bin/Xorg --no-pager ``` In the output, you must see what command line was generated for Xvnc, and which error messages appear. Of course, even if it works correctly, you can check the logs just to see what is happening, or for debugging. -
tdcosta100 revised this gist
Apr 23, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -91,7 +91,7 @@ The installation process is finally done. sudo -H vncpasswd ``` 1. Finally, let's configure the VNC password for GDM (you need to skip this step if you didn't install GNOME): ``` sudo -H -u gdm vncpasswd ``` -
tdcosta100 revised this gist
Apr 19, 2021 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -183,6 +183,16 @@ After logging in, the screen will be blank. This is because a new instance of Xv If you are using LightDM, the desktop screen will appear in port 5900, so there's no need to connect to port 5901. ## Shutting down One important thing is: once you start systemd services, you cannot just stop your Linux instance. You must perform a standard Linux shutdown. You can do one of one alternatives below: - Power off option on GUI menu - `sudo init 0`, inside the genie bottle - `genie -u`, outside the genie bottle After doing that, you can safely shut down your WSL instance, either by `wsl --terminate` or `wsl --shutdown`. Not doing the shutdown process may cause damage to your WSL instance. So be careful. ## Tips and tricks - VNC is a very adaptive protocol, and by default tries to use the most aggressive compression available, for better networking performance. But in our case, doing this only adds unnecessary CPU extra load, since you are connecting to localhost ("infinite" bandwith, near zero ping). To remove all compression algorithms and reduce lagging, force your VNC Viewer to connect using RAW encoding. The performance gain is noticeable, specially when playing videos (not a spectacular performance in this particular scenario, though). -
tdcosta100 revised this gist
Apr 19, 2021 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,7 +60,7 @@ sudo apt install dotnet-runtime-5.0 ### Installing systemd-genie Now we will install systemd-genie, which is responsible for turning the minimalist WSL into a more complete Linux instance, with systemd and other related stuff. This is necessary to run GDM (GNOME Display Manager) and LightDM properly, giving the user a full graphic interface experience, with login and everything. Here are the [install instructions](https://github.com/arkane-systems/genie#installation). As of April 6th, 2021, these following commands are needed to install it (and I only guarantee they will work Ubuntu. For other distros, you must check how to get the appropriate package for your system): ``` sudo apt install apt-transport-https @@ -160,12 +160,13 @@ By default, the display manager call multiple X instances, one for each user ses Finally, it's time to put everything together. ``` genie -s ``` Doing this is like booting Linux again, this time with systemd. Because of systemd, gdm will start automatically, and will create a X instance to display the login interface. We changed this process to make it create Xvnc instances, so we can access them. The first instance will listen to port 5900, the second instance will listen to port 5901, and so on. **Attention:** if you want to avoid initialization errors that show up upon genie start, or make it start faster, you must check [this page](https://github.com/arkane-systems/genie/wiki/Systemd-units-known-to-be-problematic-under-WSL) ## Accessing the VNC screen After a while (usually 30 seconds, but it can take more if you don't have a SSD, maybe one minute or two), you can test if it's working properly. Use your favorite VNC Viewer to connect to your localhost port 5900. Use the VNC password set for user gdm. The login screen must appear. @@ -248,4 +249,6 @@ Thanks to this guys, whose feedback made this tutorial reach the current level o - [ROBYER1](https://gist.github.com/ROBYER1) - [vdevan](https://gist.github.com/vdevan) - [Greasy-Monkey](https://gist.github.com/Greasy-Monkey) - [siegLoesch](https://github.com/siegLoesch) - [adamgranthendry](https://github.com/adamgranthendry) - [cerebrate](https://github.com/cerebrate) - Creator of `systemd-genie` -
tdcosta100 revised this gist
Apr 17, 2021 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -111,7 +111,7 @@ By default, the display manager call multiple X instances, one for each user ses 2. Then, we create a new Xorg script. ``` sudo nano /usr/bin/Xorg_new ``` 3. Paste the following content in the editor (remember, WSL shell uses CTRL + SHIFT + V for pasting, instead our traditional CTRL + V key combination): @@ -148,12 +148,13 @@ By default, the display manager call multiple X instances, one for each user ses Please note the resolution of the virtual screen. You can change that to fit your needs (1366x768, 1920x1080, etc). Also, you can change the ```-PasswordFile``` option to point to a fixed location instead the home of current user, so you don't need to have a password for each user. 4. Finally, we set the correct permissions for the file and create a link to it: ``` sudo chmod 0755 /usr/bin/Xorg_new sudo ln -sf Xorg_new /usr/bin/Xorg ``` **Attention:** sometimes, system updates replace Xorg link with the original version. Just repeat this step if this happens, and Xvnc will work again as Xorg replacement. ## Running systemd-genie -
tdcosta100 revised this gist
Apr 7, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -66,6 +66,7 @@ Now we will install systemd-genie, which is responsible for turning the minimali sudo apt install apt-transport-https sudo wget -O /etc/apt/trusted.gpg.d/wsl-transdebian.gpg https://arkane-systems.github.io/wsl-transdebian/apt/wsl-transdebian.gpg sudo chmod a+r /etc/apt/trusted.gpg.d/wsl-transdebian.gpg source /etc/os-release cat << EOF | sudo tee /etc/apt/sources.list.d/wsl-transdebian.list deb https://arkane-systems.github.io/wsl-transdebian/apt/ $VERSION_CODENAME main deb-src https://arkane-systems.github.io/wsl-transdebian/apt/ $VERSION_CODENAME main -
tdcosta100 revised this gist
Apr 7, 2021 . 1 changed file with 10 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,13 +60,18 @@ sudo apt install dotnet-runtime-5.0 ### Installing systemd-genie Now we will install systemd-genie, which is responsible for turning the minimalist WSL into a more complete Linux instance, with systemd and other related stuff. This is necessary to run GDM (GNOME Display Manager) and LightDM properly, giving the user a full graphic interface experience, with login and everything. Here are the [install instructions](https://github.com/arkane-systems/genie#installation). As of April 6th, 2021, these following commands are needed to install it: ``` sudo apt install apt-transport-https sudo wget -O /etc/apt/trusted.gpg.d/wsl-transdebian.gpg https://arkane-systems.github.io/wsl-transdebian/apt/wsl-transdebian.gpg sudo chmod a+r /etc/apt/trusted.gpg.d/wsl-transdebian.gpg cat << EOF | sudo tee /etc/apt/sources.list.d/wsl-transdebian.list deb https://arkane-systems.github.io/wsl-transdebian/apt/ $VERSION_CODENAME main deb-src https://arkane-systems.github.io/wsl-transdebian/apt/ $VERSION_CODENAME main EOF sudo apt update sudo apt install systemd-genie ``` The installation process is finally done. -
tdcosta100 revised this gist
Mar 29, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -80,7 +80,7 @@ The installation process is finally done. vncpasswd ``` 1. Now, let's configure the VNC password for root (needed if you use LightDM instead GDM): ``` sudo -H vncpasswd ``` -
tdcosta100 revised this gist
Feb 5, 2021 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,12 @@ sudo apt update sudo apt upgrade ``` If you are trying to use Debian, you also will need: ``` sudo apt install curl wget ``` Now we are ready to go. ## Installing components -
tdcosta100 revised this gist
Feb 5, 2021 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -232,4 +232,7 @@ Thanks to this guys, whose feedback made this tutorial reach the current level o - [rkzdota](https://www.reddit.com/user/rkzdota/) - [WSL_subreddit_mod](https://www.reddit.com/user/WSL_subreddit_mod/) - [ptflp](https://gist.github.com/ptflp) - [ROBYER1](https://gist.github.com/ROBYER1) - [vdevan](https://gist.github.com/vdevan) - [Greasy-Monkey](https://gist.github.com/Greasy-Monkey) - [siegLoesch](https://github.com/siegLoesch) -
tdcosta100 revised this gist
Feb 5, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -175,7 +175,7 @@ If you are using LightDM, the desktop screen will appear in port 5900, so there' - If you are trying to use Debian, you need to do the following or some apps will not launch (at least in Buster): ``` echo "LANG=en_US.UTF-8" | sudo tee -a /etc/default/locale ``` ## Troubleshooting -
tdcosta100 revised this gist
Feb 5, 2021 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -174,7 +174,9 @@ If you are using LightDM, the desktop screen will appear in port 5900, so there' - VNC is a very adaptive protocol, and by default tries to use the most aggressive compression available, for better networking performance. But in our case, doing this only adds unnecessary CPU extra load, since you are connecting to localhost ("infinite" bandwith, near zero ping). To remove all compression algorithms and reduce lagging, force your VNC Viewer to connect using RAW encoding. The performance gain is noticeable, specially when playing videos (not a spectacular performance in this particular scenario, though). - If you are trying to use Debian, you need to do the following or some apps will not launch (at least in Buster): ``` echo "LANG=en_US.UTF-8" >> /etc/default/LOCALE" ``` ## Troubleshooting
NewerOlder