I'm doing automated testing with Sikuli and it's important that the stuff being tested is visible on the screen. Lately, the apps/windows keep opening in the background, behind whatever is currently in focus, with the notification "[application] is ready". How do I tell Ubuntu to stop doing this?
Gnome Shell, which is used by Ubuntu, has the feature that launched applications are opened in the background. While this may be desirable in some workflows, many users will consider this an annoyance. A gnome Shell extension, appropriately named "No Annoyance", changes this behavior, and makes sure a launched application is immediately raised.
Install the extension with the command
sudo apt install gnome-shell-extension-no-annoyance, or using Synaptic Manager (not installed by default) or even using "Software". To enable the extension after installation, you can use "Gnome Tweaks" (not installed by default).
There is an option in dconf-editor.
org / gnome / desktop / wm / preferences / auto-raise
It is possible that activating this option helps. It is hard for me to tell as I tried several things and I am not sure if it works consistently.
Another hack I am trying is to set org / gnome / desktop / wm / preferences / auto-raise-delay to 2000.
I would appreciate comments about the reflectivity of this setting.