Linux GUI
Major Concepts
1. Display Server
- What it is: The low-level system that handles communication between your hardware (GPU, keyboard, mouse) and graphical apps.
- Examples:
- X11 (Xorg)—legacy but still common.
- Wayland—modern, secure, faster.
2. Display Manager (DM)
- What it is: The graphical login screen that lets you log into your user account and choose a desktop environment.
- Examples:
- GDM (GNOME Display Manager)
- LightDM
- SDDM (used by KDE)
- LXDM
3. Desktop Environment (DE)
- What it is: The full graphical interface: panel, file manager, window manager, settings, etc.
- Examples:
- GNOME (Ubuntu default)
- KDE Plasma
- XFCE
- LXQt
- Cinnamon, MATE
4. Window Manager (WM)
- What it is: Controls how windows behave—how they’re drawn, moved, minimized, tiled, etc.
-
- Types:
- Stacking WMs: GNOME Shell, Xfwm
- Tiling WMs: i3, bspwm, awesome
- Types:
Login Flow (Graphical Sessions)
🔄 High-Level Flow:
System Boot → systemd → DM → Login → Session (.desktop) → DE + WM on top of Display Server
🧩 Step-by-Step Breakdown:
1. System Boot
- Bootloader (GRUB) loads the kernel.
- The Linux kernel initializes the system.
systemd(or another init system) takes over.
2. Display Manager (DM) Starts
systemdstartsdisplay-manager.service- It:
- Launches the display server (like Xorg or Wayland)
- Presents the graphical login screen
- Lets you choose the session (e.g., GNOME, XFCE, custom WM)
- Authenticates the user
GDM Configuration
This file /etc/gdm3/custom.conf is the GDM (GNOME Display Manager) configuration file. It defines how GDM behaves during system startup and login. Most of the times, we disable Wayland:
WaylandEnable=false
It is useful for compatibility with remote desktop (like xrdp), NVIDIA drivers, or legacy apps. To apply changes (like WaylandEnable=false), you usually need to reboot or restart GDM:
sudo systemctl restart gdm3
3. User Login → Session Launch
- After successful login, the display manager:
- Reads the selected
.desktopsession file- Found in
/usr/share/xsessions/or/usr/share/wayland-sessions/
- Found in
- Reads the selected
- This file defines the session’s startup command:
Exec=env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu
Ubuntu Session
/usr/share/xsessions/ubuntu.desktop — available system-wide to all users.
When you log in graphically and select the "Ubuntu" session, the display manager reads this file and runs:
env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu
This starts the Ubuntu-flavored GNOME desktop environment.
4. Session Starts DE or WM
- The command in the
.desktopfile launches either:- A Desktop Environment (DE): full suite (panel, file manager, settings, etc.)
- e.g., GNOME, KDE, XFCE
- Or just a Window Manager (WM): lightweight control over windows only
- e.g., i3, bspwm
- A Desktop Environment (DE): full suite (panel, file manager, settings, etc.)