Virtual Desktops

Two things have long pained me when watching other people use their computers. One is that the user often has dozens of icons on his desktop. So many, in fact, that he sometimes spends a minute just looking for the proper icon to click. The other is the poor window management options that Windows provides. A user may have several programs open at a time, and when he wants to launch a new program, usually from an icon on his desktop, he often has to drag windows out of the way, minimize them, or both. Not only is this a time-consuming process just to find an icon to launch a program, but it also means the user has to locate and move the previous program windows back into place when it comes time to use them again.

Fortunately, KDE has some nifty features that can help you organize your icons and open windows. Chapter 8 contains information on customizations you can make to the kicker to create quick-launch icons for programs and assign keyboard shortcuts to launch your favorite applications. But you can start using a feature right now that can help you manage open windows. It's called a virtual desktop, and once you start using it, you won't be able to get by without it.

In KDE, you can have several different desktops—each with its own windows and settings. Move's default configuration provides only two desktops, though you can configure KDE to use up to sixteen. The concept of virtual desktops is a little difficult to understand for people who haven't used them before, so it may be best to explain them with an analogy everyone should be familiar with: changing television channels.

Two of my favorite shows, Smallville and Lost, air at the same time on Wednesday nights. By using my remote I can switch channels between the two shows. My TV picture adjusts to display what is being broadcast on the other channel, and I can switch back to the first channel at any time. Back and forth, back and forth. The same TV, but different channels, each one showing a different show. It's so simple that it almost seems absurd to explain it.

Well, virtual desktops work the same way. Each desktop is displayed on the same monitor, but shows you a different "channel." What this means is you can have a program like Frozen-Bubble running on your first virtual desktop, and another program like KWrite running on the second one. And with a simple keyboard command or click of a mouse, you can switch between these different desktops and see the other program.

Virtual desktops allow you to better organize your open applications. Linux users often put different applications on different desktops and change between applications by switching desktops instead of minimizing and maximizing applications. Some Windows users who try out Linux never grasp the flexibility that virtual desktops allow them and continue to work in their normal manner on only one desktop. But the virtual-desktop converted enjoy the uncluttered feeling of virtual desktops and sincerely feel their loss when they are forced to use an OS that doesn't support them.

Task-oriented virtual desktops

I like to use four desktops. I run email applications on Desktop 2, word processing applications on Desktop 3, and web browsers on Desktop 4. Desktop 1 I reserve for those occasional odd programs that I run, like a remote connection to another system, so most of the time it is empty. If I kept icons on my desktop, an empty Desktop 1 would allow me easy access to them.

Switching between virtual desktops is easy—all you have to do is click on a mini version of the virtual desktop, which is shown in the desktop pager in the kicker panel. As you recall, the desktop pager is the small group of two numbered boxes on the righthand side of the kicker. If you're not running any programs, Desktop 1 looks exactly like Desktop 2, so you won't feel like you've changed "channels" at all when you switch between them. (Which makes it a lot like watching a Presidential address on different networks, but without the odd changes in color or volume.)

So let's perform the following little test just to confirm that virtual desktops do work. From Desktop 1, launch the KWrite application, type "This application is on Desktop 2" in the window, and then right-click the title bar and select To Desktop 2 Desktop 2, as shown in Figure 1-10. The KWrite window disappears from your current screen. Now launch the Frozen-Bubble game in Desktop 1 by clicking K Menu Play games Frozen-Bubble. (This is a fun game—you should play it sometime. But not now!) Now go to Desktop 2 by clicking on the number 2 in the desktop pager or by pressing Ctrl-Tab. You can now type away in the KWrite application. Feel like playing some Frozen-Bubble? Switch back to Desktop 1 by clicking on the number 1 in the pager or by pressing Ctrl-Tab again. See? Using virtual desktops is just like changing TV channels!

Sometimes you want the same window to appear on every desktop. For example, maybe you need a small chat window or an alarm clock to always be visible. You can make this happen by right-clicking on the title bar and choosing To Desktop All Desktops.

Quick desktop switches

Pressing Ctrl-F1 or Ctrl-F2 sends you immediately to the corresponding desktop. Pressing Ctrl-Tab cycles through the desktops in ascending order; Ctrl-Shift-Tab cycles through in descending order. Moving past the last desktop brings you back to the first one.

Send a window to the second virtual desktop

Figure 1-10. Send a window to the second virtual desktop

You can change the number of virtual desktops by right-clicking the desktop and choosing Configure Desktop. In the window that appears, click the Multiple Desktops icon, then in the configuration pane to the right of the icon, move the slider to the desired number. More desktops can make it easier to manage your active applications, but too many can make it difficult to remember which application is on which desktop. The taskbar, by default, is configured to show all running applications, so clicking on a program in the taskbar switches to the appropriate desktop and brings the application to the front.

Get Test Driving Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.