5.2 Persistent VNC Sessions
A persistent VNC session is initiated on the server. The session and all applications
started in this session run regardless of client connections until the session is terminated.
A persistent session can be accessed from multiple clients simultaneously. This is ideal
for demonstration purposes where one client has full access and all other clients have
view-only access. Another usecase are trainings where the trainer might need access
to the trainee's desktop. However, most of the times you probably do not want to share
your VNC session.
In contrast to one-time sessions that start a display manager, a persistent session starts
a ready-to operate desktop that runs as the user that started the VNC session.
Access to persistent sessions is protected by two possible types of passwords:
• a regular password that grants full access or
• an optional view-only password that grants a non-interactive (view-only) access.
A session can have multiple client connections of both kinds at once.
Procedure 5.2:
Starting a Persistent VNC Session
1
Open a shell and make sure you are logged in as the user that should own the VNC
session.
2
If the network interface serving the VNC sessions is protected by a rewall, you
need to manually open the port used by your session in the rewall. If starting mul-
tiple sessions you may alternatively open a range of ports. See Chapter 13, Mas-
querading and Firewalls (↑Security Guide) for details on how to congure the re-
wall.
vncserver uses the ports 5901 for display :1, 5902 for display :2, and so on.
For persistent sessions, the VNC display and the X display usually have the same
number.
3
To start a session with a resolution of 1024x769 pixel and with a color depth of 16-
bit, enter the following command:
vncserver -geometry 1024x768 -depth 16
118 Reference