Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am experiencing a strange problem with Feh in Arch Linux. When I start my openbox session, feh loads the background for a split second and then it goes away. If I manually load the background then feh will operate perfectly for the remainder of my session but on startup it always fails.

I am running Arch Linux (current) and Openbox 3.

Relevant files:


# Set a background color
if which hsetroot >/dev/null 2>&1; then
    if which esetroot >/dev/null 2>&1; then
    if which xsetroot >/dev/null 2>&1; then
test -z $BG || $BG -solid "#303030"

# D-bus
if which dbus-launch >/dev/null 2>&1 && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
       eval `dbus-launch --sh-syntax --exit-with-session`

if test -x /usr/libexec/gnome-settings-daemon >/dev/null; then
  /usr/libexec/gnome-settings-daemon &
elif which gnome-settings-daemon >/dev/null 2>&1; then
  gnome-settings-daemon &
elif which xfce-mcs-manager >/dev/null 2>&1; then
  xfce-mcs-manager n &

if which start_kdeinit >/dev/null 2>&1; then
  LD_BIND_NOW=true start_kdeinit --new-startup +kcminit_startup &

# Run XDG autostart things.  By default don't run anything desktop-specific
# See xdg-autostart --help more info
if which /usr/lib/openbox/xdg-autostart >/dev/null 2>&1; then
  /usr/lib/openbox/xdg-autostart $DESKTOP_ENV

## My startup programs:
cairo-compmgr &
pypanel &
sh ~/.fehbg &


feh  --bg-fill '/home/cknadler/Wallpaper/wall.jpg'

At this point I am either looking for a solution to make feh load correctly every-time I start my session or possibly an alternative the feh for loading backgrounds in openbox. Either would be greatly appreciated, thanks.

share|improve this question
As an aside, feh doesn't need to be forked; you can just source the ~/.fehbg file using something like [ -f ~/.fehbg ] && . ~/.fehbg. I do this at the start of my herbstluftwm autostart script. – Mel Boyce Apr 19 '13 at 14:29
up vote 3 down vote accepted

Almost certainly feh is loading the background, then something else is resetting the X background during the rest of the startup process. I suspect this has to do with the fact that you are firing up the gnome-settings-daemon. This starts a whopping chain of things that will include setting the background and other desktop settings like font rendering. You should remove sections of your startup script until you find what bit is resetting your background, but I am almost sure you will find that it the gnome-settings-daemon.

You could get around this by putting a delay in launching feh to give the gnome-settings-daemon to get done touching things.

(sleep 2 ; feh --bg-fill ~/wall.jpg ) &

share|improve this answer
Worked perfectly, thanks a bunch for the help. I just disabled gnome-settings-daemon, wasn't using it anyways. – Chris Knadler Jun 20 '11 at 23:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.