3

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

How can I do this?

4

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.

  • I did it, but it isn't saved. When I reboot, the wallpaper is previous one. – user166288 Apr 18 '16 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. – MatthewRock Apr 18 '16 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy