linux:terminal-focus
This is an old revision of the document!
Terminal focus
On Linux mint 22.3 the terminal does not get focus when opened via taskbar button due to an issue with underlying mutter.
Workaround as described here: https://github.com/linuxmint/cinnamon/issues/13382
settings → windows → behaviour → window focus mode = sloppy
sudo vi /usr/share/cinnamon/js/ui/windowAttentionHandler.js
Search for the initialization block. It looks like this:
Mainloop.timeout_add_seconds(4, () => { log("Enabling WindowAttentionHandler"); global.display.connect('window-demands-attention', Lang.bind(this, this._onWindowDemandsAttention)); global.display.connect('window-marked-urgent', Lang.bind(this, this._onWindowDemandsAttention)); return GLib.SOURCE_REMOVE; })
Add this line inside that block:
global.display.connect('window-created', Lang.bind(this, this._onWindowDemandsAttention));
The result should look like this:
Mainloop.timeout_add_seconds(4, () => { log("Enabling WindowAttentionHandler"); global.display.connect('window-demands-attention', Lang.bind(this, this._onWindowDemandsAttention)); global.display.connect('window-marked-urgent', Lang.bind(this, this._onWindowDemandsAttention)); // START FIX global.display.connect('window-created', Lang.bind(this, this._onWindowDemandsAttention)); // END FIX return GLib.SOURCE_REMOVE; })
Save and Exit
linux/terminal-focus.1777294182.txt.gz · Last modified: by Wuff