Super User is a question and answer site for computer enthusiasts and power users. 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'm running a script in the background which loads an image with feh depending on which application is currently in focus. However, whenever the script opens the image, window focus is lost to feh. I was able to circumvent this by using xdotool to switch back to the application that was originally in focus, but this introduces a short annoying period of time where the focus is switched from feh to the application.

My question is this: is there any way to launch feh in the background such that window focus is NOT lost?

System: Fedora 17, Gnome 3, Bash

share|improve this question

There is a configuration key for Metacity/Mutter that let's you disable focus on new windows launched from a terminal.

In Fedora 19 I found this by installing dconf-editor and locating the key under


Setting this key from smart to strict should do the trick. You may find a similar key under gonf-editor and a different path with another system.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .