
Tip: In Debian, the GDM user is Debian-gdm. Now, let's configure the VNC password for root (needed if you use LightDM instead GDM): sudo -H vncpasswdįinally, 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


First, let's configure the VNC password current user: vncpasswd If you don't configure the password, you won't able to access the login screen, or the user's desktop. 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.

In this setup, each user has a different VNC password. Configuring the environment Creating VNC Server passwords The installation process is finally done. Pretty easy, one command and you are done: sudo apt install tigervnc-standalone-server The installation will take a while, so be patient. Use spacebar to select the package, and Tab to confirm your choice. sudo taskselĪt the package list, select your favorite GUI package. Ubuntu has a handy component installer called tasksel, but it's not installed by default. If you are trying to use Debian, you also will need: sudo apt install curl wget Don't forget to reboot your computer after disabling WSLg, just shutting WSL down is not enough to bring WSLg down.īefore going to real business, let's make sure we are updated. You can make them coexist, but it's painful. Then you must disable WSLg, because unfortunately it messes with the graphical internal workings of Linux. First, we need a working WSL2 installation.

Check the Sample screenshots section for examples. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. The key component we need to install is tigervnc-standalone-server.įor this setup, I will use Ubuntu 20.04 LTS (Focal Fossa, unfortunately 22.04 does not work), and install GNOME Desktop. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer ( RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly). In this tutorial, we will setup GUI in WSL2, and access it using VNC.
