47

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
abu_bua
  • 11,313
grafthez
  • 661
  • 1
  • 6
  • 6

16 Answers16

18

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.

Flimm
  • 44,031
Steiger
  • 7,857
17

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.

10

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:enter image description 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.

martin
  • 1,809
  • 1
  • 13
  • 21
3

GNOME extension: "NoAnnoyance"

Try installing and activating this GNOME extension called NoAnnoyance by sindex:

The GitHub repo seems more up-to-date than some of the answers listed here.

Flimm
  • 44,031
3
  1. Go to System > Preferences > CompizConfig Settings Manager > General Options (under General) > Focus & Raise Behaviour,
  2. Clear Focus Prevention Windows field.

References: Compiz General Options, Compiz Window Matching.

k0pernikus
  • 6,336
2

The long term solution is for this bug to be fixed by the developers.

Here is a bug report that seems to be related:

https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1825710

Maybe casting more votes will eventually help the solution..

QT-1
  • 1,742
2

This can now be done within Tweak Tool which is included with Gnome Shell. You no longer need to use extensions or dconf-editor.

Under the "Windows" section, slide the switch over for "Automatically Raise Windows".

This setting will make windows popup in focus, and will also get rid of the "application is ready" notification.

enter image description here

EDIT: This option is missing in Ubuntu 17.10 and will hopefully be back in 18.04. As a temporary fix, you can try installing the following gnome extensions;

  • Noannoyance
  • Focus my window
  • Steal my focus

The above extension are available here : https://extensions.gnome.org/

Delorean
  • 11,563
1
  1. use gconf-editor
  2. go to /org/gnome/desktop/wm/preferences/focus-new-windows
  3. set property: "strict"
  4. apply changes

enter image description here

M.A.K. Ripon
  • 3,409
  • 3
  • 28
  • 36
1

GNOME extension: Grand Theft Focus

There's another GNOME extension that address this problem. This one works on GNOME 45, which ships with Ubuntu 23.10.

https://extensions.gnome.org/extension/5410/grand-theft-focus/

Flimm
  • 44,031
1

I dont think there is a setting to do this. I have been using gnome shell for a while now. You can install the "advanced settings extension" for gnome 3 which provides you with a few more settings. However, you cannot get the function you are looking for. I will search the net and come back to you.

Hannes
  • 540
0

OK, I've had this issue for many months. After going through all answers, I found nothing satisfactory, but some good pointers. And here's the full answer that solved my problem for Ubuntu 18.04: https://linuxconfig.org/how-to-install-gnome-shell-extensions-on-ubuntu-18-04-bionic-beaver-linux.

Step 1

Install Firefox Addon that makes it easy to install GNOME Shell extensions: https://addons.mozilla.org/en-US/firefox/addon/gnome-shell-integration/.

Step 2

Install the host connector that supports the addon:

sudo apt install chrome-gnome-shell

Step 3

Install this GNOME Shell extension: https://extensions.gnome.org/extension/1236/noannoyance/. You can install it from the web page, thanks to the Firefox extension.

user1350992
  • 1,156
0

For Ubuntu 20.04, the following has worked for me.

  1. Install the NoAnnoyance GNOME Shell Extension by entering in a terminal window

    sudo apt install gnome-shell-extension-no-annoyance

  2. Then launch GNOME Tweaks by entering in the terminal

    gnome-tweaks

  3. In Tweaks, make sure to enable Noannoyance under Extensions

0

GNOME extension: "NoAnnoyance v2"

"NoAnnoyance v2" by bjoerndaase is a fork of "NoAnnoyance", it's a separate GNOME extension, and is not merely the second version of "NoAnnoyance", despite the name. It removes the 'Window is ready' notification and puts the window into focus.

https://extensions.gnome.org/extension/2182/noannoyance/

Flimm
  • 44,031
0

GNOME extension: "Window Is Ready - Notification Remover"

This extension by nunofarruca also removes the notification "Window is ready", and it works on GNOME 45, the version of GNOME that ships with Ubuntu 23.10.

https://extensions.gnome.org/extension/1007/window-is-ready-notification-remover/

Flimm
  • 44,031
0

You can modify this type of stuff with devilspie, which has a nice GUI frontend gdevilspie, which is in the repos.

user72421
  • 3,711
0

Create a custom shortcut under your keyboard settings and use command:
xterm -e < terminalname >
or:
uxterm -e < terminalname >

Also if you get problems with "failed to execute session" you can always go a step further.

< terminalname > -e xterm -e < terminalname >

In my case:
xfce4-terminal -e xterm -e xfce4-terminal

This i kinda funny because in this way you use a native terminal to start the newer one.
And since the older don't have the preference to start in background
it will start the newer on top.

Clean and no need to install extensions.