Exam weight: 1 โ LPIC-1 v5, Exam 102
What You Need to Know
From the official LPIC-1 objectives:
- Awareness of major desktop environments.
- Awareness of protocols used to access remote desktop sessions.
Key terms: KDE, Gnome, Xfce, X11, XDMCP, VNC, Spice, RDP.
Desktop Environment
The X Window System provides only low-level mechanisms: handling input events, cut/copy/paste between applications, and a programming interface to draw graphical elements. It does not draw complex visual elements on its own โ shapes, colors, visual effects are generated by the application.
A desktop environment extends X by bringing together programming interfaces, libraries, and supporting programs that deliver a consistent, complete graphical experience. Key components:
- Window manager โ controls window placement, title bars, minimize/maximize/close buttons, and switching between windows.
- Widget toolkit โ provides reusable visual elements (buttons, text fields, dialog windows) used by the window manager and applications. Common toolkits: GTK+ and Qt.
- Application launcher โ lists available applications.
- Session manager โ manages login, logout, and running services.
Desktop environments also integrate third-party services such as PulseAudio (sound) and CUPS (printing) with graphical frontends.
Popular Desktop Environments
Linux supports multiple desktop environments, unlike proprietary systems that offer only one. All share common design concepts: an application launcher, rules for default applications by file type, and configuration tools.
GNOME
One of the most popular desktop environments, the default on Fedora, Debian, Ubuntu, SUSE, RHEL, CentOS, etc. GNOME 3 replaced the traditional launcher and taskbar with Gnome Shell Activities โ a full-screen launcher. The classic look is available via the Gnome Classic option at login. GNOME uses the GTK+ toolkit.
KDE Plasma
A large ecosystem of applications and development platform. Default on openSUSE, Mageia, Kubuntu, etc. KDE is built on the Qt library, giving it a distinctive appearance. It provides a configuration tool to ensure visual cohesion with GTK+ applications.
Xfce
A desktop environment focused on being aesthetically pleasing while consuming few resources. Its modular structure lets users activate or deactivate components as needed.
Others
- LXDE โ tailored for low resource consumption; good for older hardware and single-board computers.
- Cinnamon โ a fork of GNOME 3, provided by Linux Mint.
- MATE โ a fork of GNOME 2.
Applications built with different toolkits (GTK+ or Qt) can run simultaneously regardless of the desktop environment’s own toolkit.
Desktop Interoperability
The diversity of Linux desktop environments creates challenges for cross-environment compatibility. The freedesktop.org organization maintains a large body of shared specifications adopted (partially or fully) by most environments:
| Specification | Purpose |
|---|---|
| Directory locations | Where personal settings and user-specific files are stored |
| Desktop entries | .desktop files that describe available applications and how to launch them |
| Application autostart | Desktop entries that specify apps to start automatically after login |
| Drag and drop | How applications handle drag-and-drop events |
| Trash can | Common location for deleted files and methods to manage them |
| Icon themes | Common format for interchangeable icon libraries |
Non-Local Access
The X Window System supports remote graphical desktop sessions through the X Display Manager Control Protocol (XDMCP). An X display manager can control more than one graphical desktop session at the same time. Possible setups include:
- Switch between active graphical sessions on the same machine.
- Multiple sets of display devices on one machine, each running its own session.
- Remote graphical sessions sent over the network to a remote display.
XDMCP
XDMCP is X’s native remote desktop protocol. Drawbacks:
- High bandwidth usage โ rarely used over the internet or slow LANs.
- Security concerns โ a remote X display manager communicates with privileged procedures; a vulnerability could allow arbitrary privileged commands on the remote machine.
- Requires X instances on both ends of the connection.
VNC
Virtual Network Computing (VNC) uses the Remote Frame Buffer (RFB) protocol. Events from the local keyboard and mouse are sent to the remote desktop, which sends back screen updates.
Key facts:
- Each VNC server needs an exclusive TCP port; by convention, the first server uses port 5900, the second 5901, and so on.
- An ordinary user can start their own VNC server without special privileges.
~/.vnc/xstartupโ shell script executed by the VNC server at start; defines which desktop environment to make available.- VNC does not provide modern encryption or authentication natively โ use VPN or SSH tunnels to secure connections.
RDP
The Remote Desktop Protocol (RDP) is mainly used to access Microsoft Windows desktops remotely over TCP port 3389. Linux client implementations are open-source and licensed under the GPL.
Spice
Simple Protocol for Independent Computing Environments (Spice) is designed for virtualized systems. In addition to screen sharing, Spice offers native integration features: access to local devices (speakers, USB) from the remote machine, and file sharing between the two systems.
Remmina
Remmina is a graphical remote desktop client for Linux that integrates all four protocols (XDMCP, VNC, RDP, Spice) through a plugin system. It stores connection settings for later use.
Quick Reference
Desktop environments and their toolkits:
GNOME (Gnome Shell) โ GTK+ default on Fedora, Debian, Ubuntu, RHEL
KDE Plasma โ Qt default on openSUSE, Kubuntu, Mageia
Xfce โ GTK+ lightweight, modular
LXDE โ GTK+ minimal resource use, single-board computers
Cinnamon โ GTK+ Linux Mint, fork of GNOME 3
MATE โ GTK+ Linux Mint, fork of GNOME 2
Remote desktop protocols:
XDMCP X Display Manager Control Protocol X-native, high bandwidth, X required both ends
VNC Virtual Network Computing RFB protocol, port 5900/5901/โฆ, ~/.vnc/xstartup
RDP Remote Desktop Protocol Windows-native, TCP port 3389, open-source clients on Linux
Spice Simple Protocol for ICA Environments for virtualized systems, USB/audio passthrough
VNC file:
~/.vnc/xstartup shell script run by VNC server at start; sets desktop environment
Remmina: graphical Linux client with plugins for XDMCP, VNC, RDP, Spice
freedesktop.org specs:
.desktop files app entries (application launcher, autostart)
XDG directories standard personal settings locations
icon themes interchangeable icon library format
trash can common deleted-files location
Exam Questions
- Which toolkit does KDE use? โ Qt
- Which toolkit does GNOME use? โ GTK+
- What is a window manager? โ The desktop component that controls window placement, title bars, and switching.
- What are
.desktopfiles? โ Text files describing available applications used by the launcher and autostart. - What organization maintains cross-desktop interoperability specs? โ freedesktop.org
- What is XDMCP? โ X Display Manager Control Protocol โ X’s native remote desktop protocol; requires X on both ends.
- Why is XDMCP rarely used over the internet? โ High bandwidth usage and security concerns (privileged remote procedures).
- What protocol does VNC use? โ Remote Frame Buffer (RFB)
- What is the default TCP port for the first VNC server? โ 5900 (second: 5901, etc.)
- What does
~/.vnc/xstartupdo? โ Shell script run by the VNC server at startup; defines which desktop environment to offer. - Does VNC require encryption? โ No โ it must be secured externally via VPN or SSH tunnel.
- What TCP port does RDP use? โ 3389
- For what kind of systems is Spice designed? โ Virtualized systems.
- What extra features does Spice provide over other protocols? โ Access to local USB and audio devices from the remote machine, and file sharing.
- What is Remmina? โ A graphical remote desktop client for Linux with plugins for XDMCP, VNC, RDP, and Spice.
- Which protocol is best to access a remote Windows desktop? โ RDP
Exercises
Exercise 1 โ Terminal in a Desktop Environment
What type of application provides windowed shell sessions in the desktop environment?
Answer
A terminal emulator โ for example Konsole (KDE), GNOME Terminal, xterm, etc. It gives access to an interactive local shell session inside a graphical window.
Exercise 2 โ Toolkit Compatibility
The bittorrent client Transmission comes in two versions: transmission-gtk and transmission-qt. Which should be installed to ensure maximum integration with KDE?
Answer
transmission-qt โ KDE is built on the Qt library, so the Qt version integrates best with its widget style and theming.
Exercise 3 โ Lightweight Desktop Environments
What Linux desktop environments are recommended for low-cost single board computers with little processing power?
Answer
Xfce and LXDE โ both are lightweight and don’t use heavy visual effects, making them suitable for older hardware and single-board computers (e.g. Raspberry Pi).
Exercise 4 โ Copy and Paste in a Terminal
There are two ways to copy and paste text in the X Window System: Ctrl+C / Ctrl+V keystrokes and the mouse middle-button click to paste the selected text. What is the appropriate method in a terminal emulator?
Answer
The middle-button method. In interactive shell sessions Ctrl+C sends SIGINT (stops the running program), so it cannot be used for copy. Select text with the left button and paste with the middle button.
Exercise 5 โ Remote Windows Desktop
What protocol is best suited to access a remote Windows desktop from a Linux desktop environment?
Answer
RDP (Remote Desktop Protocol) โ it is natively supported by Windows and open-source Linux clients (licensed under GPL) implement it without legal restrictions.
LPIC-1 Study Notes | Topic 106: User Interfaces and Desktops