3

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

How can I do this?

3 Answers 3

6

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.

2
  • I did it, but it isn't saved. When I reboot, the wallpaper is previous one. Commented Apr 18, 2016 at 13:06
  • @user53216 That's right. You've got to do this every time, or add it to some init file(either xmonad init file[I don't know xmonad, so I don't know where it is]), or put it in .xinitrc. The second solution is preferable. Commented Apr 18, 2016 at 13:19
2

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

xloadimage -onroot -fullscreen /path/to/background_image 

Or

xpmroot /path/to/background_image 

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

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

You can use xsetroot for simple backgrounds.

For a solid color:

xsetroot -solid black 

For a bitmap:

xsetroot -bitmap filename.bmp 

You must log in to answer this question.