The Disorienting Desktop Jump
Virtual workspaces are one of the most powerful features in Ubuntu Linux, allowing you to separate your development environment from your email client. However, Ubuntu has a frustrating default behavior: if you are working peacefully on Workspace 1 and a background application (like an email client or a chat app) opens a new window or finishes a long task on Workspace 3, Ubuntu will instantly and violently rip your screen away, panning all the way to Workspace 3 to “focus” on the new event. This completely destroys your concentration and interrupts your typing.
How to Disable Automatic Workspace Switching
You can use the advanced GNOME Tweaks tool to disable this aggressive focus-stealing behavior, ensuring that background applications remain quietly in their own workspaces until you are ready to visit them.
1. First, you must ensure GNOME Tweaks is installed. Open your terminal.
2. Run the following command and press Enter: sudo apt install gnome-tweaks
3. Press the Super (Windows) key, type Tweaks, and hit Enter to open the application.
4. In the left-hand sidebar of the Tweaks window, click on Windows.
5. Look at the options available in the main pane.
6. You need to change the “Window Focus” or “Focus Stealing Prevention” settings. Unfortunately, depending on your exact version of Ubuntu (GNOME 40 vs 42 vs 44), the exact wording changes. If you see a toggle for Focus Stealing Prevention, set it to High or Strict.
7. If you do not see that toggle, you must use the terminal directly. Open your terminal again.
8. Run this command to disable aggressive focus switching: gsettings set org.gnome.desktop.wm.preferences focus-new-windows 'strict'
Managing Background Notifications
By setting the window focus to “strict,” new applications that launch in the background on other workspaces will no longer drag your camera away. Instead, they will quietly bounce their icon in the Ubuntu dock or send a small, silent notification to the top panel, allowing you to finish typing your code or document before manually switching workspaces to investigate the new window.