Xubuntu and VirtualBox – time and clipboard fix

I use Xubuntu a lot in a VirtualBox but found a few issues:

  • Clipboard vbox addition sometimes crashes
  • Time gets unsynced

To fix these issues I have created a bash script /usr/local/bin/vmfix.sh

while [ 1 ]; do
  pkill -f clipboard
  /usr/bin/VBoxClient --clipboard
  sudo ntpdate ntp.cesnet.cz
  sleep 60

And I run this script on background automatically each time I login to Xfce.