Linux Remote Desktop Components
Remote desktop service components support only desktop systems based on X Display Server. Wayland is currently not supported.
In addition, only the VNC remote desktop protocol is currently supported.
Component Categories
A complete Linux Desktop with remote desktop capabilities consists of the following component categories.
| Category | Target | Functionality Provided | Impact If a Problem Occurs | Common Components |
|---|---|---|---|---|
| Remote Desktop | End Users | Remote desktop interaction and session management | Users cannot use the remote desktop feature | VNC Server, Xrdp |
| End-User Applications | End Users | Complete specific tasks through a graphical interface | Users cannot use desktop applications | Firefox, Chromium, Thunderbird |
| Desktop Environment / Window Manager | End Users | Manage graphical applications on the desktop | Desktop interaction is unavailable, including window management such as dragging, minimizing, and maximizing, as well as the Dock, App Indicator, and App Launcher | Common Window Manager options include i3wm and dwm. Common Desktop Environment options include Xfce, KDE Plasma, GNOME, and Cinnamon |
| Display Backend | Upper-Layer Graphical Applications | Provide interfaces for rendering graphics and receiving/responding to input device events such as the keyboard and mouse | Problems in this layer prevent upper-layer graphical applications from working properly | Xorg, Wayland, XWayland |
| Hardware Access | Upper-Layer Display Server | Provide interfaces that abstract interactions with hardware | Physical devices cannot work as expected | Input Drivers, framebuffer (fbdev), Direct Rendering Manager (DRM) |
VNC Customization
Use the vncserver command provided by the vncserver service to start a remote desktop session.
The platform extends vncserver with several custom features, such as:
- Session isolation: By default,
VNCsession files are stored in the user'sHOMEdirectory. If theHOMEdirectory is located on shared storage, multiple nodes may share the same VNC session, causing conflicts.
To ensure that the VNC session on each node is isolated, the platform provides custom extensions forvncserver. - High-resolution support: By default,
VNCsessions use a relatively low resolution. The platform extendsvncserverso that higher resolutions are supported.
VNC Initialization Process
Use
vncserverto initialize a remote desktop session.
A complete remote desktop session includes:
X ServerVNC ServerX Client
X Server Initialization
Use
Xtigervncto initialize theX Server.
Xtigervnc is an X Server that virtualizes a physical display. This means it can output graphics even when no physical display is attached. Graphical applications run as its clients, and their graphical output is rendered on this virtual display.
In addition, it is also a VNC Server, responsible for communicating with the VNC Client so that the session can be accessed and the graphical interface can be rendered.
X Client Initialization
Use the
xstartupscript to initialize theX Client.
Internally, it calls xinit to start the X Client.
The
X Clientto be started here includes the desktop management components, because they provide the entry point for end users, who use them to launch desktop applications.
xinitis a script responsible forX Clientinitialization.
Startup behavior differs between distributions, but the entry point is consistently/etc/X11/xinit/xinitrc.
CentOS (6.9, 7.5)
On CentOS, initialization is delegated to /etc/X11/xinit/Xclients.
It supports only
GNOMEandKDE.
This means that after either of these desktops is installed,VNCremote desktop can be used without modifying the configuration file.
If another desktop environment is required, manually configure this file by changing thePREFERREDvariable to the full binary path of the desired desktop.
Using i3wm as an example, run the following command to modify the configuration file:
sudo sed -i 's/^PREFERRED=.*$/PREFERRED=$(type -p i3)/' /etc/X11/xinit/Xclients
Ubuntu (18.04, 20.04, 22.04)
On Ubuntu, initialization is delegated to /etc/X11/Xsession, which then runs scripts in the /etc/X11/Xsession.d/ directory.
Eventually, the desktop is started through /etc/alternatives/x-session-manager. This file is a symbolic link. Use the following command to check where it points:
readlink /etc/alternatives/x-session-manager
# For example: /usr/bin/gnome-session
After installing the desktop environment, make sure /etc/alternatives/x-session-manager points to the correct desktop startup script.
If the launched desktop is not the expected one, manually update this symbolic link.
Using xfce4 as an example, run the following commands:
sudo rm /etc/alternatives/x-session-manager
sudo ln -s /usr/bin/startxfce4 /etc/alternatives/x-session-manager