How do I set focus follows mouse in Ubuntu 17.10 and later with GNOME 3?

19,268

You may use (GNOME) Tweaks to achieve your goal. If it's not installed, first install it by running

sudo apt install gnome-tweak-tool

Launch Tweaks and go to the Windows section. Select "Sloppy" or "Secondary-Click" under Window Focus.

enter image description here

Alternatively you may run the following command

gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy'

etc.

Share:
19,268
eDeviser
Author by

eDeviser

Updated on September 18, 2022

Comments

  • eDeviser
    eDeviser over 1 year

    I found multiple answers on askUbuntu about this topic. But none of them suites to Ubuntu 17.10. So I need to ask again:

    How do I set focus follows mouse in Ubuntu 17.10?

    • michael
      michael about 6 years
      related: bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1726195 (for me, seems broken specifically when switching from unity to gnome, and/or to 17.10 and wayland): I'm used to using "sloppy" focus following mouse, but I still expect alt-tab to set focus to the selected window, but in 17.10, it's necessary to actually move the mouse to the window (and let it stop, then keep it there)
  • Dominick Pastore
    Dominick Pastore over 6 years
    Is there a way to set it to change focus as soon as the mouse enters the window, rather than when the mouse stops moving?
  • Phil
    Phil almost 6 years
    What a sloppy UI! Looks like checkboxes, and looks disabled to boot! Is actually radio-button-like. Click on the one you want, ignore your instinctive urge to untick the ticked one.
  • leo4jc
    leo4jc over 5 years
    I've confirmed that gnome-tweaks work on Ubuntu 18.10 (Cosmic Cuttlefish). Choose "Secondary Click" and it will work.
  • Dohn Joe
    Dohn Joe over 4 years
    The joy of Linux: change the OSs behaviour by a simple switch. Customize it as you please.
  • matanster
    matanster over 4 years
    Is it also 18.04 safe? :-)
  • pomsky
    pomsky over 4 years
    @matt Should work fine.
  • Wayne Werner
    Wayne Werner over 4 years
    FWIW worked for me on 18.04 (though, I tried the gsettings first and while that seemed to toggle the setting it didn't actually change the behavior)
  • tekknolagi
    tekknolagi over 3 years
    For whoever cares, the gsettings command also works in Fedora 32.