(My apologies if this is an inappropriate way to suggest an enhancement to the packaging of Virtualbox, but it's got to be more appropriate than directly writing to debfx-pkg before I saw that this list existed!)<br><br>
Currently, I'm experiencing a security problem with VirtualBox in FullScreen mode: since it does a XGrabKeyboard, the xscreensaver's attempt to a XGrabKeyboard fails with an "AlreadyGrabbed" and I end up coming back from suspend mode without any screen locking at all. Since I usually lock my screen by shutting my Thinkpad's lid and thereby forcing suspend mode, I've created the following two scripts. I think this makes some sense since it's not unreasonable for VMs to be suspended when the host itself is suspended.  And pausing a VM always does an XUngrabKeyboard, solving my original problem.  What do you think ... would this be generally useful?<br>
<br>Many thanks!<br><br>Marshall Flax<br><br>$ cat /usr/local/bin/VBoxSuspend<br>#! /bin/sh<br>VBoxManage list runningvms | perl -ne '(my $vm) = ($_ =~ m/{(.+)}/); system("VBoxManage controlvm $vm pause")'<br>
<br>$ cat /etc/pm/sleep.d/virtualbox_suspend<br>#! /bin/sh<br>case $1 in<br>    suspend|suspend_hybrid|hibernate)<br>       for i in `ps h -o user -C VirtualBox | sort | uniq`<br>         do sudo -u $i /usr/local/bin/VBoxSuspend ;<br>
       done;<br>       ;;<br>    resume|thaw)<br>       # No need to do anything here, we'll manuall unpause VMs as necessary<br>       ;;<br>esac