I am interested in developing patches for some kwin bugs (especially https://bugs.kde.org/show_bug.cgi?id=518585 ).
How do I locally test my patches without breaking my system (just in case something goes slightly wrong, I may end up with no GUI). What procedure do KDE developers use?
sib
April 5, 2026, 6:49pm
2
I’m not a KDE dev, but… Perhaps testing in a virtual machine would help?
I wasn’t sure how to achieve replacing system kwin without breaking the virtual machine
jinliu
April 19, 2026, 7:29am
5
I find it most convenient to run kde linux in a VM. See Develop KDE Software - KDE Community
The best thing is it’s based on the latest master code, so you only need to build the project you are working on, not its 100 dependencies.
Install kde-linux in a VM.
Run set-up-system-development
Run updatectl update and reboot to the latest master.
kde-builder --src-only <your project> to fetch the code.
Modify the code. I use vscode remote ssh to connect to the VM and do the editing in host.
kde-builder <your project> to build.
sudo systemd-sysext refresh --always-refresh=yes to overlay binaries you just built to /usr.
kwin --replace to restart kwin.
If you are satisfied with the result, rm -r ~/kde/{usr, etc}/*, reboot, and kbuildsycoca6 --noincremental to reset all binaries back to master.