Lightweight Window Managers and Desktops
Install and configure i3, Sway, and Openbox on Linux. Learn tiling vs floating WMs, minimal session setup, status bars, and autostart with systemd.
Before you start
- ▸A working Linux installation with a user account that has sudo privileges
- ▸A display manager (GDM, LightDM, SDDM) already installed, or comfort with TTY login
- ▸Basic familiarity with editing text config files in a terminal
Full desktop environments like GNOME and KDE Plasma are polished and feature-rich, but they consume significant RAM, load many background services, and make assumptions about how you want to work. Lightweight window managers hand control back to you: boot into a 200 MB RAM footprint, compose your own toolchain, and build a workflow that does exactly what you need — nothing more. This guide covers the most practical options (i3, Sway, and Openbox), how to install and configure each, and how to decide which fits your situation.
Choosing the Right Tool
Before installing anything, understand the landscape:
- i3 — X11 tiling WM. Keyboard-driven, scriptable, massive community, extensive documentation. Works everywhere X11 does.
- Sway — Wayland tiling WM, drop-in spiritual successor to i3. Nearly identical config syntax, but native Wayland. Prefer this on modern hardware unless you need specific X11-only software.
- Openbox — X11 floating WM. Stacking window manager with right-click menus, minimal resource use, works well as the WM beneath LXDE or standalone. Good for users transitioning from traditional desktops.
A rough decision rule: new hardware with no X11 dependencies → Sway. Need X11 or running on older hardware → i3. Want a traditional floating layout with minimal overhead → Openbox.
Installing a Lightweight WM
i3 (X11)
Debian/Ubuntu:
sudo apt install i3 i3status dmenu xterm
Fedora/RHEL family:
sudo dnf install i3 i3status dmenu xterm
Arch:
sudo pacman -S i3-wm i3status dmenu xterm
On Arch, i3-wm is the window manager package; i3 is a group that also pulls in i3lock and i3status.
Sway (Wayland)
Debian/Ubuntu (22.04+):
sudo apt install sway swaybar swaybg swaylock waybar foot
Fedora:
sudo dnf install sway waybar foot
Arch:
sudo pacman -S sway waybar foot swaylock swayidle
foot is a fast Wayland-native terminal. You can substitute alacritty or kitty if preferred.
Openbox (X11 floating)
Debian/Ubuntu:
sudo apt install openbox obconf lxappearance tint2 feh
Fedora:
sudo dnf install openbox obconf tint2 feh
Arch:
sudo pacman -S openbox obconf tint2 feh
Starting Your WM
From a Display Manager
Most display managers (GDM, SDDM, LightDM) detect installed session files automatically. After installation, log out and choose the new session from your login screen's session selector. i3 and Openbox install .desktop files into /usr/share/xsessions/; Sway installs into /usr/share/wayland-sessions/.
Without a Display Manager (TTY login)
For i3 or Openbox, add this to ~/.bash_profile or ~/.zprofile:
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
Then set ~/.xinitrc:
exec i3
# or: exec openbox-session
For Sway from TTY:
[[ -z $WAYLAND_DISPLAY && $XDG_VTNR -eq 1 ]] && exec sway
Basic Configuration
i3 and Sway
On first launch, i3 asks you to generate a default config. Accept, or copy the default manually:
mkdir -p ~/.config/i3
cp /etc/i3/config ~/.config/i3/config
Sway's config lives at ~/.config/sway/config. The syntax is nearly identical to i3. Key directives to know:
# Set modifier key (Mod4 = Super/Win key)
set $mod Mod4
# Launch terminal
bindsym $mod+Return exec foot
# Application launcher (wofi for Wayland, dmenu for X11)
bindsym $mod+d exec wofi --show run
# Reload config
bindsym $mod+Shift+r reload
# Kill focused window
bindsym $mod+Shift+q kill
# Switch workspaces
bindsym $mod+1 workspace number 1
The tiling model in i3/Sway splits the screen into containers. By default Mod+Enter opens a terminal, Mod+h/v switches split direction, and Mod+f toggles fullscreen. Everything is reachable without a mouse once you learn the bindings.
Status Bar
i3 ships with i3status and reads ~/.config/i3status/config. A minimal example:
general {
interval = 5
}
order += "disk /"
order += "memory"
order += "tztime local"
disk "/" {
format = "%avail"
}
memory {
format = "%used / %total"
threshold_degraded = "1G"
}
tztime local {
format = "%Y-%m-%d %H:%M"
}
For Sway, waybar is the de facto standard and supports Wayland properly. Its config at ~/.config/waybar/config is JSON-based; the default installed config is a working starting point.
Openbox
Openbox stores per-user config in ~/.config/openbox/. Populate it from system defaults:
mkdir -p ~/.config/openbox
cp /etc/xdg/openbox/{rc.xml,menu.xml,autostart} ~/.config/openbox/
The right-click desktop menu is defined in menu.xml. Add application launchers there. The autostart file runs commands at session start — set wallpaper and start your panel:
feh --bg-scale ~/Pictures/wallpaper.jpg &
tint2 &
obconf provides a GUI for themes and window behavior. lxappearance controls GTK themes across all apps.
Essential Supporting Software
A bare WM handles only window placement. You will typically also want:
- Application launcher:
dmenuorrofi(X11),wofiorfuzzel(Wayland) - Notification daemon:
dunst(works on both X11 and Wayland) - Compositor: i3 has none built-in — add
picomfor transparency/shadows. Sway and Openbox (with a compositor) handle this differently; Sway composites natively. - Screen locker:
i3lock(X11),swaylock(Wayland) - PolicyKit agent:
lxpolkitorpolkit-gnome— needed for GUI apps that request elevated privileges - Network manager applet:
nm-appletintegrates with NetworkManager and works in the system tray
Autostart with systemd User Services
For daemons you want reliably started regardless of how you log in, use systemd user units. Example for dunst:
systemctl --user enable --now dunst.service
Sway also integrates with systemd --user via sway-session.target. Any unit that declares PartOf=graphical-session.target and WantedBy=sway-session.target will start and stop with your Sway session automatically.
Verification
After logging into your new WM, confirm it is actually running:
# For i3 or Openbox (X11)
xprop -root _NET_WM_NAME
# Output will include the WM name, e.g. "i3" or "Openbox"
# For Sway
swaymsg -t get_version
Check memory footprint to confirm you gained the expected savings:
free -h
A minimal i3 or Sway session with a terminal and status bar typically sits under 300 MB total system RAM on a clean install.
Troubleshooting
No audio controls or media keys
WMs do not manage audio policy. Install pipewire + wireplumber (modern) or pulseaudio, then add keybindings in your WM config that call pactl or wpctl to adjust volume.
GTK apps look unstyled or broken
Without a full DE, GTK theme and icon settings are not applied automatically. Run lxappearance once to write ~/.gtkrc-2.0 and ~/.config/gtk-3.0/settings.ini. For GTK4 apps, set environment variable GTK_THEME=Adwaita in your session startup.
Screen sharing / screencasting fails under Sway
Wayland screen capture requires xdg-desktop-portal-wlr (or xdg-desktop-portal-hyprland if using Hyprland). Install it and ensure pipewire is running. Most browsers will then detect the portal automatically.
i3/Openbox launched but display manager still loads GNOME by default
The display manager remembers your last session. Log out, click the session chooser icon on the login screen, select your WM, then log in. It will remember the choice next time.
Frequently asked questions
- Can I run i3 and Sway on the same machine and switch between them?
- Yes. Both install separate session files and configs. Select the desired session from your display manager login screen, and each maintains its own config in ~/.config/i3 and ~/.config/sway respectively.
- Will my GTK and Qt apps still look decent without a full desktop environment?
- They will, but you need to set themes manually. Use lxappearance for GTK and qt5ct or kvantum for Qt apps, and set QT_QPA_PLATFORMTHEME=qt5ct in your session environment.
- Does Sway support NVIDIA GPUs?
- Sway works with NVIDIA on driver version 495 and later using the proprietary driver, but you must set the environment variable WLR_NO_HARDWARE_CURSORS=1 and launch with --unsupported-gpu if you encounter issues. Intel and AMD work out of the box.
- What is the difference between a window manager and a desktop environment?
- A window manager only handles drawing and positioning windows. A desktop environment bundles a WM together with a file manager, settings daemon, notification system, panel, and tightly integrated apps — GNOME and KDE Plasma are full DEs.
- Can I add a file manager or system tray to i3 without losing its lightweight nature?
- Yes. Launch pcmanfm or thunar as your file manager, and i3bar or polybar provides a system tray. RAM usage will increase modestly but you remain well below a full DE footprint.
Related guides
Linux Clipboards Explained (+ Clipboard Managers)
Learn the difference between Linux's PRIMARY and CLIPBOARD selections, use xclip, xsel, and wl-clipboard from the terminal, and manage history with GPaste or Klipper.
Configure LibreOffice for Daily Use
Configure LibreOffice for daily use: set default save formats for MS Office interop, tune autosave, install fonts, and add productivity extensions.
Configure the Touchpad and Multitouch Gestures
Configure Linux touchpad behavior and multitouch gestures using libinput, libinput-gestures, and native GNOME and KDE Plasma settings on both Wayland and X11.
Wayland vs X11: How to Choose and Configure Each
Know when to run Wayland or X11, how to check your current session, switch at login with GDM/SDDM/LightDM, and handle NVIDIA and XWayland edge cases.