Applescripting a Remote X-Windows Session for Virt-Manager

This isn’t just for virt-manager, but any X-Windows app you’d want to tightly integrate into your daily routine. Instead of firing up X11, then SSH’ing to your VM box and typing out virt-manager (insane!) you can script X11 to do everything with 1 mouse click. I have it in my Dock, and Launchbar also recognizes it as an app.

tell application "Finder"
    launch application "X11"
end tell

set results to do shell script “ssh -X haddad-vmserver ‘virt-manager’”


Also see my post about setting up a headless VM server using KVM.

If you found this post helpful, please consider sharing to your network. I'm also available to help you be successful with your distributed systems! Please reach out if you're interested in working with me, and I'll be happy to schedule a free one-hour consultation.