Beginner's guide to Virtual Mode

Follow

VirtualMode-Legacy.png
VirtualMode.png

What is Virtual Mode? 

Virtual Mode allows you to create individual user sessions in separate virtual desktops through VNC Server. The virtual desktop is not the actual desktop you see when you log on to your account desk-side on that computer, but rather one that exists in memory only. It is only visible to you as a connected VNC Viewer user, which is useful when multiple users need to connect to one PC but need separate sessions without disturbing each other. 

For a more detailed description of Virtual Mode click here.

Requirements for Virtual Mode

Virtual mode is only available on Linux. For a list of the Linux operating systems that are supported by VNC Server, please see this page.

Running Virtual Mode

For the best experience, we recommend using Virtual Mode with SystemXorg enabled. Firstly, you need to install the dummy driver package. You can do this by running the below command, appropriate to your operating system:

# Install X11 dummy drive on Debian-compatible systems:
sudo apt install xserver-xorg-video-dummy
# Install X11 dummy drive on Redhat-compatible systems:
# sudo yum install xorg-x11-drv-dummy

Next, configure VNC Server to use X11 dummy driver.

sudo vncinitconfig --enable-system-xorg

To start a Virtual Mode instance (session), run the below command:

vncserver-virtual

At the end of the command output, VNC Server will print the IP/hostname and port to use to connect, e.g.:

New desktop is SERVER1:1 (10.10.17.84:1)

To end a virtual mode session, the user can either "log out" using the power/user menu in their desktop environment, or by running the below command

vncserver-virtual -kill :DISPLAY

For full command-line options for running virtual mode please see the manual page.

Configuring Virtual Mode

Virtual Mode can be configured using VNC Server parameters. They can either be specified at the command line to apply to the session being launched or in configuration files to be used for all sessions.

The desktop environment used in virtual mode can also be changed to provide users with a clean desktop environment for the duration of their session.

Using session specific configuration

Prior to RealVNC Server 7.9.0, RealVNC Server in Virtual Mode can only be configured at a system or user level.

Starting in RealVNC Server 7.9.0, users can now start Virtual Mode sessions with session specific configuration locations using 2 new environment variables, VNC_PROFILE and VNC_CONFIG_PROFILE.

If VNC_PROFILE is set and VNC_CONFIG_PROFILE is not set:

  • all files which used to go into $HOME/.vnc will go into $HOME/.vnc/profiles/$VNC_PROFILE

If VNC_PROFILE is not set and VNC_CONFIG_PROFILE is set:

  • all files will go into $HOME/.vnc except configuration files which will go into $HOME/.vnc/profiles/$VNC_CONFIG_PROFILE/config.d

If both are set:

  • config files will go into $HOME/.vnc/profiles/$VNC_CONFIG_PROFILE/config.d and non-config files will go into $HOME/.vnc/profiles/$VNC_PROFILE
Was this article helpful?
13 out of 28 found this helpful

Comments

0 comments

Article is closed for comments.