This episode puts TigerVNC into practice: creating a virtual display without a physical monitor using vncserver and Xvnc, setting geometry and depth, understanding x0vncserver for sharing a physical display, and preparing vncpasswd and the ~/.vnc/xstartup file for the desktop environment.

In episode 4, x11vnc shared the running display. But there's one scenario x11vnc can't solve: the headless server — a machine with no physical monitor that still needs a desktop to be accessed. The answer is TigerVNC Xvnc, which creates a purely virtual display in memory, with no need for a screen, GPU, or physical login session.
Episode 5 guides you through mastering TigerVNC: creating virtual displays :1, :2 with vncserver, setting resolution and color depth, understanding x0vncserver for sharing a physical display, and preparing vncpasswd and the ~/.vnc/xstartup file so the VNC session launches the desktop environment you want.
Xvnc is both an X11 server and a VNC server at once. It runs a display — complete with a window manager and applications — but that display never appears on a physical monitor. All its graphics are sent directly to the connected VNC viewer.
Because the display is virtual, you can run many sessions simultaneously: displays :1, :2, :3, each with its own user and resolution. This opens up multi-session possibilities that x11vnc doesn't have.
The easiest way to use Xvnc is through the vncserver wrapper script:
vncpasswd
vncserver :1 -geometry 1920x1080 -depth 24The vncserver :1 -geometry 1920x1080 -depth 24 command creates virtual display :1 with a 1920x1080 resolution and 24-bit color depth. Viewers connect to port 5901. Before that, vncpasswd creates the password file the server will use.
To see running sessions and stop them:
vncserver -list
vncserver -kill :1vncserver -list shows the list of active displays with their PIDs. vncserver -kill :1 stops session :1 cleanly — far better than killing the process abruptly.
If you're on the RHEL family and don't want to install x11vnc, TigerVNC provides x0vncserver for the same job: sharing a running X11 display. The difference is that x0vncserver doesn't create a new display — it reads the existing one:
x0vncserver -display :0 -passwordfile ~/.vnc/passwdThe x0vncserver -display :0 -passwordfile ~/.vnc/passwd command shares the running display :0 and uses the password file from vncpasswd. Its output will tell you which port is used, usually 5900.
When vncserver creates a new display, it runs the ~/.vnc/xstartup script to launch the desktop environment. Without this file, you'll only see a gray screen. Fill it in according to the DE you installed:
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec startxfce4For KDE or GNOME, replace the last line with exec startplasma-x11 or exec gnome-session. Don't forget to give the file executable permission:
chmod +x ~/.vnc/xstartupIf xstartup isn't executable, vncserver will throw an error and the session will end with a blank screen. This is one of the most frequently asked "gray screen" causes on forums.
Warning
Make sure the desktop environment called in xstartup is actually installed. Calling startplasma-x11 on a machine without KDE will kill the VNC session the moment it's created.
Since every user has their own ~/.vnc/xstartup, you can run separate displays for different users. User arman runs :1, user budi runs :2, each with their own password and DE. This is a common pattern for servers serving several people.
sudo -u arman vncserver :1 -geometry 1920x1080
sudo -u budi vncserver :2 -geometry 1366x768After creating a display, verify that the server is listening correctly:
ss -tulpn | grep 590
vncserver -listss -tulpn | grep 590 shows all active 59xx ports — 5901 for :1, 5902 for :2, and so on. If a port doesn't appear, the session most likely failed because of xstartup or the password.
TigerVNC writes logs to ~/.vnc/:
tail -20 ~/.vnc/host:1.logThe tail -20 ~/.vnc/host:1.log command shows the end of session :1's log. "unable to connect" or "Authentication failed" errors almost always appear here before you start guessing the cause.
Episode 5 taught you how TigerVNC works: creating a virtual display without a monitor using vncserver -geometry 1920x1080 -depth 24, running multi-sessions for different users, using x0vncserver to share a physical display, and configuring vncpasswd and ~/.vnc/xstartup to launch the desktop environment.
Key takeaways:
Xvnc creates a virtual display; x0vncserver shares a physical display.vncserver :1 creates display :1, accessible on port 5901.-geometry and -depth set resolution and color depth.~/.vnc/xstartup determines the desktop environment; it must be executable.vncserver -list and vncserver -kill :N manage sessions.In the next episode, episode 6, we look at the other side: VNC clients and the first connection — getting to know TigerVNC Viewer, Remmina, Vinagre, and RealVNC, understanding the host:display versus host:port format, and diagnosing connection failures. Get your client machine ready!