Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I freshly installed maverick on my new notebook, I set up my keyboard shortcuts like this: Switch to WS 1 = Mod4+1, Move Window to WS 1 = Mod4+Shift+1, Switch to WS 2 = Mod4+2 and so on (Mod4 being the "Windows" key). But now the three-key combinations (i.e. the ones I use for "move to...") stopped working. When I go to keyboard preferences, I still see them and I can even change them to a different combination and then again to the desired one - but they won't execute the window movement afterwards :/ Any suggestions how to fix this?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I think Compiz is preventing these shortcuts to work. Can you try this:

metacity --replace

Then try your shortcuts.

Else, if you want your visual effects by Compiz, you can do a trick:

If you are using Compiz, you will have to do a trick because Compiz "workspaces" are actually Viewports of a single Workspace.

We will need wmctrl and Compiz.

You can install these from the Ubuntu Software Center or by clicking here (wmctrl) and here (Compiz)

The Shortcuts

# Open Compiz (Alt + F2 and type ccsm and hit Enter)

# Go to Keybindings and make the shortcuts you want.

# Then go to Commands and add the commands for yours shortcuts (see below).

The Commands (Trick Instructions)

Go to a terminal and check the output of wmctrl -d. For example, mine is:

0 * DG: 4098x2304 VP: 1366,0 WA: 0,23 1366x745 N/A

This means that actually I have one Workspace of 4098 x 2304 instead of what I "think" I have (nine "workspaces", 3 x 3).
I was at what was supposed to be "workspace" 2, but actually I was at viewport (VP) 1366,0 (4098 / 3 = 1366) as showed by the output above.

So this is how it works: we take the whole Workspace and divide for the numbers of "workspaces" we "think" we have. In my case: 4098 / 3 = 1366 and 2304 / 3 = 768.

if I want to go to my "workspace" 1, the command is:
wmctrl -o 0,0

Then, if I want to go to my "workspace" 4, the command is:
wmctrl -o 0,768

if I want to go to my "workspace" 8, the command is:
wmctrl -o 1366,1536

if I want to go to my "workspace" 9, the command is:
wmctrl -o 2732,1536

Got it? ;-)

share|improve this answer
    
I'm on Maverick and don't want to change the Window Manager, just the old behavior back :) –  c089 Apr 10 '11 at 6:11
    
metacity --replace, /bin/sh -c /usr/bin/compiz-decorator. This is a plain maverick installation, really. I did not customize the window manager etc., just added my keyboard shortcuts. –  c089 Apr 11 '11 at 13:36
    
Thanks, that works fine. It obviously deactivates desktop effects, but keyboard shortcuts are more important until I have the time to investigate how I can fix compiz. –  c089 Apr 13 '11 at 13:09
    
I've made a trick for you, so you don't need to disable Compiz. Hope you like ;-) –  desgua May 8 '11 at 3:23

Your Answer

 
discard

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.