A beautiful, deterministic GTK frontend for linux-wallpaperengine, designed to work everywhere on Linux.
Standalone Operation: Single Python file, no external dependencies. NixOS-style determinism.
- π¨ Beautiful GTK3 Interface: Intuitive FlowBox-based wallpaper browser
- π³ Containerization Support: Optional Docker isolation for crash protection (standalone, no external scripts)
- π‘οΈ AMD GPU Workarounds: Built-in radeonsi driver crash prevention
- π― Smart Argument Filtering: Automatically prevents crashes in single-process mode
- βοΈ Advanced Settings: CEF arguments, environment variables, and workarounds
- π± System Tray Integration: Minimize to tray with AppIndicator3
- π΅ Audio Controls: Volume slider and mute toggle
- π Auto-Detection: Automatically finds wallpapers and backend executable using XDG standards
You only need the standalone Python file:
# Download just the application
curl -O https://raw.githubusercontent.com/abcdqfr/linux-wallpaperengine-gtk/main/linux-wallpaperengine-gtk.py
# Or using wget
wget https://raw.githubusercontent.com/abcdqfr/linux-wallpaperengine-gtk/main/linux-wallpaperengine-gtk.py
# Make executable
chmod +x linux-wallpaperengine-gtk.py
# Run (will check dependencies and provide installation instructions if needed)
./linux-wallpaperengine-gtk.pyThat's it! The standalone file is all you need. If any dependencies are missing, the application will detect your distribution and provide specific installation commands. All other files in this repository are for developers only.
π¦ System Dependencies (Auto-Detected)
The application automatically checks for required dependencies and provides distro-specific installation instructions if anything is missing. Required system packages:
- Python 3.8+ - Usually pre-installed on modern Linux distributions
- GTK3/PyGObject - Python bindings for GTK3 (auto-detected with installation commands)
If you prefer to install dependencies manually:
Ubuntu/Debian/Mint:
sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0Fedora:
sudo dnf install python3-gobject gtk3Arch Linux:
sudo pacman -S python-gobject gtk3NixOS:
nix-env -iA nixos.python3Packages.pygobject3 nixos.gtk3openSUSE:
sudo zypper install python3-gobject gtk3π§ Developer Setup
If you're contributing or developing:
# Clone the full repository
git clone https://github.com/abcdqfr/linux-wallpaperengine-gtk.git
cd linux-wallpaperengine-gtk
# Make executable
chmod +x linux-wallpaperengine-gtk.py
# Run
./linux-wallpaperengine-gtk.pyNote: Other files (.gitignore, .github/, .pre-commit-config.yaml, .releaserc.json) are developer tooling and not needed for end users.
-
Launch the application
./linux-wallpaperengine-gtk.py
-
Browse wallpapers - Use arrow keys or mouse to navigate the FlowBox grid
-
Select a wallpaper - Click to launch, or use Enter key
-
Access settings - Click the βοΈ button in the toolbar
βοΈ Advanced Features
Run wallpapers in Docker for complete isolation (standalone, no external scripts):
- Enable in Settings > Advanced > Containerization
- Requires Docker installed and user in
dockergroup - Automatically detected if available
- Uses direct
docker runcommands (no external scripts needed)
Built-in fixes for AMD GPU crashes:
- Enable in Settings > Advanced > Radeonsi Workarounds
- Automatically applied based on detected GPU
- Individual workarounds can be toggled
Configure CEF arguments for advanced users:
- Intel Graphics Fix: Optimized settings for Intel graphics
- Debug Mode: Enable CEF debugging and logging
- Performance Mode: Optimize for performance
- Custom Arguments: Add your own CEF arguments
ποΈ Architecture
This project uses a single-file monolithic structure optimized for:
- β Agentic coding workflows
- β Simple distribution (one file)
- β Easy maintenance
- β Deterministic behavior
- β Standalone operation (no external files)
- EnvironmentDetector: Comprehensive environment detection (distro, compositor, GPU, display)
- WallpaperEngine: Core wallpaper management, process lifecycle, containerization
- WallpaperWindow: Main GTK UI window with FlowBox, toolbar, status bar
- SettingsDialog: Configuration management with Advanced tab
- WallpaperContextMenu: Right-click context menu functionality
The application is designed to work everywhere by:
- Detecting environment (distro, compositor, GPU, display server)
- Using XDG Base Directory Standard for paths
- Graceful degradation when features unavailable
- No hardcoded paths or assumptions
- Standalone container execution (no external scripts)
π§ Troubleshooting
Wallpaper not launching
- Check that
linux-wallpaperengineis installed and in PATH - Verify display detection:
xrandr(X11) orswaymsg -t get_outputs(Wayland) - Check logs:
DEBUG=1 ./linux-wallpaperengine-gtk.py
CEF crashes
- Enable Intel Graphics Fix preset in Advanced settings
- Try containerization mode for isolation
- Check GPU driver:
lspci | grep VGA
UI not responding
- Ensure GTK 3.36+ is installed:
pkg-config --modversion gtk+-3.0 - Check for Wayland compatibility issues
- Try X11 session if on Wayland
Containerization not working
- Verify Docker is installed:
docker --version - Check user is in docker group:
groups | grep docker - Test Docker access:
docker ps
Enable verbose logging:
DEBUG=1 ./linux-wallpaperengine-gtk.pyπΊοΈ Roadmap & Feature Status
- π¨ Beautiful GTK3 Interface: Intuitive FlowBox-based wallpaper browser
- π³ Containerization Support: Optional Docker isolation for crash protection (standalone, no external scripts)
- π‘οΈ AMD GPU Workarounds: Built-in radeonsi driver crash prevention
- π― Smart Argument Filtering: Automatically prevents crashes in single-process mode
- βοΈ Advanced Settings: CEF arguments, environment variables, and workarounds
- π± System Tray Integration: Minimize to tray with AppIndicator3
- π΅ Audio Controls: Volume slider and mute toggle
- π Auto-Detection: Automatically finds wallpapers and backend executable using XDG standards
- β Single-file monolithic structure
- β Standalone containerization (no external scripts)
- β Comprehensive environment detection
- β XDG-based path resolution
- β Radeonsi workarounds
- β Smart argument filtering
- β System tray integration
- β Standalone Docker execution
- π₯οΈ Desktop Icon & Menu Entry: .desktop file for application menu integration (needs portable path fix)
- π Playlist Management: Create and manage wallpaper playlists (planned)
Note: The main Features section (top of README) only lists implemented features for clarity. Partial and planned features are tracked here in the Roadmap and in the FEATURES list (linux-wallpaperengine-gtk.py).
π€ Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes (keep it monolithic and standalone!)
- Test on multiple distros/compositors
- Commit:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
- Keep it monolithic: Single file structure
- Keep it standalone: No external file dependencies
- Test everywhere: Try on different distros/compositors
- Document assumptions: If you assume something, detect it instead
- Use XDG standards: For paths and configuration
MIT License - see LICENSE file for details.
- linux-wallpaperengine - The core wallpaper engine (maintained by almamu)
- GTK community for the excellent UI framework
π Additional Documentation
Philosophy: NixOS-Style Determinism in a Single File
Goal: One Python file that works on ALL Linux distros, compositors, drivers, setups
Approach: Declarative detection, graceful fallbacks, zero assumptions
The application uses comprehensive environment detection:
- Distro Detection: NixOS, Arch, Ubuntu, Fedora, Debian, etc. (via
/etc/os-release, distro-specific files) - Compositor Detection: Mutter (GNOME), KWin (KDE), Sway, Hyprland, River (via process detection)
- Display Server Detection: X11, Wayland, XWayland (via environment variables)
- GPU Detection: AMD/RadeonSI, Intel, NVIDIA (via
lspciandlsmod) - Path Resolution: XDG Base Directory Standard, distro-specific conventions, Flatpak/Snap paths
- Capability Detection: Docker/Podman availability, GTK version, permissions
- Detect Everything, Assume Nothing: All environment aspects are detected upfront
- XDG Standards: Use XDG Base Directory Standard for all paths
- Graceful Degradation: Work even if some features unavailable
- Standalone Operation: No external scripts or files required
π³ Containerization Details
The application uses direct docker run commands - no external scripts needed.
- Docker or Podman installed
- User in
dockergroup (or usesudo) - Base container image (e.g.,
ubuntu:22.04)
-
Detects Docker/Podman availability
-
Builds
docker runcommand with:- GPU device access (
--device=/dev/dri) - X11/Wayland display forwarding
- Environment variables (workarounds, etc.)
- Resource limits (memory, CPU)
- Security settings (required for GPU)
- GPU device access (
-
Executes directly - no wrapper scripts
If you need to run manually:
docker run --rm \
--device=/dev/dri \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v /path/to/wpe:/path/to/wpe:ro \
--network=host \
ubuntu:22.04 \
/path/to/linux-wallpaperengine [args]π‘οΈ AMD GPU Workarounds
The application automatically detects AMD GPUs and applies workarounds to prevent crashes.
When AMD GPU is detected, these workarounds are applied by default:
MESA_GL_SYNC_TO_VBLANK=1- Prevents race conditionsMESA_GL_VERSION_OVERRIDE=4.5- Uses stable OpenGL APIMESA_GLSL_VERSION_OVERRIDE=450- Uses stable GLSL versionMESA_GLSL_CACHE_DISABLE=1- Prevents shader cache corruptionR600_DEBUG=nosb,notgsi- Disables aggressive optimizations
If you need to apply manually:
export MESA_GL_SYNC_TO_VBLANK=1
export MESA_GL_VERSION_OVERRIDE=4.5
export MESA_GLSL_VERSION_OVERRIDE=450
export MESA_GLSL_CACHE_DISABLE=1
export R600_DEBUG=nosb,notgsi
./linux-wallpaperengine-gtk.pyMinimal workarounds applied:
MESA_GL_VERSION_OVERRIDE=4.5
Usually works fine without workarounds.
π§ Environment Detection Details
The EnvironmentDetector class detects:
/etc/os-release(systemd standard)/etc/lsb-release(Debian/Ubuntu)- Distro-specific files:
/etc/arch-releaseβ Arch/etc/fedora-releaseβ Fedora/etc/nixos/configuration.nixβ NixOS/etc/debian_versionβ Debian- etc.
- Wayland: Checks running processes for
mutter,kwin,sway,hyprland,river - X11: Uses
xpropto detect window manager
- Method 1:
lspci -nnkto detect GPU vendor - Method 2:
lsmodto detect driver modules (amdgpu,radeon,nvidia,i915)
- Steam: XDG paths, standard locations, distro-specific, Flatpak, Snap
- WPE Binary: PATH, system paths, XDG paths, relative paths, distro-specific
π Known Issues & Solutions
Symptom: Backend crashes with segmentation fault
Cause: GPU driver memory corruption (often AMD RadeonSI)
Solutions:
- Enable Radeonsi workarounds (automatic if AMD GPU detected)
- Use containerization for isolation
- Update GPU drivers
- Check
dmesgfor driver errors
Symptom: Wallpapers don't display on Wayland
Cause: Backend requires X11 for display access
Solutions:
- Switch to X11 session (recommended)
- Use XWayland compatibility mode
- Check compositor-specific display detection
Symptom: Container fails to start or can't access GPU
Solutions:
- Verify Docker is running:
docker ps - Check user in docker group:
groups | grep docker - Test GPU access:
docker run --device=/dev/dri ubuntu:22.04 lspci - Check permissions: May need
sudoor group membership
Status: v1.2.0 - Deterministic Monolith (Standalone Operation)