Skip to content
Google Chrome Releases

Fix Firefox virtual desktop behavior in 145: two about:config prefs

Fix Firefox virtual desktop behavior in 145: two about:config prefs I’ve watched Firefox yank a new window onto the wrong desktop mid-call. It’s annoying, and in Firefox 145 it’s finally tweakable. What changed (and why you care) Virtual desktops work until they don’t. You sit on Desktop 2, click a link in Slack, and Firefox […]

Jack Pauley November 28, 2025 6 min read

Fix Firefox virtual desktop behavior in 145: two about:config prefs

I’ve watched Firefox yank a new window onto the wrong desktop mid-call. It’s annoying, and in Firefox 145 it’s finally tweakable.

What changed (and why you care)

Virtual desktops work until they don’t. You sit on Desktop 2, click a link in Slack, and Firefox decides Desktop 1 deserves your attention more than you do.

Firefox 145 (released November 11, 2025) added a switch for that Windows behavior. It’s called widget.prefer_windows_on_current_virtual_desktop, and it lets you choose whether Firefox should prefer windows on the desktop you’re actively using when another app opens a link.

There’s a second switch that controls session restore placement. It’s browser.sessionstore.restore_windows_to_virtual_desktop, and it decides whether Firefox tries to put restored windows back on their prior virtual desktops.

These aren’t the only interesting things in Firefox 145 — it also shipped fingerprinting protections that cut unique user identification nearly in half, PDF commenting, Copy Link to Highlight (text fragments), and Enhanced Bounce Tracking Protection. But the virtual desktop fix is the one that matters if you use multiple desktops for focus management.

Before you touch about:config

Back up first. Seriously.

I’ve seen people flip one “harmless” pref, forget what they changed, then spend an hour chasing ghosts. If you run a work machine with managed policies or a tiling window manager, your results will depend on your setup, so you want an easy rollback.

  • Use a throwaway profile: Create a new Firefox profile for testing, change the prefs there first, then copy the behavior into your main profile if it works.
  • Know your platform limits: The “current virtual desktop” preference targets Windows virtual desktops. On macOS Spaces and Linux workspaces, your window manager can still make its own calls.

Create a test profile (30 seconds)

Don’t test in your main profile. Firefox Profile Manager makes this easy:

# Windows (Run dialog or terminal)
firefox.exe -P

# macOS
/Applications/Firefox.app/Contents/MacOS/firefox -P

# Linux
firefox -P

Click “Create Profile,” name it “desktop-test,” and launch. Any pref changes you make stay isolated. If something breaks, delete the profile and you’re back to normal.

Step-by-step: set the two prefs

So. Open a new tab and type about:config.

Firefox shows a warning because these settings can break things. Accept it, then use the search box at the top.

1) Control where external-link windows open

Search for widget.prefer_windows_on_current_virtual_desktop.

  • Set it to true: Firefox prefers windows on your current virtual desktop when another app opens a link. This usually stops the “teleport to Desktop 1” problem.
  • Set it to false: Firefox can reuse a window on a different desktop, which some people prefer because it keeps everything in one “main” Firefox window.

This pref also interacts with Firefox 145’s new “Open links from apps next to your active tab” setting (in Settings → General). When both are enabled, external links open on your current desktop and next to your active tab — much better than the old behavior of landing at the end of the tab strip on a different desktop.

2) Control where session restore puts your windows

Search for browser.sessionstore.restore_windows_to_virtual_desktop.

  • Set it to true: Firefox attempts to restore windows back to the virtual desktops they lived on when you closed the browser. Great if you keep “Project A” and “Project B” separated.
  • Set it to false: Firefox restores onto your current desktop so you can reorganize from scratch. I do this on my personal laptop because I hate hunting for a window across four desktops.

If you flip these and nothing changes, do not assume Firefox ignored you. Test with a clean profile, then check whether your OS or window manager overrides window placement.

Quick verification tests (takes 2 minutes)

Test it. Do not guess.

