Set the GNOME Wallpaper from the Terminal (gsettings)

Point org.gnome.desktop.background picture-uri (and picture-uri-dark) at a file:// URI to change the desktop background from a script.

LinuxwallpaperdesktopgnomegsettingsLow risk
Run `gsettings set org.gnome.desktop.background picture-uri 'file:///home/you/Pictures/wall.jpg'` to change the wallpaper.

01Command

Command
$ gsettings set org.gnome.desktop.background picture-uri 'file:///home/you/Pictures/wall.jpg'

02What it does

The URI must be absolute with the file:// prefix, so `pwd`-relative paths fail silently. GNOME 42+ has a separate dark-mode wallpaper — set `picture-uri-dark` too, or the dark theme keeps the old image. Combine with a slideshow: a small script that picks a random image and sets the key works perfectly from cron or systemd user timer.

03Risk

RiskLow risk
RequirementsGNOME (or another GTK desktop honoring org.gnome.desktop.background). KDE uses a different backend: `plasma-apply-wallpaperimage /path/to/image.jpg`.
!Warning: KDE Plasma doesn't read this key — use `plasma-apply-wallpaperimage` there; on GNOME the file must remain in place, so don't point the URI at a temporary directory.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • gsettings(1) - Linux manual page
    Ubuntu Manpages · technical · 2026-09-17
    Evidence: gsettings set writes GSettings keys; org.gnome.desktop.background picture-uri and picture-uri-dark hold the file:// URI of the desktop wallpaper.

Last verified: 2026-09-18 · Category: System & Settings