Impossible to switch workspace on compiz when VirtualBox is opened

Bug #177510 reported by Saivann Carignan
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Invalid
Low
Unassigned
virtualbox-ose (Ubuntu)
Expired
Low
Unassigned

Bug Description

If I open a VirtualBox guest system like Windows XP in VirtualBox, I can't switch to another workspace using CTRL + ALT + Right/Left Arrow or with CTRL + ALT + Holding mouse.

What's really strange about that bug, it's that if I use the compiz cube plugin with transparency and that I try to initiate the cube with CTRL + ALT + Holding mouse, the desktop background will become transparent, but the cube won't initiate. This bug can sometime lead to more dramatic problems like loosing access to windows in each workspace.

Steps to reproduce the bugs are :

1. Make sure Compiz is enabled
2. Open a guest operating system in VirtualBox
3. Press CTRL + ALT + Right/Left arrow to switch to another workspace, it won't work.

Revision history for this message
Travis Watkins (amaranth) wrote :

The issue that you reported is one that should be reproducible with the live environment of the Desktop CD of the development release - Hardy Heron. It would help us greatly if you could test with it so we can work on getting it fixed in the actively developed release. You can find out more about the development release at [WWW] http://www.ubuntu.com/testing/

You can install Virtualbox on the LiveCD and load it with the VM image from your hard drive.

Changed in compiz:
status: New → Incomplete
Revision history for this message
Saivann Carignan (oxmosys) wrote :

Reproduced in Linux ubuntu hardy alpha 4
compiz 1:0.7.0-0ubuntu2
virtualbox 1.5.4 from the official website, but also the virtualbox-ose from ubuntu repositories.

Changed in compiz:
status: Incomplete → New
Revision history for this message
Marcelo Briones (margori) wrote :

Reproduced in Ubuntu 7.10, Virtualbox 1.5.0.

This are the steps to reproduce the bugs are:

1- Open VirtualBox.
2- Start any virtual computer.
3- Get sure that opened virtual computer window is active or focused.
3. Press CTRL + ALT + Right/Left arrow to switch to another workspace, it won't work.

Also reproducible without metacity.

Changed in virtualbox-ose:
status: New → Confirmed
Changed in compiz:
importance: Undecided → Low
status: New → Confirmed
Changed in virtualbox-ose:
importance: Undecided → Low
Revision history for this message
Saivann Carignan (oxmosys) wrote :

I believe that this bug is due to the fact that compiz or any other windows manager than metacity does not integrate as much as metacity with gnome, so VirtualBox can completely grab keys and even if compiz filter some special keys like "CTRL + ALT + Right arrow", it does not seem to gain any priority on VirtualBox.

The proof is that if I initialize a transparent cube with "CTRL + ALT + Left button", the desktop is suddenly transparent and I see the faces of the cube... but the cube does not initialize. ( See screenshot, we can see the 5 faces of the "cube" through the transparent desktop. At this point, I should be able to turn a transparent and zoomed cube with my mouse but I only get a transparent desktop like one face of the cube ).

Revision history for this message
Martin Gamache (martin-gamache) wrote :

I've got the same problem with Ubuntu 8.04 and VirtualBox 2.1.4...

Revision history for this message
Ryan Grange (ryangrange) wrote :

I have the official Sun Virtualbox installed for private use, but this should work for OSE with little or no modification.
1. Open CompizConfig Settings Manager.
2. Scroll to or select Window Managment.
3. Open the Window Rules options.
4. Add the following in the No ARGB Visuals box (without the quotes): "title=- Sun VirtualBox$"
5. Check the Enable Window Rules box if necessary.

If there are already rules in this block, you should add an or pipe (|) before the title specification.

More info on the other settings can be found here: http://wiki.opencompositing.org/WindowMatching#Window_Rules

Revision history for this message
Ryan Grange (ryangrange) wrote :

Sorry. Had two bugs open and posted to the wrong one.

Revision history for this message
gidantribal (aedo999) wrote :

I'm affected from this bug to (ubuntu 9.04)

Revision history for this message
neferty (roman-semko) wrote :

confirmed on Ubuntu Karmic 9.10 Alpha 5

Revision history for this message
gidantribal (aedo999) wrote : Re: [Bug 177510] Re: Impossible to switch workspace when VirtualBox is opened