Run these in order. They tell you whether you fixed the actual problem or just changed a pref that never applied in your environment.

  • Test A (external link): Put Firefox on Desktop 1. Switch to Desktop 2. From another app (Slack, Outlook, Teams), click a link. Expectation: with widget.prefer_windows_on_current_virtual_desktop=true, the Firefox window you get should appear on Desktop 2.
  • Test B (session restore): Put one Firefox window on Desktop 1 and another on Desktop 2. Close Firefox fully. Reopen it. Expectation: with browser.sessionstore.restore_windows_to_virtual_desktop=true, windows should try to return to their prior desktops.
  • Test C (tab placement): With both prefs set to true, put Firefox on Desktop 2 with 5 tabs open. From Slack on Desktop 2, click a link. It should open on Desktop 2 in a tab next to your current one, not at the end of the strip on Desktop 1.

Platform-specific behavior: Windows vs macOS vs Linux

These prefs don’t behave identically across operating systems. Here’s what I’ve observed:

Windows 10/11 Virtual Desktops

This is the primary target. Windows virtual desktops are well-supported and the prefs work as described. One gotcha: if you have “Show windows from all desktops” enabled in Windows Settings → System → Multitasking, the OS may override Firefox’s placement. Check that setting first.

macOS Spaces

Partial support. macOS Spaces has its own window assignment logic that can fight Firefox. If you’ve assigned Firefox to a specific Space (right-click Dock icon → Options → Assign To), that takes priority over Firefox’s prefs. For best results:

  • Set Firefox to “None” in Dock → Options → Assign To
  • Disable “When switching to an application, switch to a Space with open windows” in System Settings → Desktop & Dock if you want Firefox to stay put

Linux (GNOME, KDE, i3, Sway)

Highly dependent on your window manager. GNOME and KDE generally respect the prefs. Tiling window managers (i3, Sway, Hyprland) have their own window placement rules that typically override application preferences. If you use a tiling WM, configure window rules in your WM config instead:

# i3/Sway example: assign Firefox to workspace 2
assign [class="firefox"] workspace 2

# Hyprland example:
windowrulev2 = workspace 2, class:^(firefox)$

Troubleshooting when Firefox still opens on the “wrong” desktop

This bit me when I had a window manager “helper” running. It fought Firefox and won.

  • You cannot find the prefs: Confirm you’re actually on Firefox 145 or newer. Run about:support → Application Basics → Version. If you’re on an older version, those keys won’t exist.
  • The behavior never changes: Disable any desktop/window placement utilities temporarily. On Linux, check your desktop environment’s window rules. On Windows, check tools that manage focus or window switching (PowerToys FancyZones can interfere).
  • Session restore scatters windows unpredictably: Set browser.sessionstore.restore_windows_to_virtual_desktop=false and see if the chaos stops. If it does, your OS likely reports virtual desktop IDs differently across logins or monitor changes.
  • External links still teleport you: Check if your default browser is actually Firefox 145+, not an older installation. On Windows: Settings → Apps → Default apps → Web browser. On macOS: System Settings → Desktop & Dock → Default web browser.

Alternative: Firefox Profiles for hard separation

Profiles beat prefs. Most days.

If you want hard separation between work and personal browsing — different bookmarks, different extensions, different logins — use Firefox Profiles. If you only need cookie separation inside one window, use Multi-Account Containers.

# Launch a specific profile directly (skips the profile picker)
firefox -P "Work" --no-remote
firefox -P "Personal" --no-remote

# The --no-remote flag lets you run multiple profiles simultaneously.
# Without it, Firefox tries to reuse the existing instance.

Combine profiles with virtual desktops and you get actual separation: Work profile on Desktop 1, Personal profile on Desktop 2, and the prefs above keep them from jumping around.

Related Reading

🛠️ Try These Free Tools

🗺️ Upgrade Path Planner

Plan your upgrade path with breaking change warnings and step-by-step guidance.

💰 Kubernetes Cost Estimator

Compare EKS, GKE, and AKS monthly costs side by side.

❤️ Tech Stack Health Scorecard

Select your technologies and get an instant A-F health grade with live badges.

See all free tools →

Stay Updated

Get the best releases delivered monthly. No spam, unsubscribe anytime.

By subscribing you agree to our Privacy Policy.