I'm using Ubuntu 12.04 with and would like to know how I can configure it so that when I double click on a file, and it opens it with an already running program, it will raise and focus that program. I'd like to know how to do this under both unity and gnome classic, with either compiz or metacity. I'd guess that this behavior is decided by nautilus but I'm not sure. I'd like to know a solution, even if it involves patching and compiling nautilus.
Someone entered this as a bug once, https://bugs.launchpad.net/hundredpapercuts/+bug/386520, but it was marked invalid. I understand that most people might like the default behavior, but I find it an inconvenience that whenever I double click a file I have to find and select the window.