Skip to content

Instantly share code, notes, and snippets.

@klange
Created August 2, 2017 14:26
Show Gist options
  • Save klange/72e2638f7411a08ca7b3e18745f85bad to your computer and use it in GitHub Desktop.
Save klange/72e2638f7411a08ca7b3e18745f85bad to your computer and use it in GitHub Desktop.
set -v
qemu-system-x86_64 -cdrom toaruos.iso -m 1G -M accel=kvm:tcg -soundhw ac97 -vnc :0 &
QEMU_PID=$!
sleep 3
xvncviewer -Shared :0 &
VNC_PID=$!
vncdo key enter
sleep 5
vncdo key q
vncdo move 80 80 click 1
sleep 1
# Start Python
vncdo type "python" key enter
# Print "Hello, world!"
vncdo --force-caps type "print('Hello, world!')" key enter
# Exit Python
vncdo key ctrl-d
# Screenshot
vncdo capture /tmp/_screen_0.png
# Clear
vncdo key ctrl-l
# sysinfo
vncdo type "sysinfo" key enter
# Screenshot
vncdo capture /tmp/_screen_1.png
# Clear
vncdo key ctrl-l
vncdo type "sudo msk install libwebp wallpapers-webp" key enter
vncdo type "local" key enter
sleep 10
vncdo key ctrl-d
sleep 1
vncdo key alt-f2
sleep 1
vncdo --force-caps type "select_wallpaper.py" key enter
sleep 2
vncdo move 716 371 click 1
vncdo move 716 371 click 1
vncdo move 716 371 click 1
vncdo move 186 591 click 1
vncdo move 675 588 click 1
sleep 3
vncdo capture /tmp/_screen_2.png
vncdo move 80 80 click 1
sleep 1
vncdo type "sudo kdebug" key enter
vncdo type "local" key enter
vncdo --force-caps type "set_mode 1280 720" key enter
vncdo key ctrl-d
sleep 1
vncdo capture /tmp/_screen_3.png
vncdo type "sudo msk install glgears mesa" key enter
vncdo type "local" key enter
sleep 10
vncdo type "gears" key enter
sleep 6
vncdo capture /tmp/_screen_4.png
vncdo type "q"
vncdo key ctrl-d
kill $QEMU_PID
kill $VNC_PID
eog -s /tmp/_screen_*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment