GNOME Bugzilla – Bug 162424
Focus bug from not using startup notification
Last modified: 2005-04-27 11:53:46 UTC
1. Close all applications. 2. Right click on the desktop and select 'Open Terminal'. 3. Left click in the terminal window. 4. Right click on the desktop and select 'Open Terminal'. A new terminal window opens but it does not have focus. I am running gnome-terminal 2.9.3+ and metacity 2.9.3+.
Nautilus is not launching the terminal with startup notification.
A simple "fix" we should probably do anyhow is to remove this menu item; as Bob Lord pointed out, one of our goals is "eliminate the need to use the shell for desktop users" and the first menu item on the desktop menu is "open terminal" Plus there was some better feature in the works like "open terminal cd'd to this directory" I think, which connects the terminal to the file manager context and is thus more useful. And lots of people just make an "open terminal" keybinding or panel launcher. More on-topic: if a window totally lacks a timestamp, shouldn't we always focus it? Why does gnome-terminal get a timestamp if startup notification isn't used? You've probably explained this to me already...
Yes, I have, but it's okay. ;-) When gnome-terminal is launched it doesn't open a window--it tells another, already running process (another gnome-terminal) to open one. And most windows are opened in response to the user interacting with that application, meaning that the gtk+ default is to set the _NET_WM_USER_TIME of all new windows to the last interaction timestamp that the user had with the application. In not-so-summary: nautilus doesn't use startup notification -> new terminal process doesn't know when it was launched -> new terminal process can't tell old process when it was launched -> old process doesn't have anything to set the _NET_WM_USER_TIME to and just has to punt to the gtk+ default, which is wrong.
Bug 131792 has a patch to "fix" this by removing the open terminal item from the menu.
*** Bug 167847 has been marked as a duplicate of this bug. ***
Nautilus-open-terminal should probably replace the Open Terminal menu item in nautilus. Unfortunately nautilus-open-terminal currently launches the terminal using g_spawn_async(), so it doesn't support startup notification either. :-(
Nautilus-open-terminal has been modified to launch gnome-terminal using the gnome-desktop-item API, so nautilus-open-terminal no longer shares this same bug.
This particular bug has been worked around in gnome-terminal (see bug 168812, which is in gnome-terminal 2.9.3) so that for the most part correct behavior will still be observed. However, nautilus really should be either launching with startup notification, or, better yet, removing that entry from the desktop menu altogether (Bug 131792).
the item has been removed (see bug 131792)