If you’re using GNOME on Arch Linux and find that opening a new terminal window switches you to the workspace with an existing terminal, you’re not alone. This behavior stems from GNOME’s default handling of application instances, where it tries to focus on an existing instance instead of opening a new one in your current workspace. Fortunately, there’s a simple fix using the preinstalled “Launch new instance” GNOME Shell extension. In this blog post, I’ll walk you through how to enable this extension to ensure new terminal windows open in separate workspaces without switching focus.
The Problem
When you open a terminal (e.g., GNOME Terminal) in one workspace and try to open another in a different workspace, GNOME often switches you back to the workspace with the existing terminal. This can disrupt your workflow, especially if you rely on multiple terminals across workspaces for tasks like coding, system monitoring, or managing different projects.
The Solution: Enable the “Launch new instance” Extension
GNOME includes a preinstalled extension called “Launch new instance” (launch-new-instance@gnome-shell-extensions.gcampax.github.com
) that forces applications to open new windows instead of focusing on existing ones. While this extension is included in the gnome-shell-extensions
package on Arch Linux, it’s not enabled by default in the standard GNOME session (unless you’re using GNOME Classic). Enabling it is quick and straightforward using a few terminal commands.
Step-by-Step Guide
Here’s how I resolved the issue on my Arch Linux system running GNOME:
1. Verify the Extension is Installed
First, check if the gnome-shell-extensions
package is installed, as it contains the “Launch new instance” extension.
pacman -Qs gnome-shell-extensions
This command checks if the package is installed. If you see output like extra/gnome-shell-extensions 48.1-1
(version may vary), you’re good to go. If not, install it with:
sudo pacman -S gnome-shell-extensions
2. List Available Extensions
To confirm that the “Launch new instance” extension is available, list all installed GNOME Shell extensions:
gnome-extensions list
Look for launch-new-instance@gnome-shell-extensions.gcampax.github.com
in the output. This is the UUID of the extension we need to enable.
3. Enable the Extension
Enable the “Launch new instance” extension with the following command:
gnome-extensions enable launch-new-instance@gnome-shell-extensions.gcampax.github.com
This activates the extension, modifying GNOME’s behavior so that clicking an application icon (or launching via the overview) opens a new instance instead of switching to an existing one.
4. Verify the Extension is Active
To ensure the extension is enabled, check its status:
gnome-extensions info launch-new-instance@gnome-shell-extensions.gcampax.github.com
Look for state: ACTIVE
in the output. If it’s active, the extension is running.
5. Test the Behavior
- Switch to a workspace (e.g., press
Super + 1
to go to workspace 1). - Open a terminal (e.g., GNOME Terminal).
- Switch to another workspace (e.g.,
Super + 2
). - Open a new terminal via the dash, application overview, or by running
gnome-terminal --new-window
. - You should now see the new terminal open in the current workspace without GNOME switching to the previous workspace.
6. Apply Changes
If the behavior doesn’t change immediately, restart GNOME Shell:
- On Xorg: Press
Alt + F2
, typer
, and pressEnter
. - On Wayland: Log out and log back in, or reboot with
reboot
.
You can check your session type with:
echo $XDG_SESSION_TYPE
Why This Works
GNOME’s default behavior groups application instances to reduce clutter, but this can be inconvenient when you want separate terminal windows in different workspaces. The “Launch new instance” extension overrides this by ensuring that clicking an application’s icon (or launching it via other means) creates a new window in your current workspace, rather than focusing on an existing instance elsewhere.
Troubleshooting Tips
-
Extension Not Found: If
gnome-extensions list
doesn’t showlaunch-new-instance@gnome-shell-extensions.gcampax.github.com
, reinstall the package:
sudo pacman -S --overwrite '*' gnome-shell-extensions
- No Effect After Enabling: Check for errors in the GNOME Shell logs:
journalctl -xe | grep gnome-shell
-
Alternative Tools: If the extension doesn’t fully resolve your needs, consider tools like
wmctrl
to programmatically open applications in specific workspaces or extensions like Pop Shell for advanced workspace management.
Conclusion
With just a few terminal commands, you can enable the “Launch new instance” extension to make GNOME open new terminal windows in your current workspace without switching to an existing one. This small tweak has been a game-changer for my multi-workspace workflow on Arch Linux, and I hope it helps you too! If you run into issues, double-check your GNOME version (gnome-shell --version
) and session type, or explore other GNOME extensions for even more control.
Happy multitasking!
Top comments (0)