Openbox Window Manager Setup Guide for Arch Linux
Openbox is an extremely lightweight and fast window manager that provides a minimal desktop environment perfect for older hardware, resource-constrained systems, or users who prefer a streamlined computing experience. This guide walks you through the complete installation and configuration process on Arch Linux.
What is Openbox?
Openbox is a stacking window manager that focuses on speed, simplicity, and standards compliance. Unlike full desktop environments like GNOME or KDE, Openbox provides just the window management functionality, allowing you to build a custom desktop experience tailored to your needs.
Key Benefits:
- Extremely lightweight: Minimal system resource usage
- Fast startup: Boots significantly faster than full desktop environments
- Highly customizable: Extensive theming and configuration options
- Standards compliant: Follows freedesktop.org specifications
- Stable and mature: Well-tested and reliable codebase
Prerequisites
Before starting, ensure you have:
- A working Arch Linux installation
- Root or sudo access for package installation
- Basic familiarity with command-line operations
- X11 display server (will be installed as part of this guide)
Installation Process
Step 1: Install Required Packages
Install Openbox and essential components using the pacman package manager:
sudo pacman -Sy --noconfirm --needed openbox xorg-server xorg-xinit xterm greetd greetd-tuigreet ttf-dejavu ttf-liberation
Package Breakdown:
openbox
: The window manager itselfxorg-server
: X11 display serverxorg-xinit
: X11 initialization scriptsxterm
: Basic terminal emulatorgreetd
: Modern display managergreetd-tuigreet
: Text-based greeter for greetdttf-dejavu
&ttf-liberation
: Essential fonts for proper text rendering
Step 2: Configure Display Manager
Configure greetd
Edit the greetd configuration file to use the TUI greeter:
sudo nano /etc/greetd/config.toml
Add the following configuration:
[terminal]
vt = 1
[default_session]
command = "tuigreet --cmd startx"
user = "greeter"
Configuration Explanation:
vt = 1
: Uses virtual terminal 1 for the greetercommand = "tuigreet --cmd startx"
: Launches the TUI greeter with startx commanduser = "greeter"
: Runs the greeter as the greeter user
Step 3: Configure X11 Initialization
Create the X11 initialization script for your user:
nano ~/.xinitrc
Add the following content:
exec openbox-session
This tells X11 to start Openbox when the X server launches.
Step 4: Enable and Start Services
Enable and start the greetd service:
sudo systemctl enable --now greetd
The --now
flag both enables the service for boot and starts it immediately.
Post-Installation Configuration
Basic Openbox Configuration
Openbox stores its configuration in ~/.config/openbox/
. The main configuration files are:
rc.xml
: Main configuration file for keybindings, themes, and behaviormenu.xml
: Right-click context menu configurationautostart
: Applications to launch automatically
Generate default configuration files:
mkdir -p ~/.config/openbox
cp /etc/xdg/openbox/* ~/.config/openbox/
Essential Applications
Since Openbox is minimal, you’ll want to install additional applications:
File Manager:
sudo pacman -S thunar # Or use ranger for terminal-based file management
For comprehensive file management operations and advanced ranger usage, see the ranger file manager cheatsheet.
Application Launcher:
sudo pacman -S dmenu rofi # Lightweight application launchers
System Panel:
sudo pacman -S tint2 # Lightweight panel/taskbar
Network Manager:
sudo pacman -S network-manager-applet
Customization Options
Themes:
- Install additional themes:
sudo pacman -S openbox-themes
- Configure themes in
~/.config/openbox/rc.xml
Keybindings:
- Customize keyboard shortcuts in
~/.config/openbox/rc.xml
- Common shortcuts include window management, application launching, and workspace switching
Autostart Applications:
- Add applications to
~/.config/openbox/autostart
- Include system tray applications, wallpaper setters, and other utilities
Troubleshooting
Common Issues
Black Screen After Login:
- Verify
.xinitrc
exists and containsexec openbox-session
- Check X11 logs:
journalctl -u display-manager
No Mouse Cursor:
- Install cursor theme:
sudo pacman -S xcursor-themes
Applications Not Launching:
- Ensure applications are installed and in PATH
- Check if additional dependencies are needed
Font Rendering Issues:
- Install additional fonts:
sudo pacman -S noto-fonts
- Configure fontconfig if needed
Performance Optimization
Reduce Startup Time:
- Remove unnecessary applications from autostart
- Use lightweight alternatives for common applications
- Disable unused services
Memory Usage:
- Monitor resource usage with
htop
- Use terminal-based applications when possible
- Configure swap appropriately for your system
Security Considerations
- Keep greetd and Openbox updated regularly
- Use strong authentication methods
- Consider additional security tools for system monitoring
- Review autostart applications for potential security risks
Advanced Configuration
Package Management Integration
Since Openbox requires manual installation of applications, efficient package management becomes crucial. The pacman cheatsheet provides comprehensive commands for:
- Searching packages: Use
pacman -Ss application-name
to find lightweight alternatives - Installing groups: Install entire desktop component groups with
sudo pacman -S group-name
- Managing dependencies: Remove orphaned packages with
sudo pacman -Rs $(pacman -Qtdq)
- System maintenance: Keep your minimal system updated and optimized
This integration ensures your Openbox environment remains lean while having access to necessary applications.
Multiple Monitor Setup
For multi-monitor configurations, use xrandr
:
xrandr --output HDMI-1 --right-of eDP-1
Add monitor configuration to ~/.config/openbox/autostart
for persistence.
Integration with Other Tools
Terminal Multiplexer: Consider using tmux for enhanced terminal management with features like session persistence, pane splitting, and custom keybindings that complement Openbox’s lightweight philosophy.
Development Environment: Configure Neovim for code editing within the lightweight environment. The comprehensive Neovim guide covers LSP setup, plugin management, and productivity features that work excellently in minimal desktop environments.
References and Resources
- Openbox Official Documentation
- Arch Linux Openbox Wiki
- greetd Documentation
- Openbox Configuration Examples
Questions Answered in This Document
Q: What is Openbox and why should I use it? A: Openbox is an extremely lightweight window manager that provides fast startup times and minimal resource usage, making it ideal for older hardware or users who prefer a streamlined desktop experience.
Q: How do I install Openbox on Arch Linux?
A: Install using pacman: sudo pacman -Sy openbox xorg-server xorg-xinit xterm greetd greetd-tuigreet ttf-dejavu ttf-liberation
, then configure greetd and create a .xinitrc
file.
Q: What display manager should I use with Openbox? A: This guide uses greetd with tuigreet, which is lightweight and modern, but you can also use other display managers like LightDM or SDDM.
Q: How do I configure Openbox after installation?
A: Copy default configuration files to ~/.config/openbox/
and customize rc.xml
for keybindings and themes, menu.xml
for context menus, and autostart
for automatic applications.
Q: What applications should I install with Openbox? A: Essential applications include a file manager (Thunar), application launcher (dmenu/rofi), system panel (tint2), and network manager applet for a complete desktop experience.
Q: How do I troubleshoot a black screen after login?
A: Check that .xinitrc
exists and contains exec openbox-session
, verify X11 logs with journalctl -u display-manager
, and ensure all required packages are installed.
Q: Can I use Openbox with multiple monitors?
A: Yes, configure multi-monitor setups using xrandr
commands and add them to the ~/.config/openbox/autostart
file for persistence.
Q: How do I customize Openbox themes and appearance?
A: Install additional themes with sudo pacman -S openbox-themes
and configure them in the ~/.config/openbox/rc.xml
file under the theme section.
Q: Is Openbox suitable for daily use? A: Yes, Openbox is stable and mature, suitable for daily use especially on systems where performance and resource usage are priorities, though it requires more manual configuration than full desktop environments.
Q: How do I add a system panel or taskbar to Openbox?
A: Install and configure a lightweight panel like tint2 (sudo pacman -S tint2
) and add it to your ~/.config/openbox/autostart
file to launch automatically.