Prevent Notification steal focus on Ubuntu 18.04

Written by Yujin Boby

Edit in WordPress

On Ubuntu, some times notifications steal focus from current application. This annoying when you are working on terminal. This is due to start focus feature of gnome when your mouse is over the notification area.

boby@sok-01:~$ gsettings get org.gnome.desktop.wm.preferences focus-new-windows 
'smart'
boby@sok-01:~$ 

We need to change the value of focus-new-windows from smart to strict. This can be done with command

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