Skip to content

Feh

feh is a lightweight and powerful image viewer that can also be used to manage the desktop wallpaper for standalone window managers lacking such features.

Set the wallpaper

feh can be used to set the desktop wallpaper, for example for window managers without this feature such as Openbox, Fluxbox, and xmonad.

The following command is an example of how to set the initial background:

$ feh --bg-scale /path/to/image.file

Other scaling options include:

  • --bg-tile FILE
  • --bg-center FILE
  • --bg-max FILE
  • --bg-fill FILE

To restore the background on the next session, add the following to your startup file (e.g. ~/.xinitrc, ~/.config/openbox/autostart, etc.):

~/.fehbg &

To change the background image, edit the file ~/.fehbg which gets created after running the command feh --bg-scale /path/to/image.file mentioned above.

One can explicitly disable the creation of the ~/.fehbg, by passing the --no-fehbg flag as well.

To setup different wallpapers for different monitors one should pass as many file paths as many monitors are available. For example, for a dual monitor setup it would be:

$ feh --bg-center path/to/file/for/first/monitor path/to/file/for/second/monitor

See also

Favorite site