Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running compiz 0.8.2 with compizconfig on Scientific Linux 6.2 with Gnome 2.28.2. In the compizconfig "General Options" I have "Desktop Size" set as follows:

  • Horizontal Virtual Size: 6
  • Vertical Virtual Size: 1
  • Number of Desktops: 1

This gets me the layout I want, i.e. 6 workspaces in a horizontal layout. Ctrl-alt-cursor-keys work fine for switching between them. However, I can't figure out how to get key bindings for specific workspaces. I've tried enabling "Viewport Switcher" in compizconfig, and tried various combinations both in "Number-based viewport switching" and "Go to specific viewport", to no apparent effect.

My first thought was that something else was eating the specific key bindings I chose, but I think I've tried every combination of shift, control, alt and super (i.e., the Windows key) by now.

I tried setting 6 desktops under "General Options" instead of one desktop with horizontal virtual size 6, but that doesn't seem to make a difference either.

What am I missing?

share|improve this question
tested, it works perfectly with me (I've used Super F1, Super F2...)... clueless for now – ShinTakezou Apr 7 '12 at 14:11
up vote 2 down vote accepted

The thread “Switch to specific workspace” shortcuts don't work after a reboot seems like it addresses your problem exactly.

It uses the fact that Compiz "workspaces" are actually viewports of a single workspace.

wmctrl -d is used to find out the size of the real workspace including all viewports. Dividing this by the number of viewports gives the size of one viewport in pixels. Then for example wmctrl -o 768,0 displays the viewport whose horizontal offset is 768 pixels.

The thread also describes how to use the Compiz Settings Manager to bind these wmctrl commands to keys.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.