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.
| Component | Role | Example of behavior |
|---|---|---|
| Window manager | Tracks which desktop each window belongs to | Hides windows of inactive desktops |
| Compositor | Draws the visible desktop and transition effects | Slide or zoom animation on switch |
| Desktop shell | Provides overviews and switching controls | Thumbnail overview of all desktops |
| Pager or indicator | Shows desktops in a panel | Small grid of desktop previews |
| Application | Usually unaware of desktops | Keeps running when hidden |
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.
| Option | Typical values | Effect on daily use |
|---|---|---|
| Number of desktops | Fixed 2-9 or dynamic | Fixed counts suit muscle memory |
| Arrangement | Row, column or grid | Determines arrow-key navigation |
| Multi-monitor mode | Span all, per monitor, primary only | Controls what changes on switch |
| Taskbar scope | Current desktop or all desktops | Reduces clutter in the panel |
| Switch animation | Slide, fade or none | Visual orientation versus speed |
| Wrap-around | On or off | Last desktop leads back to the first |
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.
| Environment | Name used | Default behavior | Notable trait |
|---|---|---|---|
| GNOME | Workspaces | Dynamic, horizontal row | Overview shows all workspaces |
| KDE Plasma | Virtual desktops | Fixed count, configurable grid | Per-desktop wallpapers and rules |
| Windows 10 and 11 | Desktops | Created on demand in Task View | Names and wallpapers per desktop |
| macOS | Spaces | Managed in Mission Control | Full-screen apps get their own Space |
| Tiling window managers | Workspaces or tags | Usually numbered 1-9 or 1-10 | Keyboard-first, often per monitor |
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.
How virtual desktops differ from related features
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.
| Feature | What it multiplies | Isolation level | Best suited for |
|---|---|---|---|
| Virtual desktops | Organizational contexts | None, same session | Separating tasks and projects |
| Second monitor | Simultaneously visible area | None | Viewing two things at once |
| Window snapping | Layout on one screen | None | Side-by-side comparison |
| Separate user session | Whole environments | Different user account | Sharing a computer |
| Virtual machine | Complete operating systems | Strong, separate kernel | Testing and security isolation |
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.