Debian remote desktop with VNC with XFCE Desktop environment

This is the continue tutorial for Debian remote desktop with XRDP with XFCE Desktop environment.

Here is the quick way to start your root user vnc service via rc.local

nano /etc/rc.local

vncserver -kill :1
tigervncserver -xstartup  -alwaysshared -geometry 1680x1050 -depth 32 -localhost no

VNC Server installation

apt install tigervnc-standalone-server tigervnc-common -y

Init the vncserver and setup the configuration such as password

vncserver

You will be prompted to set a new password for the VNC Server. Enter your desired password and confirm it when prompted.

Next, you will be asked if you want to set a view-only password. This password is optional and allows users to view your desktop without having control. Choose ‘n’ to disable the view-only password or ‘y’ to enable it.

Kill the VNC session

vncserver -kill :1

Setup init session

nano ~/.vnc/config

In the nano editor, enter the following configuration settings:

session=xfce
geometry=1680x1050
localhost=no
depth=32
alwaysshared
# localhostalwaysshared

Add the user

Use user root at your own risk.

nano /etc/tigervnc/vncserver.users

:1=root

Enable VNC Server Service daemon

systemctl enable tigervncserver@:1.service
systemctl start tigervncserver@:1.service

Connecting to the VNC Server via SSH Tunneling

To connect to the VNC Server securely, we will use SSH tunneling, which encrypts the VNC traffic and ensures a secure connection.

ssh -L 5901:127.0.0.1:5901 -N -f -l root server1.xxx.com -p 2022 

References:

  1. https://shape.host/resources/how-to-set-up-and-install-vnc-server-on-debian-12
  2. https://github.com/tarqmamdouh/tigervnc-gnome
  3. https://blog.mowd.tw/p/6691

Photo by Glenn Carstens-Peters on Unsplash