Bug Report: Dynamic Workspaces Script Fails After Kubuntu 24.04 Update
Closed this issue · 4 comments
Bug Report: Dynamic Workspaces Script Fails After Kubuntu 24.04 Update
Summary:
After updating to Kubuntu 24.04, the dynamic workspaces script that had been running without issues for the past year has stopped working. Running 'kwin_x11 --replace &' to restart KWin results in an error message.
Steps to Reproduce:
- Update to Kubuntu 24.04.
- Attempt to run the dynamic workspaces script.
- Run
kwin_x11 --replace &
to restart KWin.
Expected Result:
The script should run without errors, as it did before the update.
Actual Result:
The script fails with the following error message:
kwin_scripting: /home/jose_edsouza/.local/share/kwin/scripts/dynamic_workspaces/contents/code/main.js:95: error: Cannot read property 'index' of undefined
Details:
- Error Location: /home/jose_edsouza/.local/share/kwin/scripts/dynamic_workspaces/contents/code/main.js, line 95
- Error Message: Cannot read property 'index' of undefined
Additional Information:
This script has been functioning correctly for a year prior to the update to Kubuntu 24.04. The error seems to indicate an issue with accessing the 'index' property of an undefined object within the script at line 95.
Steps Taken to Resolve:
- Restarted KWin using
kwin_x11 --replace &
- Checked the script for any potential issues related to the new update
Environment:
- OS: Kubuntu 24.04
- Script Location: /home/jose_edsouza/.local/share/kwin/scripts/dynamic_workspaces/contents/code/main.js
Request for Help:
Any assistance in resolving this issue would be greatly appreciated, especially insights into changes in Kubuntu 24.04 that might affect script compatibility with KWin.
Thank you for your support.
Thanks for the report. Kubuntu still uses plasma 5, so for the time you can manually install the previous version of the script which worked fine.
The real seems to be main.js:257
. Now I stopped understanding why it doesn't fail for any other plasma version too: I get the desktop length once, so necessarily desktopIdx will run higher than the real amount of desktops if I delete at least one in this loop. It seems in case only one desktop is to be deleted, this is prevented by loopCounter.
Unfortunately(for multiple reasons) I don't have a linux PC on hand, so testing this fix will take until I get one in a couple of weeks. If a couple of weeks pass and I haven't fixed it, feel free to bump this issue again. :-)
Thank you for your quick response and the suggestion to revert to the previous version of the script. I have done so, and it worked simply fine.
I appreciate your willingness to address this problem once you have access to a Linux environment again.
In the meantime, I'll continue using the previous version of the script.
Thank you again for your help and the script that has served me well for the past year.
Best regards,
José Souza
Long time no see. I've pushed a fix for this bug here: https://github.com/maurges/dynamic_workspaces/tree/f25017abd77913b183d5d2e0a9b2de0f40f31c91 - I'll try to work on the animation bug before merging and releasing it, but meanwhile you can try it out.