Created
November 29, 2023 15:50
-
-
Save gibait/b5c06395ae6e44fcd024a8264cef9b53 to your computer and use it in GitHub Desktop.
Kali Linux XFCE QEMU/KVM automatic VM resolution with window resizing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -x /usr/bin/spice-vdagent ] ; then | |
/usr/bin/spice-vdagent | |
/home/kali/.xfce/xrandr-loop & | |
fi | |
exec /usr/bin/xfce4-session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Credits: https://superuser.com/a/1565544