Skip to content

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

  1. Window Manager

    • Controls window display, movement, and resizing
    • Handles window decorations (title bar, borders)
    • Manages window layering and focus
  2. Display Manager

    • Provides graphical login interface
    • Common ones: GDM, LightDM, SDDM
  3. File Manager

    • Browse and manage filesystem
    • Provides graphical file operations
  4. 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

ShortcutFunction
SuperOpen Activities view
Super + AShow application grid
Super + TabSwitch applications
Super + TabSwitch windows
Super + arrowsTile windows
Super + DShow desktop
Super + LLock screen

Installing GNOME

bash
# 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-extra

KDE 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

ShortcutFunction
SuperOpen application launcher
Alt + TabSwitch windows
Ctrl + F1-F4Switch virtual desktops
Ctrl + F1Lock screen
Super + EOpen file manager
Super + LLock screen

Installing KDE Plasma

bash
# Debian/Ubuntu
sudo apt install kde-plasma-desktop

# Fedora
sudo dnf install @kde-desktop-environment

# Arch Linux
sudo pacman -S plasma kde-applications

Xfce

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

bash
# Debian/Ubuntu
sudo apt install xfce4 xfce4-goodies

# Fedora
sudo dnf install @xfce-desktop-environment

# Arch Linux
sudo pacman -S xfce4 xfce4-goodies

MATE

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

bash
# Debian/Ubuntu
sudo apt install mate-desktop-environment

# Fedora
sudo dnf install @mate-desktop-environment

# Arch Linux
sudo pacman -S mate mate-extra

Cinnamon

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

bash
# Debian/Ubuntu
sudo apt install cinnamon-desktop-environment

# Fedora
sudo dnf install @cinnamon-desktop-environment

# Arch Linux
sudo pacman -S cinnamon

Desktop 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

ShortcutFunction
Mod + EnterOpen terminal
Mod + DOpen application launcher
Mod + arrowsSwitch focus
Mod + Shift + arrowsMove window
Mod + numberSwitch workspace
Mod + Shift + QClose 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 wayland

Common Desktop Applications

File Managers

ApplicationDesktop EnvironmentFeatures
NautilusGNOMEClean, modern
DolphinKDEFeature-rich
ThunarXfceLightweight and fast
NemoCinnamonTraditional and practical

Terminal Emulators

ApplicationFeatures
GNOME TerminalGNOME default, feature-complete
KonsoleKDE default, highly customizable
TerminatorSupports split screen
AlacrittyGPU-accelerated, extremely fast
kittyModern, feature-rich

Text Editors

ApplicationFeatures
geditGNOME default, simple and easy to use
KateKDE default, powerful
MousepadXfce default, lightweight
VS CodePopular code editor

Customizing Desktop Environment

GNOME Extensions

bash
# 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:

  1. System Settings → Appearance

    • Global theme
    • Plasma style
    • Window decorations
    • Icons
  2. Right-click desktop → Configure desktop

    • Wallpaper
    • Layout
  3. Right-click panel → Configure panel

    • Add widgets
    • Adjust position and size

Themes and Icons

bash
# 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:

  1. At login screen, before entering password
  2. Find "Session" or gear icon
  3. Select the desktop environment you want to use
  4. 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

Content is for learning and research only.