Skip to content
/ x-resize Public

Auto-resize X screen on resolution change for Kali with XFCE on KVM.

Notifications You must be signed in to change notification settings

h0ek/x-resize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

x-resize

Auto-resize X screen on resolution change for Kali with XFCE on KVM.

A script and systemd service that automatically adjusts the X screen resolution when the display size changes, using xrandr and monitoring RANDR events. Ideal for virtual machines or systems with dynamic resolution changes. I am using it for my Kali machine with XFCE on KVM (virt-manager).

Demo GIF

If you install any Linux system with the XFCE desktop environment in KVM using VirtManager, install spice-agent and qemu-guest-agent, configure everything as it should be and still the screen scaling doesn't work and you almost start crying after hours of Googling and configuration changes you finally come across this repository. Wipe away the tears and sweat, read on and you won't be disappointed.

  1. Read the script and understand what it does before you trust me and run it as root on your system xD
  2. Download the script:
wget -O setup-x-resize.sh https://raw.githubusercontent.com/h0ek/x-resize/refs/heads/main/setup-x-resize.sh
  1. Make it executable:
chmod +x setup-x-resize.sh
  1. Execute as root:
sudo ./setup-x-resize.sh

Be happy that your Kali with XFCE auto resize VM with windows :) Ah yeah make sure you select that in View->Scale Display->Auto resize VM with windows in your Virt-Manager

The solution is based on modifying and adapting what other people smarter than me have come up with:

Tested on: Kali GNU/Linux Rolling, release 2024.4, kernel 6.11.2-amd64, desktop environment Xfce 4.20

Solution should work for any modern Linux system with systemd and Xfce.

About

Auto-resize X screen on resolution change for Kali with XFCE on KVM.

Resources

Stars

Watchers

Forks

Languages