Gnome 3 focus follows mouse

Although normally I am a fan of xfce or {open,flux}box, curiosity got the best of me and I decided to take gnome 3 for a spin.

One annoyance was the need to click a window to change the focus. I prefer to have the focus of my windows to follow the mouse and find it bothersome to have to click a window to get it’s attention.

gnome-shell uses dconf-editor and gsettings and, although there must be a way, I could not find a way of changing the focus settings with these tools.

gconftool-2 and gconf-editor to the rescue.

gconftool-2

Please understand that this method is a “hack” or work around until I find a better option.

Run the following commands:

gconftool-2 --type string --set /apps/metacity/general/focus_mode mouse
gconftool-2 --type boolean --set /apps/metacity/general/auto_raise true
gconftool-2 --type string --set /apps/metacity/general/auto_raise_delay 600

gconf-editor

gconfeditor is a graphical front end for gconftool. Open gconf-editor and navigate to apps -> metacity -> general

Double click on a key to edit it’s value.

gconf-editor

While this works for the mouse focus, most metacity settings will not work with gnome 3, so use dconf-editor and gsettings if at all possible.

This entry was posted in Linux and tagged . Bookmark the permalink.

24 Responses to Gnome 3 focus follows mouse

  1. Timur Kristóf says:

    Gnome 3′s components are not fully ported to use gsettins (dconf) only, so many of them (including the window manager) are still using gconf for their settings. You won’t find a way to make this work with dconf-editor until the Gnome guys decide to port mutter to use gsettings.

  2. bodhi.zazen says:

    @Timur Kristóf – Thank you for the information.

  3. MarkC says:

    So Ubuntu 11.04 + Unity offers focus-follows-mouse, but it’s fundamentally broken due to the unified menu bar, while Gnome 3 doesn’t even consider FFM to be a first-class citizen these days. Sigh…

    I guess I’ll be sticking with Ubuntu 10.10 and Gnome 2 for now, and evaluating a switch to KDE, XFCE or some other system which actually wants to support the way I prefer to work.

  4. bodhi.zazen says:

    @MarkC – Absolutely, use the interface that is best for you.

    Gnome 3 and Unity are both great projects, and neither is complete. Best way to get a fix is to use them and file bug reports / feature requests.

    But one of the best features of Linux is choice, so use an alternate DW/WM, older version of Fedora or Ubutnu, or RHEL, Debian, Slackware …

    It is all good.

  5. Pingback: Links 14/6/2011: EKOPath 4 Compiler Suite Goes GPL, ODF Wins in Russia | Techrights

  6. someguy says:

    Ahh just what I needed – thanks a million!

  7. bodhi.zazen says:

    Works on Unity as well =)

    You may need to install gconf-editor first.

  8. Marshall Neill says:

    I’m sorry, but somehow I don’t feel the Gnome Shell Dev’s get it as far a window focus.
    Here is my take.
    New Window wants to come up.
    That process needs to check to see who the parent is, if the parent is topmost or no previous windows open, then show the new window. If not, don’t show it.
    You can indicate that a window needs attention when the parent is not the initiator of the new window.
    Am I being too simplistic or that there isn’t currently any way to check on who the parent process is?

  9. bodhi.zazen says:

    @Marshall Neill – I tend to agree, we are in an no mans land , gnome 2 is not supported moving forward, and gnome 3 / gnome-shell is not fully developed.

    I suppose they had to push gnome 3 / gnome-shell into general use to promote further development. Over time gnome 3 / gnome shell will have additional features.

  10. Seth Alford says:

    It’s been a very long time, but I seem to recall being able to specify AutoRaise back in X10. Yes, X10 which preceded X11. With AutoRaise, when I moused into a window, that window got focus and was raised above the other windows on the desktop. This was probably late 1980s. After trying Gnome3 on Fedora 15 for a while, I converted to Xfce.

  11. Stiamonobor says:

    Big thanks ! a problem solved :)

  12. Stiamonobor says:

    … but, apparently, it don’t work for set the “auto-raise delay” :-/

  13. bodhi.zazen says:

    Aye, not fully implemented yet.

  14. iscariote says:

    instead of using the gconf editor, you can instead also use the gnome-tweak-tool to change this setting. much of a muchness really as it simply edits the gconf settings for you. just saves you accidentally changing something else by mistake.

  15. bodhi.zazen says:

    @iscariote – must be new since my original blog.

  16. Darren says:

    Thanks! I just installed Ubunut 11.10, and cannot believe how difficult it has become to get a minimal Gnome desktop working again. Why are Ubuntu trying to force their latest buggy interfaces on everyone? Anyway, now at least I’ve got FFM working again.

  17. Cameron says:

    It’s a show stopper for me. Since GNOME doesn’t do FFM, I will not use GNOME any more, unless forced to by employment.
    Back to icewm for now.

  18. bodhi.zazen says:

    Gnome absolutely will do FFM, follow the directions posted in this blog.

  19. Pingback: Fedora focus follows mouse » Karlo Luiten

  20. Anon says:

    Now with gsettings/dconf-editor all these config live in org.gnome.desktop.wm.preferences

  21. Mark Huth says:

    Any chance there is a fix for Fedora 17? Metacity is not in the gconf-editor apps on Fedora 17. Why, oh why, do these things have to change constantly???

  22. Eric M. Schlegel says:

    I had the same problem with auto-raise, but i did find a fix: try looking at the values from ‘gsettings list-recursively’. there should be entries
    for auto-raise, auto-raise-delay, and focus-mode within the block
    org.gnome.desktop.wm.preferences

    my list initially had auto-raise set to false; a simple
    gsettings set org.gnome.desktop.wm.preferences auto-raise true
    fixed it.

  23. Jim Bean says:

    I fixed this on Fedora 17 be editing:
    /usr/share/glib-2.0/schemas/org.gnome.desktop.wm.preferences.gschema.xml
    changing click to sloppy and auto raise to true.
    The time constant of the taise is 0.5 sec which I left but can also be changed.
    regards Jim Bean

  24. x2l2 says:

    thanks to Anon and Eric M. Schlegel , it works with gnome-shell ( gnome 3.6 ) on ubuntu 12.10 following their instructions

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>