Skip to content

Instantly share code, notes, and snippets.

@gibait
Created November 29, 2023 15:50
Show Gist options
  • Save gibait/b5c06395ae6e44fcd024a8264cef9b53 to your computer and use it in GitHub Desktop.
Save gibait/b5c06395ae6e44fcd024a8264cef9b53 to your computer and use it in GitHub Desktop.
Kali Linux XFCE QEMU/KVM automatic VM resolution with window resizing
#!/bin/sh
if [ -x /usr/bin/spice-vdagent ] ; then
/usr/bin/spice-vdagent
/home/kali/.xfce/xrandr-loop &
fi
exec /usr/bin/xfce4-session
#!/bin/sh
sleep 2
xrandr --output "$(xrandr | awk '/ connected/{print $1; exit; }')" --auto
xev -root -event randr | \
grep --line-buffered 'subtype XRROutputChangeNotifyEvent' | \
while read foo ; do \
xrandr --output "$(xrandr | awk '/ connected/{print $1; exit; }')" --auto
done
@gibait
Copy link
Author

gibait commented Nov 29, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment