Workspaces – What is a Viewport and a Workspace

workspaces

Is a viewport different from a workspace? What's the distinction? It seems like the terms get used interchangeably.

I'm trying to accomplish something that other people have been stabbing at for a while — I have a script that launches a bunch of programs at once and I'd like to launch them in a specific workspace. The question's been asked:

https://askubuntu.com/questions/35678/how-can-i-start-a-program-in-a-different-workspace

How to run a custom set of programs in a specific workspace?

But the answers hop between talking about "viewports" and "workspaces" — how are they different?

Best Answer

Window Managers (like metacity) assume that each workspace is a discrete entity. Windows are either on one or another workspace. Think of this as several physical desks.

Compiz works differently. It uses something called a viewport, into one workspace. This is what allows you to have windows overlapping the edge of the cube. Think of this as one big physical desk, but where you can only see one part of it at a time.

And regarding getting programs to launch on another workspace or viewport (depending on what window manager you use): there is a programm called wmctrl that allows you to switch from command line.

If you want something fancy with compiz/viewports have a look at this script. It uses wmctrl and accepts you telling it things like 'goto ViewportNumber 1'.

Related Question