This forum has been archived. All content is frozen. Please use KDE Discuss instead.

VirtualBox full screen mode and activities

Tags: None
(comma "," separated)
rpkemp
Registered Member
Posts
5
Karma
0
I am using Plasma 5 on Kubuntu (15.04, x86_64). I'd like to run a Windows 7 VirtualBox virtual machine in its own dedicated activity. I can do so, as long as I don't switch to the VirtualBox full screen mode. (This is not the same as the Plasma full screen window mode - essentially it does away with all the trappings of an actual window and represents the VM's desktop as if it was running on a physical machine rather than in a virtual one.)

When I use VirtualBox's full screen mode, the VM appears on every activity. If I keep the VM in a window, or switch to Plasma's full screen mode, it stays within its own activity. The Plasma Full screen mode is no good for me for this purpose though since it wastes some screen space by putting in a menu bar etc.

It's only a minor inconvenience to have the VM spill over into all my other activities, but it does irk the small part of me that is tidy-minded. I haven't been able to find anyone else discussing this issue, so I thought it might be worth raising.
luebking
Karma
0
iirc, virtualbox creates a new, override_redirect, window for the fullscreen mode.
those are unmanaged by definition, so kwin ignores it and does not maintain its visibility.

=> this needs to be fixed by virtualbox to implement "fullscreen" properly by following the NETWM protocol (or add activity support, but that'd be clumsy, incomplete - and likely not in the cards)
rpkemp
Registered Member
Posts
5
Karma
0
Thanks for the information - so it's not a KDE issue. Just further evidence of the obvious, i.e. that trying to get different bits of software to conform to standard behaviours is like trying to herd cats.

I haven't been able to find any combination of VirtualBox and Plasma settings that approximates what the VirtualBox full screen mode does. But in the process I've been reminded of how much control you have in KDE over the behaviour of individual windows - and it's so easy. I've never been able to understand why anyone uses any other desktop environment.
luebking
Karma
0
Actually, and to my shame and probably your luck, I got to row back (a bit ;-)

I just checked virtualbox and it does *not* turn into an override_redirect (unmanaged) window, but sets the window type to "override" (that's a weird beast from the ancient past and was basically a KDE/Qt way to say "no deco, please") when going fullscreen - in return you're running into https://bugs.kde.org/show_bug.cgi?id=274931 (nad personally, I think this is a KDE bug, I see no justification to discriminate the activity assignment by the presence of a titlebar)

Your luck will be, that you should be able to fix this by a window rule (special window setting, in the titlebar/alt+f3 menu)
Save this:

Code: Select all
[Settings for VirtualBox]
Description=Settings for VirtualBox
type=0
typerule=2
wmclass=virtualbox
wmclasscomplete=false
wmclassmatch=1


to some file (eg. ~/vbox.kwinrule) and import it in "kcmshell5 kwinrules", hit apply and check whether virtualbox & activities behave as expected.
Since virtualbox indeed also *does* set the fullscreen hint, this should have no other visual/behavioral impact.
rpkemp
Registered Member
Posts
5
Karma
0
Ah, OK. I failed to spot that bug report. Many thanks.

In fact, though, your solution doesn't work for me. Changing the window type has no effect and the window is still visible on all activities.

However, in line with a comment on the bug report you cited, I found that setting "no title bar and frame", "apply initially", and "no" did the trick. I wondered if it would still work if you started the virtual machine in windowed mode and then switched to full screen mode, and it did, so I'm now officially happy.

Therefore an alternative to your solution is to import a rule like the following instead:

Code: Select all
[Settings for VirtualBox]
Description=Settings for VirtualBox
noborder=false
noborderrule=3
wmclass=virtualbox
wmclasscomplete=false
wmclassmatch=1


Anyway, many thanks for your help - very much appreciated.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]