Ask Your Question

Steal focus not working?

asked 2017-10-10 09:49:09 +0000

alfC gravatar image

updated 2018-03-14 03:54:21 +0000

In the last Fedora (26) distribution I notice a change in behavior of Gnome. When I double click in Files on a file that is already opened (for example a PDF), nothing happens. Of course I have to figure out that the reason is that the window was already open in the background.

However, I don't receive any notification or clue of what is going on.

This happens in other context, when relaunching a program, or opening text files, either from Files or from the command line in terminal window.

In Gnome Tweaks, there is an option called "Automatically Raise Windows", but it doesn't seem to make a difference. I have all the plugins switched off.

I reinstalled the system from scracth (Fedora 27) and it seems that the problem persists, so it is the default. This is very anoying because I cannot lift windows by executing commands from the terminal (e.g. evince or gedit) or by double clicking in Nautilus if the window is already open. The behavior is that, if the window already exists, it is left in the background and one cannot see anything happening in the screen.

These are the steps to reproduce the problem:

  1. Open a Terminal
  2. Execute nautilus . (a new window will open in the front)
  3. Go back to the Terminal (with the mouse or with Alt-Tab)
  4. Execute nautilus . (nothing will happen, the old window is not raised to the top).

This is very confusing, I don't mind reusing the old window or even opening a redundant one, but the current behavior is very confusing, specially for someone used to control gedit from the command line. I wonder if this is a problem with Gnome only. XFCE might not have this problem.

edit retag flag offensive close merge delete


Using Fedora 27, I can't reproduce your problem (...desktop.wm.preferences auto-raise reads false)

florian ( 2018-03-14 03:58:53 +0000 )edit

@florian I don't know, I installed from scratch and the problem continued. I now installed https://extensions.gnome.org/extensio... but didn't help.

alfC ( 2018-03-14 04:10:11 +0000 )edit

@florian , so, does running nautilus . twice brings the window to the front?

alfC ( 2018-03-14 04:11:53 +0000 )edit

Yes it does. (Ah, and yes, I realized I have that extension installed as well).

florian ( 2018-03-14 04:24:38 +0000 )edit

Ahrrr, but not even with the extension works for me. The extension doesn't have options. The extension was create a few version of fedora ago to avoid the annoying not focus + "your window is ready" message. But now it is the worst since nothing happens after running a command.

alfC ( 2018-03-14 04:29:13 +0000 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-02-16 10:02:00 +0000

alfC gravatar image

updated 2018-03-14 03:46:39 +0000

NOTE ADDED: I am confused: This stopping working or I didn't test it well.

I found the solution here: https://superuser.com/a/1133557/68715

It was kind of obvious in perspective: dconf-editor -> Desktop>wm>preferences>auto-raise to ON

edit flag offensive delete link more


You don't need no dconf-editor:


gsettings get org.gnome.desktop.wm.preferences auto-raise


gsettings set org.gnome.desktop.wm.preferences auto-raise true
florian ( 2018-03-14 03:55:50 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

1 follower


Asked: 2017-10-10 09:49:09 +0000

Seen: 173 times

Last updated: Mar 14