Troubleshooting VNC Problems on Linux: Fix Common Errors
VNC is a very useful tool for controlling the desktop of another system remotely. It allows you to log into a Linux system from your laptop or even your phone and manage everything as if you were physically present. Especially if you are not comfortable with the command line, VNC is a simple and good way to work with files and software. In this article, we will go over the common VNC problems in Linux, why they arise, and the methods that actually work.

First of all, what is VNC and why do you need it?
VNC or Virtual Network Computing is a cross-platform system that allows you to control the desktop of one system from another.
Its new versions have many more features, such as:
- Fast streaming without lag
- Support for audio transmission
- Stronger security with SSO
- Run software on Windows, Linux and Mac
With VNC, you can work on multiple systems at the same time, manage files and run programs remotely.
Problem 1: VNC Server Errors
Sometimes when you run the server you will encounter errors that seem very strange.
Problem: Default font ‘fixed’ does not open
Reason: The default font path is different from the expected VNC path
Solution: Check the font path with the following command
xset q
Then write the correct path in the vncserver config file
-fp "/usr/share/fonts/X11/misc,built-ins"
If you want it to apply to all users, write it in /etc/vnc/config
But if you want it only for the current user, put it in ~/.vnc/config
Personal experience: I have seen this error several times on cloud servers when fonts were removed after installing an update. Once, simply reinstalling xfonts-base solved the problem.
Problem: Unrecognized GSS failure
Reason: Conflict between GSSAPI and CUPS libraries
Solution:
chmod -x /usr/lib/cups/backend/vnc
This command disables the printer but keeps Single Sign-On enabled.
Note: To avoid this error, it is better to turn off the Printer Discovery option during the initial installation of VNC. The execution speed will be faster and the interference will be less.
Problem 2: Connection errors
Problem: Connection refused
Reason: The server is not running on the desired port
Solution: Check that the VNC Server is running and the port is set correctly.
Real experience: Once, on one of the CentOS servers, I saw that after rebooting, VNC would not start because the session file was corrupted. It was fixed by simply deleting the temporary files from the ~/.vnc/ path and restarting the service.
Problem: Unknown host / This means that VNC could not find the IP address of the target system.
Solution: If you are using Cloud Connection, log in with Team Header
If you are connecting directly, use the nslookup command or enter the IP manually
Problem: Valid requested name, but no data found
This error is usually due to a problem with the network’s Name Resolution
Solution: Use the direct IP instead of the hostname
Practical tip: Sometimes the firewall closes ports 5900 to 5901. If you encounter a Connection Timeout error, open it with the following command
sudo ufw allow 5900/tcp
Problem 3: Black or blank screen
When you run VNC but don’t see anything, it usually means the system has no monitor or the HDMI is off.
Practical solutions: Upgrade VNC Server to version 6.5.0
Disable Sleep or Screen Off in the server’s power settings
Turn off Battery Saver
Use EDID Emulator to make the server think the monitor is plugged in
Set capturemethod to 1 in the Expert section and restart the server
From my experience: On an Ubuntu server without a monitor, I was able to capture a screenshot just by adding the following parameter to the xstartup file
export DISPLAY=:1
Pro Tips and Tricks (Real Scenarios and Pro Tips)
- I once encountered a case where the VNC connection was dropping every few minutes. I finally figured out that the problem was with the Power Saving settings. Disabling it fixed everything.
- If you are connecting via SSH tunnel, make sure the compression options are the same on both sides because the difference causes lag.
- During your sessions, use tools like htop or vnstat to see if the problem is with your bandwidth or CPU.
- For added security, always change the default port from 5900 to 5915 to reduce the chance of bot attacks.
Conclusion for VNC problems on Linux
VNC is still one of the most flexible remote control tools and works very well on Linux. However, in low-bandwidth environments or security-sensitive systems, it is better to use SSH tunneling because it is both faster and more secure. If you keep your VNC configuration simple and up-to-date and check for errors according to these tips, your experience with it will be trouble-free and completely smooth.
Since VNC requires an active monitor, HDMI may be off or the system may be without a monitor.
The xset q command shows the path to the fonts. Enter the correct path in the vncserver configuration file.
Make sure the VNC Server is running and the port is set correctly / For direct connections use IP.
You might like it
Centos Tutorials
How to Safely Disable Firewall on CentOS 7 (Step-by-Step)
Almalinux Tutorials
A Clever Guide to Install GNOME on AlmaLinux
How to Use Nmap on Linux for Network Scanning and Security