Gnome Shell: Move windows to front on launch (No more "... is ready to use" notifications)
I've been using Gnome Shell with Ubuntu for few days now and have experienced really annoying behaviour with new windows.
Sometimes when I use another window and press e.g. Alt+Ctrl +T to open new terminal window, the new window is not brought to the front. Instead I get a "New terminal window is ready to use" notification.
A similar problem occurs with the with Pidgin being integrated with Gnome Shell (via extension). When I get a new message, a notification pops up, but the window does not show. I need to either Alt+Tab it or click the notification to see the new message.
Is there any way to have new windows being always brought to front, and remove those annoying "Window is ready" notifications?
EDIT: gconftool-2 --search-key focus_new_windows
(as requested by severin):
/schemas/apps/metacity/general/focus_new_windows = Schema (type: `string' list_type: '*invalid*' car_type: '*invalid*' cdr_type: '*invalid*' locale: `C')
/apps/metacity/general/focus_new_windows = smart
Solution 1:
GNOME extension: "Steal My Focus"
There is an extension for Gnome 3 called "steal my focus" by sstent.
https://extensions.gnome.org/extension/234/steal-my-focus/
It solves the exact problem you're having.
Solution 2:
You can try setting focus_new_windows from smart to strict. You can either use gconf-editor and go to /apps/metacity/general and change the value of focus_new_windows from smart to strict, like here:
Or you can use the command line:
gconftool-2 --set /apps/metacity/general/focus_new_windows --type string strict
If that still doesn't help, you can also change auto_raise_delay from 1000 to 0 in aforementioned gconf-editor (see screenshot).
See also here.
Solution 3:
On Ubuntu 20.04 without installing anything you can use these 2 commands in a Terminal as a workaround:
gsettings set org.gnome.desktop.wm.preferences auto-raise 'true'
gsettings set org.gnome.desktop.wm.preferences focus-new-windows 'strict'
No need of extensions or additional Applications.
Solution 4:
- Go to System > Preferences > CompizConfig Settings Manager > General Options (under General) > Focus & Raise Behaviour,
- Clear Focus Prevention Windows field.
References: Compiz General Options, Compiz Window Matching.