Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

org/gnome/desktop/wm/preferences/focus-new-windows

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

Your Answer

 
discard

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.