Skip to content

Instantly share code, notes, and snippets.

@DeflateAwning
Created March 6, 2024 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeflateAwning/4ff9e586a9693b532cbefb8a923fb05c to your computer and use it in GitHub Desktop.
Save DeflateAwning/4ff9e586a9693b532cbefb8a923fb05c to your computer and use it in GitHub Desktop.
Send text to a running VirtualBox instance via the keyboard. No Guest Additions required.
# pip install virtualbox
import virtualbox
vbox = virtualbox.VirtualBox()
machine = vbox.find_machine("Ubuntu 20")
session = machine.create_session()
session.console.keyboard.put_keys("Hello, world!")
# Source: https://github.com/sethmlarson/virtualbox-python/issues/142
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment