Originally Posted by
Jose Catre-Vandis
I generally run a VM with XP on a separate desktop, and consistently forget I have it open when shutting down, which causes my laptop to freeze up.
Writing a script is no great problem using:
Code:
VBoxManage controlvm XP poweroff
but where do I put it so that it is run prior to the shutdown command?
Im not great at scripting but the easiest way i can think of doing it would be:
Code:
VBoxManage controlvm XP poweroff
sleep 20
gnome-session-save --kill
Put the code above it in a text file on your desktop and all it shutdown-script, then:
Open a terminal
Code:
sudo chmod 777 /shutdown-script
Code:
sudo cp /shutdown-script /usr/bin/shutdown-script
Now just run the command shutdown-script or add it to a launcher. Also i have only allowed 20 seconds till shutdown (for xp). You may need to alter this
Bookmarks