From a productivity standpoint, one of the things I love most about the Linux desktop environment is the ability to have multiple desktops that I can spread my running applications across. This function has been standard for centuries on any UNIX-like operating system running an X Window GUI. On the other hand, while it’s supported in Mac OS X via Spaces, it isn’t configured by default, and switching desktops isn’t possible at all in Windows without a third-party utility. So the standard way of working with applications in these OSes is to cram all your windows into one screen, or minimize them to the taskbar or dock. Even when I had no other choice or didn’t know any better, I’ve always found this to be a very cluttered way of organizing windows. If you tend to have a lot of things running - as I usually do - you spend a lot of time sorting through all the clutter on your screen, trying to find the window you need.1
With a virtual desktop environment, you can spread your windows out over multiple workspaces. While only one workspace at a time is usually visible, the rest are accessible with a mouse click.2 I usually have four workspaces configured, and I tend to organize applications between them according to function: usually Internet, multimedia, graphics, and word processing. I’m not too anal about this, because not everything I do falls neatly into those categories, and there are times when you need to see your Web browser alongside OpenOffice. But, generally speaking, I don’t have to think too hard about where I left a certain application running: Firefox is usually on desktop 1, the Gimp on desktop 3, and so forth. It certainly beats Alt-Tabbing through a dozen open windows until you find that letter you were writing.
If you click the Window Menu icon (the icon in the top left corner of the window) of a GNOME window, it displays the Window Menu. This menu gives various options for manipulating windows: moving, resizing, and so forth. (Ubuntu’s new default Ambiance theme has no Window Menu icon. Right-click on the titlebar to get the menu.) If you’re a past Windows user, you’re probably familiar with this. However, a GNOME Window Menu has several additional options that its Windows counterpart does not, because of the multiple workspaces. You can move a window to any specific workspace, or have it appear on all workspaces simultaneously. You can even have it stay on top, so it doesn’t disappear behind other windows when you change tasks. Because of the way I use my workspaces, the most important of these options for me is Move to Another Workspace. For example, if I am working on a letter in workspace 4 and want to listen to some music, I can start Rhythmbox, my media player, and move it directly to workspace 2 (where I prefer to keep multimedia applications).
Unfortunately, when I upgraded to Lucid, I became a little frustrated when I found out this function no longer worked! To be precise, it works just fine in GNOME, but not when running the compiz window manager. Apparently, this is a known bug in compiz. I could use another window manager such as metacity, but there’s no way I’m giving up my 3D eye candy. So I started looking for alternative ways of quickly sorting my windows. I found five.
Note: My desktop environment consists of Ubuntu 10.04 running GNOME 2.30.02 and compiz 0.8.4. Your mileage may vary.
Use the keyboard
Choose the window you want to move by clicking on it, then press <Ctrl>-<Alt>-<Shift>-<Left> or <Ctrl>-<Alt>-<Shift>-<RIght> to cycle it through adjacent workspaces consecutively.
If you don’t mind taking your hand off the mouse (and any hotkey combination with three modifier keys is definitely a two-handed operation), this is probably the quickest way to move your windows around.
Move it one workspace at a time
The Window Menu has two options that do pretty much what they say on the label: Move to Workspace Left and Move to Workspace Right. Choosing these options will move the window one workspace left or right. There’s no rule that says you can’t do this more than once, but if you have a long way to go it can get a little repetitive, and unfortunately it won’t “wrap” to the other end when you reach the extreme left or right, so there's no shortcut.
Put it everywhere first
Choose Always on Visible Workspace. Again, this menu option does exactly what it says: when you switch workspaces, the window comes with you. Then, switch to the workspace you want the window on, open the Window Menu again, and choose Only on This Workspace.
I call this the "Infinite Improbability" option, because the window passes through every point on your desktop simultaneously before reaching its final destination.3 It’s a bit of a cheat. But it takes no more work to move a long distance than a short one.
Drag it between workspaces
That compiz bug might have crippled the most useful function in GNOME's Window Menu, but compiz still has a few workarounds of its own. If you haven’t already done so, install the CompizConfig Settings Manager via your preferred method of package management (the package name is
compizconfig-settings-manager). Once installed, you’ll find it under System > Preferences > CompizConfig Settings Manager.
"Edge flipping" simply means that when you drag a window to the edge of one workspace, it will "flip" into the adjacent one. Thus you can position a window anywhere using just the mouse.
To enable edge flipping, open CompizConfig, then select the Desktop Wall plugin (which you will find under “Desktop”) by clicking on its icon. Then, choose the Edge Flipping tab. Check the Edge Flip Move box and the Enable Desktop Wall box.
Now you can drag windows between workspaces. As with Move to Workspace Left/Right, however, this is most useful when you are moving short distances.
Get the big picture
There’s one method left, and it’s the most spectacular of the five. It uses another compiz plugin called Expo.
Open CompizConfig and select the Expo plugin (again, found under “Desktop”). Under the Bindings tab, take note of the hotkeys to enable Expo, or change them to something else that you prefer. On my system, I use <Super>-e (that is, hold down the Windows key and type
e) on the keyboard, and <Ctrl>-Button2 on the mouse. The Behaviour and Appearance tabs contain options for Expo’s appearance. If you want, experiment with them until you see something you like. Since I run an older system, a lot of visual effects are wasted, so I’ve pared them own.
Check the Enable Expo box and close CompizConfig. Now, when you press the hotkey to toggle Expo, you see something like this:
Expo zooms out and shows you a bird’s eye view of all your workspaces at once. Better, it’s not just an abstract representation: it updates all the windows in real time so you can see what’s going on. You can’t work with them, but you can drag them around, even between workspaces. To switch back to a usuable workspace, just press your hotkey again, or double-click on some empty desktop, and Expo will zoom back to the workspace you left. You can also single-click on another desktop to make it current, and Expo will zoom back to it instead. Finally, you can double-click on an application window you want to work with, and Expo will zoom in to the workspace it is on.
Personally, I feel that using the Window Menu to select a specific workspace is the easiest and most direct way to accomplish this task. Every time I download updates to GNOME or compiz, I check to see if it’s been fixed yet. Unfortunately, it hasn’t. But happily, it’s Linux’s nature to have many ways of doing the same thing.
1 Underfootnote: Much like my literal desktop, for that matter.
2 Unambiguous footnote: A friend of mine thought this meant you could have two or more instances of the operating system running concurrently, and asked whether he could have Linux on one desktop and Windows on another. No. It’s one OS with much more desktop real estate than your monitor can display at once, so you choose which screenful you want to see. Though this seemed obvious to me from the start, apparently that isn't the case with everyone.
3 So Long, and Thanks for All the Footnotes: With apologies to Douglas Adams.