-
-
Save ausec-it/eda8f82602dbf4078c6387e809c45938 to your computer and use it in GitHub Desktop.
Revisions
-
tdcosta100 revised this gist
Jul 7, 2020 . 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 @@ -217,7 +217,7 @@ After logging in, the screen will be blank. This is because a new instance of Xv ### Budgie Desktop  ## Contributors -
tdcosta100 renamed this gist
Jul 7, 2020 . 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,4 +1,4 @@ # 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/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). -
tdcosta100 revised this gist
Jul 7, 2020 . No changes.There are no files selected for viewing
-
tdcosta100 revised this gist
Jul 7, 2020 . 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 @@ -54,7 +54,7 @@ $ sudo apt install dotnet-runtime-3.1 ### 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://packagecloud.io/arkane-systems/wsl-translinux/install). As of July 2nd, 2020, these following commands are needed to install it: ``` $ curl -s https://packagecloud.io/install/repositories/arkane-systems/wsl-translinux/script.deb.sh | sudo bash $ sudo apt install systemd-genie -
tdcosta100 revised this gist
Jul 7, 2020 . 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 @@ -183,6 +183,8 @@ After logging in, the screen will be blank. This is because a new instance of Xv 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. 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. 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 7, 2020 . 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 @@ -97,7 +97,7 @@ By default, the display manager call multiple X instances, one for each user ses $ sudo nano /usr/bin/Xorg ``` 3. Paste the following content in the editor (remember, WSL shell uses CTRL + SHIFT + V for pasting, instead our traditional CTRL + V key combination): ``` #!/bin/bash -
tdcosta100 revised this gist
Jul 7, 2020 . 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 @@ -168,7 +168,7 @@ Doing this is like booting Linux again, this time with systemd. Because of syste After a while (usually 30 seconds), 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. After logging in, the screen will be blank. This is because a new instance of Xvnc was created for user desktop, listening to port 5901. Connect to this screen now. The logged user's desktop must appear. When you log out, the screen at port 5900 will show the login interface again. This applies to GDM (which is the case if you installed Ubuntu Desktop). If you are using LightDM, the desktop screen will appear in port 5900, so there's no need to connect to port 5901. ## Tips and tricks -
tdcosta100 revised this gist
Jul 6, 2020 . 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 @@ -4,7 +4,7 @@ In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additio The key components we need to install are `tigervnc-standalone-server` and [`systemd-genie`](https://github.com/arkane-systems/genie). For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa), 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://docs.microsoft.com/pt-br/windows/wsl/wsl2-index) installation. -
tdcosta100 revised this gist
Jul 6, 2020 . 1 changed file with 6 additions and 6 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 @@ -195,27 +195,27 @@ After logging in, the screen will be blank. This is because a new instance of Xv ## Sample screenshots ### GDM  ### LightDM  ### GNOME  ### KDE  ### Xfce  ### Budgie Desktop  ## Contributors -
tdcosta100 revised this gist
Jul 6, 2020 . 1 changed file with 26 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 @@ -192,6 +192,32 @@ After logging in, the screen will be blank. This is because a new instance of Xv After that, open your distro shell again and repeat the steps of section [Running systemd-genie](https://gist.github.com/tdcosta100/385636cbae39fc8cd0937139e87b1c74#running-systemd-genie). ## Sample screenshots ### GDM [GDM](https://user-images.githubusercontent.com/708549/86651126-cce7c480-bfd2-11ea-8f74-b1127bc36a77.png) ### LightDM [LightDM](https://user-images.githubusercontent.com/708549/86651404-06203480-bfd3-11ea-8275-e7914f80b1b2.png) ### GNOME [GNOME](https://user-images.githubusercontent.com/708549/86651633-37990000-bfd3-11ea-9b06-f48c6dce22a9.png) ### KDE [KDE](https://user-images.githubusercontent.com/708549/86651717-4a133980-bfd3-11ea-8c67-7349351e5bba.png) ### Xfce [Xfce](https://user-images.githubusercontent.com/708549/86651798-5ac3af80-bfd3-11ea-993e-d8ed938f7262.png) ### Budgie Desktop [Budgie Desktop](https://user-images.githubusercontent.com/708549/86651902-729b3380-bfd3-11ea-8aab-7f4ad14099c1.png) ## Contributors Thanks to this guys, whose feedback made this tutorial reach the current level of quality and completeness (and it will be more and more complete as more feedback is given). -
tdcosta100 revised this gist
Jul 6, 2020 . 1 changed file with 7 additions and 2 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,12 +66,17 @@ The installation process is finally done. ### Creating VNC Server passwords 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 (nedded if you use LightDM instead GDM): ``` $ sudo vncpasswd ``` 1. Finally, let's configure the VNC password for gdm: ``` $ sudo -u gdm vncpasswd ``` -
tdcosta100 revised this gist
Jul 6, 2020 . 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 @@ -106,6 +106,9 @@ By default, the display manager call multiple X instances, one for each user ses # -keeptty is not supported at all by Xvnc -keeptty) ;; # -novtswitch is not supported at all by Xvnc -novtswitch) ;; # other arguments are kept intact *) set -- "$@" "$arg" @@ -114,7 +117,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[@]}" -
tdcosta100 revised this gist
Jul 5, 2020 . 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 @@ -186,7 +186,7 @@ After logging in, the screen will be blank. This is because a new instance of Xv ## Contributors Thanks to this guys, whose feedback made this tutorial reach the current level of quality and completeness (and it will be more and more complete as more feedback is given). - [nselimis](https://www.reddit.com/user/nselimis/) - [rkzdota](https://www.reddit.com/user/rkzdota/) -
tdcosta100 revised this gist
Jul 5, 2020 . 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,6 +1,6 @@ # WSL2 with GUI using VNC 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 components we need to install are `tigervnc-standalone-server` and [`systemd-genie`](https://github.com/arkane-systems/genie). -
tdcosta100 revised this gist
Jul 5, 2020 . 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,6 +1,6 @@ # WSL2 with GUI using VNC 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 components we need to install are `tigervnc-standalone-server` and [`systemd-genie`](https://github.com/arkane-systems/genie). -
tdcosta100 revised this gist
Jul 5, 2020 . 1 changed file with 10 additions and 2 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,6 +1,6 @@ # WSL2 with GUI using VNC 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 components we need to install are `tigervnc-standalone-server` and [`systemd-genie`](https://github.com/arkane-systems/genie). @@ -182,4 +182,12 @@ After logging in, the screen will be blank. This is because a new instance of Xv PS > wsl --terminate <your distro name> ``` After that, open your distro shell again and repeat the steps of section [Running systemd-genie](https://gist.github.com/tdcosta100/385636cbae39fc8cd0937139e87b1c74#running-systemd-genie). ## Contributors Thanks to this guys, whose feedback made this tutorial reach the current level of completeness (and it will be more and more complete as more feedback is given). - [nselimis](https://www.reddit.com/user/nselimis/) - [rkzdota](https://www.reddit.com/user/rkzdota/) - [WSL_subreddit_mod](https://www.reddit.com/user/WSL_subreddit_mod/) -
tdcosta100 revised this gist
Jul 5, 2020 . 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,6 +1,6 @@ # WSL2 with GUI using VNC 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, TightVNC, TigerVNC, UVNC, all of them might work flawlessly). The key components we need to install are `tigervnc-standalone-server` and [`systemd-genie`](https://github.com/arkane-systems/genie). -
tdcosta100 revised this gist
Jul 5, 2020 . 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,6 +1,6 @@ # WSL2 with GUI using VNC 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, TightVNC, TigerVNC, all of them might work flawlessly). The key components we need to install are `tigervnc-standalone-server` and [`systemd-genie`](https://github.com/arkane-systems/genie). -
tdcosta100 revised this gist
Jul 5, 2020 . 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,6 +1,6 @@ # WSL2 with GUI using VNC 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, TightVNC, TigerVNC, all of them must work flawlessly). The key components we need to install are `tigervnc-standalone-server` and [`systemd-genie`](https://github.com/arkane-systems/genie). -
tdcosta100 revised this gist
Jul 5, 2020 . 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 @@ -164,7 +164,7 @@ After logging in, the screen will be blank. This is because a new instance of Xv ## 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). ## Troubleshooting -
tdcosta100 revised this gist
Jul 5, 2020 . 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 @@ -173,7 +173,7 @@ After logging in, the screen will be blank. This is because a new instance of Xv $ journalctl -t /usr/lib/gdm3/gdm-x-session -t /usr/bin/Xorg ``` 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. 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
Jul 5, 2020 . 1 changed file with 8 additions and 8 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 @@ -169,17 +169,17 @@ After logging in, the screen will be blank. This is because a new instance of Xv ## Troubleshooting 1. If it doesn't work at first, try to check your journalctl logs: ``` $ journalctl -t /usr/lib/gdm3/gdm-x-session -t /usr/bin/Xorg ``` There 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. 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. 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 --terminate <your distro name> ``` After that, open your distro shell again and repeat the steps of section [Running systemd-genie](https://gist.github.com/tdcosta100/385636cbae39fc8cd0937139e87b1c74#running-systemd-genie). -
tdcosta100 revised this gist
Jul 5, 2020 . 1 changed file with 20 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 @@ -73,9 +73,7 @@ The installation process is finally done. 1. Now, let's configure the VNC password for gdm: ``` $ sudo -u gdm vncpasswd ``` You can repeat the process for other existing users. @@ -166,4 +164,22 @@ After logging in, the screen will be blank. This is because a new instance of Xv ## 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 client 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 -t /usr/lib/gdm3/gdm-x-session -t /usr/bin/Xorg ``` There 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. 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. 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 --terminate <your distro name> ``` After that, open your distro shell again and repeat the steps of section [Running systemd-genie](https://gist.github.com/tdcosta100/385636cbae39fc8cd0937139e87b1c74#running-systemd-genie). -
tdcosta100 revised this gist
Jul 5, 2020 . 1 changed file with 2 additions and 2 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 @@ -116,14 +116,14 @@ 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/.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 ```-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. ``` -
tdcosta100 revised this gist
Jul 5, 2020 . 1 changed file with 5 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 @@ -116,7 +116,11 @@ 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" "1920x1080" "-PasswordFile" "$HOME/.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). -
tdcosta100 revised this gist
Jul 5, 2020 . 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 @@ -156,7 +156,7 @@ Doing this is like booting Linux again, this time with systemd. Because of syste ## Accessing the VNC screen After a while (usually 30 seconds), 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. After logging in, the screen will be blank. This is because a new instance of Xvnc was created for user desktop, listening to port 5901. Connect to this screen now. The logged user's desktop must appear. When you log out, the screen at port 5900 will show the login interface again. -
tdcosta100 revised this gist
Jul 5, 2020 . 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 @@ -156,7 +156,7 @@ Doing this is like booting Linux again, this time with systemd. Because of syste ## Accessing the VNC screen After a while (usually 30 seconds), you can test if it's working properly. Use your favorite VNC Viewer to connect to port 5900. Use the VNC password set for user gdm. The login screen must appear. After logging in, the screen will be blank. This is because a new instance of Xvnc was created for user desktop, listening to port 5901. Connect to this screen now. The logged user's desktop must appear. When you log out, the screen at port 5900 will show the login interface again. -
tdcosta100 revised this gist
Jul 5, 2020 . 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 @@ -162,4 +162,4 @@ After logging in, the screen will be blank. This is because a new instance of Xv ## 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 client 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
Jul 5, 2020 . 1 changed file with 5 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 @@ -158,4 +158,8 @@ Doing this is like booting Linux again, this time with systemd. Because of syste After a while (usually 30 seconds), you can test if it's working properly. Use your favorite VNC client to connect to port 5900. Use the VNC password set for user gdm. The login screen must appear. After logging in, the screen will be blank. This is because a new instance of Xvnc was created for user desktop, listening to port 5901. Connect to this screen now. The logged user's desktop must appear. When you log out, the screen at port 5900 will show the login interface again. ## 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 client to connect using RAW protocol. The performance gain is noticeable, specially when playing videos (not a spectacular performance in this particular scenario, though). -
tdcosta100 revised this gist
Jul 5, 2020 . 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 @@ -54,7 +54,7 @@ $ sudo apt install dotnet-runtime-3.1 ### 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) properly, giving the user a full graphic interface experience, with login and everything. Here are the [install instructions](https://packagecloud.io/arkane-systems/wsl-translinux/install). As of July 2nd, 2020, these following commands are needed to install it: ``` $ curl -s https://packagecloud.io/install/repositories/arkane-systems/wsl-translinux/script.deb.sh | sudo bash $ sudo apt install systemd-genie
NewerOlder