Summary: | User autostart scripts sourced after system-level scripts | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Francis T <frtherien> |
Component: | general | Assignee: | David Edmundson <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fademind, nate, plasma-bugs, rdieter |
Priority: | NOR | ||
Version: | 5.18.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/plasma-workspace/ed09a3baf3e00b6f831132ae55391548130f1d48 | Version Fixed In: | 5.19.0 |
Description
Francis T
2020-04-14 16:36:17 UTC
I'd encourage you to also submit this issue to your distribution. They could easily adjust their script to not override any existing definition of the EDITOR variable. startplasma.cpp: runEnvironmentScripts() They are run alphabetically, which at a minimum is usable as a workaround for you, I think it's also the correct approach, especially if people follow the convention common for merged config files 00-foo 10-run-after 99-foolast Alphabetical within each scope makes sense to me, but I agree that user config should always take precedence over system config when both are present. Odd, I thought I had replied previously. Anyways, I had a look at startplasma.cpp here: https://phabricator.kde.org/source/plasma-workspace/browse/master/startkde/startplasma.cpp$193 I don't think anything in the function in question sorts the scripts before sourcing. entryInfoList has an optional argument for sorting (which is not used, and the default is NoSort), but even if we used it, we'd be sorting each directory separately, which is not very useful. Adding a sort call before sourcefiles appears to be a 1-line fix. However, I personally agree with Nate that user scripts should be sourced after system scripts. I can try and put together a patch. However, C++ (and qt) is really not my forte, so if anyone wants to take a stab, please have at it. Sounds like you've already done all the investigation. Please feel free! Our documentation is here, in case it helps: https://community.kde.org/Get_Involved/development Patch submmitted here: https://phabricator.kde.org/D28941 Git commit ed09a3baf3e00b6f831132ae55391548130f1d48 by Nate Graham, on behalf of Francis Thérien. Committed on 28/04/2020 at 13:52. Pushed by ngraham into branch 'master'. startplasma: Sort environment scripts prior to sourcing Summary: Sort environment scripts before they are sourced. User scripts should run after system scripts to ensure that user preferences take precendence over system defaults. Scripts in each location (user and system) are then separately sorted in lexical order to ensure deterministic source order. FIXED-IN: 5.19.0 Reviewers: #plasma, davidedmundson, apol Reviewed By: apol Subscribers: cfeck, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D28941 M +17 -4 startkde/startplasma.cpp https://commits.kde.org/plasma-workspace/ed09a3baf3e00b6f831132ae55391548130f1d48 |