major.io

Words of wisdom from a Linux engineer focused on information security

major.io

Words of wisdom from a systems engineer

  • Who am I?
  • icanhazip FAQ
  • Résumé
  • Keybase
  • RSS
Creative Commons License

Allow new windows to steal focus in GNOME 3

July 6, 2015 By Major Hayden 12 Comments

GNOME 3 generally works well for me but it has some quirks. One of those quirks is that new windows don’t actually pop up on the screen with focus as they do in Windows and OS X. When opening a new window, you get a “[Windowname] is ready” notification:

GNOME 3 Hangouts is ready

My preference is for new windows to pop in front and steal focus. I can see why that’s not the default since it might cause you to type something in another window where you weren’t expecting to. Fortunately, you can enable what GNOME calls strict window focus with a quick trip to dconf-editor.

Installing dconf-editor is easy:

XHTML
1
2
3
4
# RHEL/CentOS 7 and Fedora 21
yum -y install dconf-editor
# Fedora 22
dnf -y install dconf-editor

Open dconf-editor and navigate to org -> gnome -> desktop -> wm -> preferences.

Once you’re there, look for focus-new-windows. The default setting is smart which will keep new windows in the background and alert you via a notification. If you click on smart, a drop down will appear and you can select strict. That will enable functionality similar to OS X and Windows where new windows will pop up in the front and steal your focus.

The new setting takes effect immediately and there’s no need to logout or close and reopen windows.

UPDATE: If you’d like to avoid installing dconf-editor, use Alexander’s suggestion below and simply run:

XHTML
1
gsettings set org.gnome.desktop.wm.preferences focus-new-windows 'strict'

Share this post:

  • Twitter
  • Google
  • LinkedIn
  • Reddit
  • Email
  • Print

Tagged With: centos, fedora, gnome, red hat

Comments

  1. Boost says

    July 6, 2015 at 3:12 pm

    Nice, but I hate when windows pop up and steal my focus. What I would like is for a middle way. The notification can get lost. A better way IMO would be to pop up the window, maybe have a special shadow or glow for as long as notifications are shown but it should not grab mouse or keyboard focus until I click it.

    Reply
    • Fadi R says

      January 9, 2018 at 5:13 pm

      To each his own I guess. Personally, I find it insulting to have the OS manage my focus. If I open a document, it’s because I want to open it. :)

      Anyway, now that I’m done giving you my un-asked for and probably unwanted opinion, I think this might you:

      1. Open the Activities overview and start typing Notifications (or just go to settings via User menu).
      2. Click on Notifications to open the panel.
      3. Switch Notification Popup to OFF. Alternatively, you can can set the popups to individual apps.

      Reply
  2. Alexander says

    July 6, 2015 at 5:12 pm

    If you don’t want to install dconf-editor, you can also use:

    gsettings set org.gnome.desktop.wm.preferences focus-new-windows ‘strict’

    Reply
    • Major Hayden says

      July 7, 2015 at 6:18 am

      Ah, I forgot about that, Alexander. I’ve just updated the post! :)

      Reply
  3. Rick says

    August 4, 2015 at 10:14 am

    Exactly what I was looking for. Thank you!

    Reply
  4. Simon Peeters says

    August 25, 2015 at 7:38 am

    hej, I’ve been looking to solve this exact issue, but unfortunately, setting focus-new-windows to ‘strict’ doesn’t solve it for me, new windows still open behind the existing one. (so running gedit from gnome-terminal just gives me “gedit” is ready) any hints?

    Reply
    • Skogshjort says

      September 11, 2015 at 6:13 am

      Confirmed, doesn’t work over here either (gnome 3.16.3 on arch linux) :/

      Reply
      • Rajesh KSV says

        January 28, 2017 at 7:05 am

        This extension worked for me – https://extensions.gnome.org/extension/1005/focus-my-window/

        Reply
  5. Luc Deschenaux says

    September 10, 2015 at 1:15 am

    Thanks ! it is so annoying to continue typing in the previous window after opening a new one :-)

    Reply
  6. Pierre Thibault says

    April 26, 2016 at 10:08 am

    It does not seem to work when the window is appearing on a secondary screen.

    Reply
  7. Doug Beney says

    December 9, 2017 at 7:54 pm

    You rock!

    Reply
  8. Fadi R says

    January 9, 2018 at 5:20 pm

    Yeah, doesn’t seem to work on my system. You use Xorg or Wayland? I’m on ubuntu 17.10 Wayland.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.