Small tip for getting SPICE screen resizing to work with KDE in Debian 12.5

justinclift

Active Member
Apr 1, 2024
636
160
43
Stumbled across a weird behaviour with Debian 12.5 VM's today when using SPICE with KDE.

Resizing the virtual screen (eg dragging virt-viewer window to be a new size) wouldn't trigger the (useful) automatic screen resizing that's present by default in GNOME. Ugh.

It turned out two things were needed:

1. Manual installation of the spice-vdagent package, as that's what does the screen resizing

Code:
$ sudo apt -y install spice-vdagent

2. Modification of the .desktop file so it launches upon log in

In theory, the text file /etc/xdg/autostart/spice-vdagent.desktop should cause spice-vdagent (client side user agent software) to launch when you log in.

But it seems like there's some kind of bug, as the presence of a GNOME related field in it is blocking the launch by KDE.

The complete file at install time is this:

Code:
[Desktop Entry]
Name=Spice vdagent
Comment=Agent for Spice guests
Exec=/usr/bin/spice-vdagent
Terminal=false
Type=Application
Categories=
X-GNOME-Autostart-Phase=WindowManager
NoDisplay=true

After removing (or commenting out) that X-GNOME-Autostart-Phase=WindowManager line then rebooting, screen resizing automagically works from then on in KDE.

Ironically, GNOME doesn't seem to need that line either, as screen resizing seems to continue working fine in GNOME anyway without it.

Hopefully the above helps anyone else who stumbles over this particular bug and needs a workaround. I haven't bothered digging into this further and reporting an appropriate bug upstream anywhere, so if someone else wants to they're more than welcome. :)
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!