Assuming you're using metacity since this is in reference to gnome-terminal...
On Wed, Feb 2, 2011 at 10:33, website reader <website.read...@gmail.com> wrote: > When the command first comes up, it switches the active focus to that > new window on the desktop which is traditional behavior. The mouse > and keyboard follow suite and are echoed in the new window. A person > can jump out by mouse clicking outside the new window. While not a perfect solution, you can prevent any window opened from a terminal from receiving focus by default. You can get this behavior by changing a registry key in the GConf configuration $> gconftool-2 --set /apps/metacity/general/focus_new_windows --type string strict About the focus_new_windows property from the documentation: "This option provides additional control over how newly created windows get focus. It has two possible values; "smart" applies the user's normal focus mode, and "strict" results in windows started from a terminal not being given focus." There is a second key, /apps/metacity/general/no_focus_windows, where you can modify focus based on the name or class of a window: "This option provides a way to specify new windows that shouldn't get focus. Normally an application specifies whether or not it gets focus by setting the _NET_WM_USER_TIME property, but legacy applications may not set this, which can cause unwanted focus stealing. The contents of this property is a space-separated list of expressions to match against windows. If any of the expressions match a window then the window will not get focus. The syntax of expressions is: (eq [name|class] "<value>"): window name (title) or the class from WM_CLASS matches <value> exactly. (glob [name|class] "<glob>"): window name (title) or the class from WM_CLASS matches the shell-style glob pattern <glob>. (and <expr> <expr>) (or <expr> <expr>) (not <expr): Boolean combinations of expressions." If you set the name or class of the terminal window with --class= or --name=, you should be able to control its focus. > However if I am running on a different desktop and have a background > program which issues the "gnome-terminal" command in a different > desktop area, gnome-terminal brings up the active window in my desktop > area, not the one of the issuing program running the script file. There's a tool called Devil's Pie (https://help.ubuntu.com/community/Devilspie) that allows you to control window behavior based on a configuration file. Among other things, you can make it so that when a window matching a certain description is created that it automatically gets opened on a specific desktop. Definitely worth checking out. Additional documentation on it's config format: http://foosel.org/linux/devilspie Cheers, Daniel Hedlund dan...@digitree.org _______________________________________________ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug