Desktop Environment
What is a Desktop Environment?
A desktop environment (DE) is a graphical user interface running above the operating system that provides window management, file management, system settings, application launchers, and more. Unlike Windows and macOS which only have one desktop, Linux provides multiple desktop environments to choose from.
Components of Desktop Environment
A complete desktop environment typically includes the following components:
┌───────────────────────────────────────────────────────┐
│ Desktop Environment (Desktop Environment) │
├─────────────────────────────────────────────────────┤
│ ┌─────────┐ ┌─────────┐ ┌─────────────┐ │
│ │ 窗口管理器│ │ 文件管理器│ │ 系统设置 │ │
│ └─────────┘ └─────────┘ └─────────────┘ │
│ ┌─────────┐ ┌─────────┐ ┌─────────────┐ │
│ │ 面板 │ │ 通知系统 │ │ 应用程序 │ │
│ └─────────┘ └─────────┘ └─────────────┘ │
├─────────────────────────────────────────────────────┤
│ Display Server (X11 / Wayland) │
├─────────────────────────────────────────────────────┤
│ Linux Kernel │
└─────────────────────────────────────────────┘Core Components
Window Manager
- Controls window display, movement, and resizing
- Handles window decorations (title bar, borders)
- Manages window layering and focus
Display Manager
- Provides graphical login interface
- Common ones: GDM, LightDM, SDDM
File Manager
- Browse and manage filesystem
- Provides graphical file operations
Panel/Taskbar
- Application launchers
- System tray
- Clock and notifications
Major Desktop Environments
GNOME
Overview
GNOME (GNU Network Object Model Environment) is one of the most popular Linux desktop environments, adopted by Ubuntu, Fedora, and other mainstream distributions as default.
Features
- Modern, clean design
- Activities view (Activities) for central window and application management
- Powerful search functionality
- Rich extension ecosystem
Interface Overview
┌────────────────────────────────────────────────────────┐
│ 活动 日期/时间 系统托盘图标 │ ← 顶栏
├────────────────────────────────────────────────────────┤
│ │
│ │
│ 工作区域 │
│ │
│ │
├────────────────────────────────────────────────────────┤
│ 收藏的应用程序图标 显示应用程序网格 │ ← Dock
└────────────────────────────────────────────────────────┘Common Shortcuts
| Shortcut | Function |
|---|---|
Super | Open Activities view |
Super + A | Show application grid |
Super + Tab | Switch applications |
Super + Tab | Switch windows |
Super + arrows | Tile windows |
Super + D | Show desktop |
Super + L | Lock screen |
Installing GNOME
# Debian/Ubuntu
sudo apt install gnome-shell ubuntu-gnome-desktop
# Fedora (default installed)
sudo dnf install @gnome-desktop
# Arch Linux
sudo pacman -S gnome gnome-extraKDE Plasma
Overview
KDE Plasma is the most feature-rich desktop environment, known for high customizability.
Features
- Extremely high customizability
- Windows-style traditional layout
- Rich built-in tools
- Excellent performance
Interface Overview
┌────────────────────────────────────────────────────────┐
│ │
│ 工作区域 │
│ │
│ │
├────────────────────────────────────────────────────────┤
│ 开始菜单 任务栏图标 系统托盘 时钟 显示桌面 │ ← 面板
└────────────────────────────────────────────────────────┘Common Shortcuts
| Shortcut | Function |
|---|---|
Super | Open application launcher |
Alt + Tab | Switch windows |
Ctrl + F1-F4 | Switch virtual desktops |
Ctrl + F1 | Lock screen |
Super + E | Open file manager |
Super + L | Lock screen |
Installing KDE Plasma
# Debian/Ubuntu
sudo apt install kde-plasma-desktop
# Fedora
sudo dnf install @kde-desktop-environment
# Arch Linux
sudo pacman -S plasma kde-applicationsXfce
Overview
Xfce is a lightweight desktop environment, focusing on performance and low resource usage.
Features
- Lightweight and fast
- Traditional desktop layout
- Stable and reliable
- Suitable for older hardware
Installing Xfce
# Debian/Ubuntu
sudo apt install xfce4 xfce4-goodies
# Fedora
sudo dnf install @xfce-desktop-environment
# Arch Linux
sudo pacman -S xfce4 xfce4-goodiesMATE
Overview
MATE is the continuation of GNOME 2, providing traditional desktop experience.
Features
- Classic dual-panel layout
- Lightweight
- Highly customizable
- User-friendly for veteran users
Installing MATE
# Debian/Ubuntu
sudo apt install mate-desktop-environment
# Fedora
sudo dnf install @mate-desktop-environment
# Arch Linux
sudo pacman -S mate mate-extraCinnamon
Overview
Cinnamon is Linux Mint's default desktop environment, providing a modern but traditional experience.
Features
- Windows-like layout
- Beginner-friendly
- Beautiful and feature-rich
- Active development
Installing Cinnamon
# Debian/Ubuntu
sudo apt install cinnamon-desktop-environment
# Fedora
sudo dnf install @cinnamon-desktop-environment
# Arch Linux
sudo pacman -S cinnamonDesktop Environment Comparison
| Feature | GNOME | KDE Plasma | Xfce | MATE | Cinnamon | |---------|-------|-----------|------|-----|------|----------| | Memory Usage | Medium | Medium | Low | Low | Low | Medium | | Customizability | Medium | Extremely High | High | High | High | | Learning Curve | Medium | Low | Low | Low | Low | | Modern feel | High | High | Medium | Low | Medium | | Stability | High | High | Extremely high | Extremely high |
Window Managers
Window managers are core components of desktop environments and can also be used independently.
Stacking Window Managers
Windows can overlap, similar to traditional desktops:
- Openbox
- Fluxbox
- IceWM
Tiling Window Managers
Windows automatically arrange without overlap:
- i3
- Sway (Wayland)
- bspwm
- awesome
i3 Window Manager Example
┌─────────────────┬─────────────────┐
│ │ │
│ 终端 1 │ 终端 2 │
│ │ │
├─────────────────┼─────────────────┤
│ 编辑器 │ 浏览器 │
│ │ │
├─────────────────┼─────────────────┤
│ │ │
└─────────────────┴─────────────────┘i3 Common Shortcuts
| Shortcut | Function |
|---|---|
Mod + Enter | Open terminal |
Mod + D | Open application launcher |
Mod + arrows | Switch focus |
Mod + Shift + arrows | Move window |
Mod + number | Switch workspace |
Mod + Shift + Q | Close window |
## Display Servers
### X11 (X Window System)
- Released in 1987, has long history
- Client-server architecture
- Feature-rich but old design
- Good compatibility
### Wayland
- Modern display protocol
- Better security
- Smoother graphics performance
- Gradually becoming mainstream
**Check Current Display Server**
```bash
echo $XDG_SESSION_TYPE
# Output x11 or waylandCommon Desktop Applications
File Managers
| Application | Desktop Environment | Features |
|---|---|---|
| Nautilus | GNOME | Clean, modern |
| Dolphin | KDE | Feature-rich |
| Thunar | Xfce | Lightweight and fast |
| Nemo | Cinnamon | Traditional and practical |
Terminal Emulators
| Application | Features |
|---|---|
| GNOME Terminal | GNOME default, feature-complete |
| Konsole | KDE default, highly customizable |
| Terminator | Supports split screen |
| Alacritty | GPU-accelerated, extremely fast |
| kitty | Modern, feature-rich |
Text Editors
| Application | Features |
|---|---|
| gedit | GNOME default, simple and easy to use |
| Kate | KDE default, powerful |
| Mousepad | Xfce default, lightweight |
| VS Code | Popular code editor |
Customizing Desktop Environment
GNOME Extensions
# Install extension manager
$ sudo apt install gnome-shell-extension-manager
# Or use GNOME Extensions website
# https://extensions.gnome.org/Recommended Extensions
- Dash to Dock: Keeps dock visible
- AppIndicator: System tray support
- User Themes: Custom themes
- Clipboard History: Clipboard history
KDE Plasma Customization
KDE Plasma provides rich configuration options:
System Settings → Appearance
- Global theme
- Plasma style
- Window decorations
- Icons
Right-click desktop → Configure desktop
- Wallpaper
- Layout
Right-click panel → Configure panel
- Add widgets
- Adjust position and size
Themes and Icons
# Install themes
# Debian/Ubuntu
sudo apt install arc-theme papirus-icon-theme
# Manual installation
# Put theme files in ~/.themes/
# Put icons in ~/.icons/Switching Desktop Environments
After installing multiple desktop environments, you can switch between them at the login screen:
- At login screen, before entering password
- Find "Session" or gear icon
- Select the desktop environment you want to use
- Enter password to login
Summary
Linux provides rich desktop environment choices:
- GNOME: Modern and clean, suitable for users who like new-style design
- KDE Plasma: Feature-rich, suitable for users who like customization
- Xfce/MATE: Lightweight and fast, suitable for older hardware or users seeking efficiency
- Cinnamon: Traditional layout, suitable for users coming from Windows
- Tiling window managers: High efficiency, suitable for keyboard enthusiasts and advanced users
Choosing the desktop environment that suits you is an important part of Linux experience. Try several to find the one that fits you best.
Previous chapter: Installing Linux
Next chapter: Terminal Basics