bad news, then :(

2009/9/5 neferty <email address hidden>

> confirmed on Ubuntu Karmic 9.10 Alpha 5
>
> --
> Impossible to switch workspace when VirtualBox is opened
> https://bugs.launchpad.net/bugs/177510
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “compiz” package in Ubuntu: Confirmed
> Status in “virtualbox-ose” package in Ubuntu: Confirmed
>
> Bug description:
> This problem doesn't appear with metacity, it only appears with compiz.
>
> If I open a VirtualBox guest system like Windows XP in VirtualBox, I can't
> switch to another workspace using CTRL + ALT + Right/Left Arrow or with CTRL
> + ALT + Holding mouse.
>
> What's really strange about that bug, it's that if I use the compiz cube
> plugin with transparency and that I try to initiate the cube with CTRL + ALT
> + Holding mouse, the desktop background will become transparent, but the
> cube won't initiate. This bug can sometime lead to more dramatic problems
> like loosing access to windows in each workspace.
>
> Steps to reproduce the bugs are :
>
> 1. Make sure Compiz is enabled
> 2. Open a guest operating system in VirtualBox
> 3. Press CTRL + ALT + Right/Left arrow to switch to another workspace, it
> won't work.
>

Felix Geyer (debfx)
summary: - Impossible to switch workspace when VirtualBox is opened
+ Impossible to switch workspace on compiz when VirtualBox is opened
Revision history for this message
neferty (roman-semko) wrote :

I can reproduce this even with compiz turned off/not enabled. So this bug is not compiz-dependant.
Try to run a guest xp and use ctrl+alt+(right|left)to switch between workspaces.

Say, the virtualbox is running on desk2 (the only program on this desk or the one that's "focused"). If you are on desk1 and use the hotkey combination to switch to desk2 as long as you hold down ctrl+alt you can use the arrows to switch to desk3 or back to desk1. As soon as you release ctrl+alt on desk2 and the virtualbox gets focus the desktop switch hotkey stops working.

The problem is that the guest gets all the focus and virtualbox passes all the keystrokes to the guest (in this case windows xp) so that they don't "get through" to ubuntu. I've noticed this while running an program in guest xp which also had a ctrl+alt+arrows hotkey and responded to it.

Maybe a workaround could be that the virtualbox, apart of passing all the keystrokes to the guest, could echo these to ubuntu as well (or at least those specified in System>Preferences>keyboard shortcuts)? What do you think?

Revision history for this message
Travis Watkins (amaranth) wrote :

Since this is reported to happen with metacity too it isn't a compiz problem. It does seem obvious that is virtualbox is using Ctrl-Alt to grab/ungrab the keyboard and mouse that those things won't work when it is running.

Changed in compiz (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Saivann Carignan (oxmosys) wrote :

Yes it was exclusive to compiz, but not anymore in karmic where this problem affect both compiz and metacity. Description of the bug updated for that purpose.

description: updated
Revision history for this message
Apteryx (maxco) wrote :

If you press right ctrl (the one left of your arrow pad) one time then left_ctrl + Alt + Right/Left arrow, it will work.
The right_ctrl seems to tell VirtualBox to clear give the keyboard to host. This works well, I use it with Virtualbox (running fullscreen)

But It would be cool if just left_ctrl+Alt + Right/Left arrows would work without this trick.

Revision history for this message
Vincent Gerris (vgerris) wrote :

same problem for VirtualBox 3.0.10 on Ubuntu 9.10.
pressing right ctrl and then ctrl+alt+left/rights works, but that is because VirtualBox releases the capture indeed.
It would be nice if VirtualBox does not take complete control, or just can make an exception for the ubuntu switch desktop shortcuts.

Revision history for this message
gidantribal (aedo999) wrote :

yep, good idea though...

Revision history for this message
Tim (tim-barlotta) wrote :

When I use VMWare on the Mac w/ spaces it does the right thing. I have the guest fullscreen (or not) and then switch between spaces without having to tell vmware to release the keyboard. Would like that on my Ubuntu host/XP guest virtualbox setup as well. The right-ctrl followed by left-ctrl-alt-arrow does serve as a good workaround though.

Revision history for this message
Jascha (jaschamcdonald) wrote :

I was able to solve this issue by setting the "No Focus" rule in Compiz window rules for VirtualBox OSE
1. Open Compizconfig-settings-manager
2. Open "Window Rules"
3. Put "title=VirtualBox OSE$" (without quotes) into the No Focus rule

Unfortunately this will disable VirtualBox shortcut keys

Revision history for this message
Jascha (jaschamcdonald) wrote :

Apologies, the above makes all keyboard actions not work in VirtualBox OSE

I did find a solution that works perfectly for me on Lucid Alpha 3:
1. Open VirtualBox OSE
2. Click the File menu and choose "Preferences"
3. Click "Input"
4. Un-check "Auto Capture Keyboard Input"

It seems like the developers already made a workaround ("Feature") for this.

Revision history for this message
Partyk1d24 (jackiegleason) wrote :

Jascha's works perfectly for me too, is there anything we lose doing it this way?

Revision history for this message
Apteryx (maxco) wrote :

@Jascha : Thanks for sharing! Exactly what was expected :)

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for posting this bug.

Ubuntu, virtualbox & virtualbox-ose have undergone numerous version updates. Please update and repost detailed error report.

Changed in virtualbox-ose (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for virtualbox-ose (Ubuntu) because there has been no activity for 60 days.]

Changed in virtualbox-ose (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.