Skip to main content

How to change desktop wallpaper from terminal? [Resolved]

I want to change the wallpaper of xmonad from the command line.

How can I do this?

Question Credit: user53216
Question Reference
Asked July 21, 2019
Posted Under: Unix Linux
3 Answers

You can use feh:

feh --bg-scale /path/to/wallpaper

You can also set up bash scripts to change wallpaper to random one every X minutes(I use it with feh), get random wallpaper on each boot, etc. The Arch wiki explains it nicely.

credit: MatthewRock
Answered July 21, 2019

According to this Super User Q&A, you can try:

xloadimage -onroot -fullscreen /path/to/background_image


xpmroot /path/to/background_image

Or, and this should work on pretty much any desktop environment:

feh --bg-fill /path/to/background_image

credit: Community
Answered July 21, 2019

You can use xsetroot for simple backgrounds.

For a solid color:

xsetroot -solid black

For a bitmap:

xsetroot -bitmap filename.bmp

credit: elig
Answered July 21, 2019
Your Answer