Stop GNOME from Opening Duplicate Windows Across Workspaces

If you use Virtual Desktops (Workspaces) in Linux GNOME (Debian/Ubuntu), you have likely run into this frustrating issue:

You have Firefox open on Workspace 1 and your Email open on Workspace 2. While checking your email on Workspace 2, you click the Firefox dock icon to look something up. Instead of jumping you back to your open browser, GNOME spawns a brand-new, duplicate Firefox window.


🔍 Why This Happens

This happens due to a setting called Workspace Isolation.

When active, your Dock treats each workspace like an isolated room. If you are on Workspace 2, the Dock completely ignores apps running on Workspace 1. Because it cannot “see” your open Firefox, clicking the icon makes the Dock act like a fresh application launcher rather than a window switcher—resulting in annoying duplicate windows.


🛠️ The Fix: Run These Commands

You can fix this instantly without restarting. Open your Terminal and copy-paste these commands:

1. Fix the Dock (Dash to Dock)

This forces the dock to track apps globally across all workspaces instead of isolating them:

bash

gsettings set org.gnome.shell.extensions.dash-to-dock isolate-workspaces false

Use code with caution.

(If you are on standard Ubuntu, run this instead: gsettings set org.gnome.shell.extensions.ubuntu-dock isolate-workspaces false)

2. Fix the App Switcher (Alt + Tab)

This ensures your Alt + Tab menu also lets you see and switch to apps living on other workspaces:

bash

gsettings set org.gnome.desktop.interface alt-tab-window-filter 'all-workspaces'

Use code with caution.


🎉 The Result

The changes apply immediately. Clicking an app icon will now seamlessly slide your desktop back and forth between workspaces to show your already-opened apps, completely eliminating accidental duplicates.