We will see here how to use remote desktop from Windows or GNU/Linux systems to a GNU/Linux X.Org or a Wayland display servers. As we will see it's completly different dependly on which display server we use.
As explained above, depending of your display server, screen sharing configuration won't be the same. So the first thing to do is to identify display server.
std@host:~$ loginctl SESSION UID USER SEAT TTY 5 1000 std seat0 tty2
std@host:~$ loginctl show-session 5 -p Type Type=wayland
In Wayland, the native VNC support is broken, so we will use gnome-remote-desktop which offer remote desktop sharing using VNC with PipeWire.
root@host:~# apt install gnome-remote-desktop
We need to set a network configuration that will be associate later to screen sharing profile.
With X11 we can use classic VNC Server, so let's see how to do it with x11vnc server.
From GDM3 (GNOME Display Manager) we will select Xorg GNOME session.
root@host:~# apt install x11vnc
Here, we can use classic method and edit /etc/network/interface or use graphical one (see above).
auto ens192 iface ens192 inet static address 192.168.1.200 netwmask 255.255.255.0 gateway 192.168.1.254 dns-nameserver 192.168.1.1
std@host:~$ echo $DISPLAY
std@host:~$ x11vnc -rfbport 5900 -display :1 -auth /var/lib/gdm/:0.Xauth
Now from the Windows host, download a VNC client. VNC Viewer is a good one.
We can use anyone of the many VNC Clients available. Example with tigervnc :
root@host:~# apt install tigervnc
std@host:~$ vncviewer 192.168.1.200:5900