How to take screenshot on Ubuntu-guest (Virtualbox)
Solution 1:
Ok guys! I have found out the problem and the solution. :P
The problem is Compiz and the solution is to disable it using the command:
metacity --replace &
Now, I can take screenshot of any window inside the VirtualBox.
Solution 2:
VirtualBox provides a menu option to take screenshots of the guest, View --> Take Screenshot (Host+E). Alternatively, just Host + E (that's usually Right Ctrl + E).