Page 1 of 1

How can I stop the browser moving to active workspace?

Posted: Tue Jan 14, 2025 3:54 pm
by oliverjames

Problem: If I select to open a link from one workspace the browser moves to that workspace and opens it. I'd like the link to open in the browser, but leave it on the workspace it was opened on.

Please can you tell me how to acheive that?


Re: How can I stop the browser moving to active workspace?

Posted: Tue Jan 14, 2025 4:23 pm
by Flash

What browser are you using? If it's Firefox, try right-clicking on the link and choosing "Open link in new tab."


Re: How can I stop the browser moving to active workspace?

Posted: Tue Jan 14, 2025 4:49 pm
by oliverjames
Flash wrote: Tue Jan 14, 2025 4:23 pm

What browser are you using? If it's Firefox, try right-clicking on the link and choosing "Open link in new tab."

My explanation was not clear. The browser (firefox) does open a new tab, bit the gui moves to the active workspace. I'd like the system to switch to the browser workspace and then open the link.


Re: How can I stop the browser moving to active workspace?

Posted: Wed Jan 15, 2025 8:13 am
by MochiMoppel

@oliverjames
I dedicated one of the virtual desktops to the browser and I hated it when an application pulls the browser to the active desktop.
I solved it by using wmctrl, which allows to switch to the browser's desktop before activating the browser.

Edit the file /usr/local/bin/defaultbrowser . Your file may contain something like

Code: Select all

#!/bin/sh
exec firefox $@

If so, change this to

Code: Select all

#!/bin/sh
wmctrl -a firefox
exec firefox $@

Of course it requires that wmctrl is installed.