Virtual desktops · desktop environments

Also known as: workspaces

On this page 7

Virtual desktops are separate, switchable workspaces within one graphical session, each holding its own set of open windows, so that a single physical screen can present several organized working contexts. In desktop environments such as GNOME, KDE Plasma, Windows and macOS, the feature is also called workspaces, Spaces or simply desktops, and it is implemented jointly by the window manager and the desktop shell.

The idea is older than most current systems: Unix window managers offered multiple virtual screens decades before mainstream platforms adopted the concept. Today virtual desktops are a standard productivity feature that reduces window clutter without closing applications, and they behave differently from a second monitor, from window snapping and from running separate user sessions.

How virtual desktops organize windows

A virtual desktop is a label attached to windows, not a separate machine. Every application still runs in the same user session and the same process space; the window manager simply shows only the windows assigned to the active desktop and hides the rest. Switching desktops therefore does not pause programs: a download, a compile job or a video call continues in the background.

On X11 systems, the convention for this is defined by the Extended Window Manager Hints (EWMH) specification. The window manager publishes the number of desktops, their names and the current desktop as root-window properties, and each window carries a desktop index. On Wayland, the compositor owns all of this state directly, and panels or pagers learn about it through compositor-specific protocols rather than shared properties.

Most implementations also allow sticky windows that appear on every desktop, which is useful for a music player, a chat window or a reference document. Some environments additionally let a window be assigned to a chosen desktop automatically when it opens, through window rules based on application name or window class.

The table below summarizes the main components that cooperate to provide virtual desktops.

ComponentRoleExample of behavior
Window managerTracks which desktop each window belongs toHides windows of inactive desktops
CompositorDraws the visible desktop and transition effectsSlide or zoom animation on switch
Desktop shellProvides overviews and switching controlsThumbnail overview of all desktops
Pager or indicatorShows desktops in a panelSmall grid of desktop previews
ApplicationUsually unaware of desktopsKeeps running when hidden
Components involved in virtual desktops

Layout models and configuration options

Environments differ mainly in how desktops are created and arranged. Some keep a fixed number set in preferences, while others use dynamic workspaces that add an empty desktop automatically whenever the last one receives a window and remove empty ones when they are no longer needed. Layout can be a single row, a grid or a free list, which affects keyboard navigation.

A second important choice is multi-monitor behavior. In one model, switching a desktop changes all monitors at once; in another, each monitor switches independently, or secondary monitors stay fixed while only the primary display changes. This setting strongly influences how comfortable virtual desktops feel on a dual-screen workstation.

OptionTypical valuesEffect on daily use
Number of desktopsFixed 2-9 or dynamicFixed counts suit muscle memory
ArrangementRow, column or gridDetermines arrow-key navigation
Multi-monitor modeSpan all, per monitor, primary onlyControls what changes on switch
Taskbar scopeCurrent desktop or all desktopsReduces clutter in the panel
Switch animationSlide, fade or noneVisual orientation versus speed
Wrap-aroundOn or offLast desktop leads back to the first
Common configuration options for virtual desktops

Keyboard shortcuts are central to the feature. Typical bindings use Ctrl or Super with arrow keys to move between neighboring desktops, number keys to jump directly, and an additional modifier such as Shift to move the focused window to another desktop. Touchpad gestures with three or four fingers perform the same switch on many laptops.

Virtual desktops across major desktop environments

Every mainstream desktop environment offers virtual desktops, but naming, defaults and flexibility vary considerably. The comparison below reflects the general approach of each environment rather than every configurable detail.

EnvironmentName usedDefault behaviorNotable trait
GNOMEWorkspacesDynamic, horizontal rowOverview shows all workspaces
KDE PlasmaVirtual desktopsFixed count, configurable gridPer-desktop wallpapers and rules
Windows 10 and 11DesktopsCreated on demand in Task ViewNames and wallpapers per desktop
macOSSpacesManaged in Mission ControlFull-screen apps get their own Space
Tiling window managersWorkspaces or tagsUsually numbered 1-9 or 1-10Keyboard-first, often per monitor
How major environments implement virtual desktops

Tiling window managers deserve a special mention because some of them replace classic desktops with tags: a window can carry several tags at once and the user views any combination of tags. This is more flexible than strict one-window-one-desktop assignment but requires a different mental model.

Virtual desktops are often confused with additional monitors, window snapping and separate user sessions, yet each solves a different problem. Virtual desktops multiply organizational space over time, while a second monitor multiplies visible space at the same moment.

FeatureWhat it multipliesIsolation levelBest suited for
Virtual desktopsOrganizational contextsNone, same sessionSeparating tasks and projects
Second monitorSimultaneously visible areaNoneViewing two things at once
Window snappingLayout on one screenNoneSide-by-side comparison
Separate user sessionWhole environmentsDifferent user accountSharing a computer
Virtual machineComplete operating systemsStrong, separate kernelTesting and security isolation
Virtual desktops compared with neighboring concepts

The key point is that virtual desktops provide no security or privacy boundary. Applications on one desktop can read the clipboard, receive drag and drop data and send desktop notifications that appear on any desktop. Anyone who needs real separation should use a separate account or a virtual machine instead.

Practical habits and common pitfalls

Virtual desktops work best when each desktop has a stable, predictable purpose, for example communication on the first, the main project on the second and research on the third. Users who create desktops randomly often lose track of windows and gain little over a single crowded screen.

  • Lost windows: an application seems closed but is open on another desktop; the overview or the window switcher set to show all desktops finds it.
  • Applications opening on the wrong desktop: some programs restore to the desktop where they were last placed; window rules fix this predictably.
  • Single-instance applications: a browser or mail client with one main window may jump to the active desktop or switch the user away, depending on the environment.
  • Notifications and dialogs: a modal dialog may appear on the desktop of its parent window, which makes the active application look frozen.
  • Screen sharing: sharing a single screen in a video call shows whichever desktop is active, so switching desktops can expose unintended content.

Performance cost is usually negligible, because hidden windows are not drawn. However, the applications themselves keep consuming memory and processor time, so many open programs spread over many desktops still load the system as heavily as the same programs on one desktop.

Understanding it simply

Imagine a desk with several clean tabletops stacked inside it. You can slide one tabletop out for your email, another for a school project and another for a game, and switch between them instantly without putting anything away. Virtual desktops do exactly this on a computer screen.

Nothing stops running when you switch. Your music keeps playing and your files keep downloading. You only change which windows you see, which keeps the screen tidy and helps you focus on one task at a time.

Applied in practice

A freelance web developer works on a single 27-inch monitor running KDE Plasma with four virtual desktops arranged in one row. Desktop one holds the mail client and team chat, desktop two the code editor and a terminal, desktop three a browser with developer tools, and desktop four design files from a client. Window rules send each application to its desktop automatically when it starts.

During a client call, the developer shares only the browser window rather than the whole screen, so switching to the editor does not reveal private messages. Moving between desktops with Ctrl and the arrow keys takes a fraction of a second, and the developer reports that context switching becomes faster and less distracting than searching through a crowded taskbar of more than twenty windows.