Gnome Shell: Move windows to front on launch (No more "... is ready to use" notifications)

24,115

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: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.

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

  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.

Solution 5

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.

Share:
24,115

Related videos on Youtube

grafthez
Author by

grafthez

Updated on September 18, 2022

Comments

  • grafthez
    grafthez over 1 year

    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
    
    • miksuh
      miksuh over 6 years
      There is a good reason why Gnome shows that "Window is ready" notification when a new window is opened without getting focus automatically. It is a important accessibility feature. For the blind and other visually impaired users like me it is important to get notified if a window without focus is opened because otherwise it would be impossible to know if the window really was not opened or not. If a new window does not get focus automatically then user must be notified so that users knows that the window opened. Screen reader like Orca speaks those notifications.
    • joshbroton
      joshbroton about 6 years
      In Debian v3.16, Gnome 3 I found this focus_new_windows setting in org.gnome.desktop.wm.preferences
    • Dragon warrior
      Dragon warrior about 5 years
      if a new window gets focus automatically (especially with a shell) while I am typing stuff, I get pretty angry… also think about potential security consequences
    • user1656671
      user1656671 over 4 years
      "There is a good reason" ? no. There is no good reason to make a system less usable and less secure. This is a result of a mistake that should be corrected. At least the ability to disable this bug should be put at the hands of the user.
  • Hannes
    Hannes over 12 years
    Nope, as far as I'm concerned there is no way to do autofocussing a new window nor is there a way to remove the notifications.
  • mac
    mac over 12 years
    But the long description given for focus_new_windows key says "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." But we want the opposite . Isnt it ? We want to give focus for newly launched applications. How to do that?
  • Schweinsteiger
    Schweinsteiger over 11 years
    there is an extension for gnome which does that exact thing you're saying isn't possible. Have a look at my answer :)
  • Robin Winslow
    Robin Winslow over 10 years
    Running that command-line had no effect for me
  • Jakub Kotowski
    Jakub Kotowski almost 10 years
    Also had no effect for me (I have it set both to strict and the auto_raise_delay to 0).
  • Jakub Kotowski
    Jakub Kotowski almost 10 years
    doesn't work for me. I noticed that I'm having this problem only on my external monitor. On the laptop display the window comes in front.
  • sivaprakash
    sivaprakash over 9 years
    A great extension!
  • Johan Larsson
    Johan Larsson about 9 years
    This worked for me, Gnome 3.14.
  • meanbunny
    meanbunny almost 9 years
    This worked for me GNOME Ubuntu 15.04 - Gnome 3.14
  • l0b0
    l0b0 about 7 years
    Doesn't work on GNOME 3.22.2 (Fedora 25)
  • Chris Billington
    Chris Billington about 6 years
    This setting is absent on gnome-tweak-tool in Ubuntu 17.10
  • Delorean
    Delorean about 6 years
    @ChrisBillington Correct. The reasoning for the removal isn't clear. However, you can get these back by installing the Gnome extensions "NoAnnoyance" and "Focus my window". Hopefully they bring it back in 18.04. I usually only stick with LTS releases... Also as mentioned below, the extension "Steal my focus" may work for you.
  • lkraav
    lkraav over 5 years
    extensions.gnome.org/extension/1236/noannoyance is the more up to date option.
  • user1656671
    user1656671 over 4 years
    The setting is there in 19.10 but does not work
  • Flimm
    Flimm almost 4 years
    The setting is absent in Ubuntu 20.04 LTS.
  • Flimm
    Flimm almost 4 years
    To install gconf-editor, run sudo apt install gconf-editor
  • Flimm
    Flimm almost 4 years
    In Ubuntu 20.04, the path /org/gnome/desktop/wm/preferences/focus-new-windows does not exist.
  • Flimm
    Flimm almost 4 years
    @lkraav I converted your comment to an answer, I hope you don't mind.
  • TalkLittle
    TalkLittle over 2 years
    Should be focus-new-windows 'smart' so that windows opened via Terminal can gain focus immediately. With 'strict', Terminal opens windows in the background with a notification.
  • Admin
    Admin almost 2 years
    On arch-linux, you can install it as a package via aur.archlinux.org/packages/… and then need to restart for the changes to take effect.