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.
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
!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 pageEvidence: 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