This is a quick step by step guide to install TightVNCServer on Debian 11. For those of you who face the issue with “Failed to execute child process ‘dbus-launch’ (no such file or directory)”. I will show you what you need to install to get it working.
Linux OS: Debian 11
TightVNCServer: 1.3.10
1. Let’s start by installing the GDE/GUI for Debian. For this tutorial we are going to install xfce
sudo apt install xfce4 xfce4-goodies
2. Install TightVNC Server
sudo apt install tightvncserver
3. Configure TightVNC Server for the first time.
You need to setup the config file and password for the first time. So launch the service with the below command. Take note that the password can only be maximum of 8 characters, anything more will be truncated.
sudo vncserver :<port>
4. You will need to kill the service and modified the ~/.vnc/xstartup file
sudo vncserver -kill :<port>
OR
You can also kill the service by locating the PID and killing it manually.
5. Edit the ~/.vnc/xstartup file. You need to modify this for every vncserver. You can write a script to automate that too.
nano ~/.vnc/xstartup
Add this new line to the bottem of the file.
startxfce4 &
6. If you create a new file manually remember to make it executable.
chmod +x ~/.vnc/xstartup
Once that is done you can restart the vncserver and check the port open. Take note the starting port number is 5900+<port> that you specify. In this example is 5900 + 11
If you hit into the following error
“Failed to execute child process ‘dbus-launch’ (no such file or directory)”
Then you might need to install dbus-x11 if it is not already installed in the system.
apt-get install dbus-x11