Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 15 lines (12 sloc) 518 Bytes
#!/bin/bash
# NAME="vboxshot"
# BLURB="Capture screenshot of a virtualbox session"
# SOURCE="https://github.com/vonbrownie/homebin/blob/master/vboxshot"
vboxBin="/usr/bin/VBoxManage"
vboxSave="$HOME/Downloads"
vboxDate="vbox.$(date +%FT%H:%M:%S.png)"
# Find out the unique identifier (UUID) of the running VM; this assumes that
# only a single VM is running
vboxName="$($vboxBin \
list runningvms --long | grep -m 1 "UUID:" | awk '{print $2}')"
$vboxBin controlvm $vboxName screenshotpng ${vboxSave}/${vboxDate}
You can’t perform that action at this time.