Bug 454874 - Prevent removing of Breeze SDDM theme
Summary: Prevent removing of Breeze SDDM theme
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Unclassified
Component: kcm_sddm (show other bugs)
Version: master
Platform: Neon Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-05 13:00 UTC by Patrick Silva
Modified: 2022-06-13 16:56 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2022-06-05 13:00:57 UTC
SUMMARY
The button to remove the default Plasma styles, color schemes, icons and cursors is greyed out in the respective KCMs. But the button to remove Breeze SDDM theme is enabled.


STEPS TO REPRODUCE
1. open SDDM KCM
2. hover over Breeze theme
3. 

OBSERVED RESULT
button to remove Breeze SDDM theme is enabled

EXPECTED RESULT
button to remove Breeze SDDM theme should be greyed out

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4
Graphics Platform: Wayland
Comment 1 Nate Graham 2022-06-06 19:59:41 UTC
Can reproduce. I also see an inappropriately-enabled delete button for the "Breeze Fedora" theme that was pre-installed by my distro.
Comment 2 Alexander Lohnau 2022-06-12 07:00:30 UTC
Confirmed, this is a bit tricky, because all themes are installed in /usr.

I will look into it :)
Comment 3 David Edmundson 2022-06-12 08:27:15 UTC
>because all themes are installed in /usr.

This is something we could adjust moving forward. It is very stupid.
Comment 4 Alexander Lohnau 2022-06-12 10:11:25 UTC
>This is something we could adjust moving forward

Though the sddm config is in /etc, can we simply use a local path? From a security perspective, that would mean that the computer-wide sddm theme is lying in a user-owned folder. Or maybe we could copy the folder to /usr once a theme is applied. Since the themes are only a few MB large, that should not be a performance problem.
Comment 5 Bug Janitor Service 2022-06-12 10:16:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/sddm-kcm/-/merge_requests/29
Comment 6 Alexander Lohnau 2022-06-13 06:02:25 UTC
Git commit 803a5d8b160e1e6201f9ba90b0fd17ed5b9bd5b3 by Alexander Lohnau.
Committed on 13/06/2022 at 06:01.
Pushed by alex into branch 'master'.

Only show delete button for themes that were manually or through KNS installed

Rather than just hardcoding breeze, we check if the theme was installed using the sddmthemeinstaller.
In case that was done, we have an entry in the config file with the file path.

M  +1    -0    src/package/contents/ui/main.qml
M  +4    -0    src/themesmodel.cpp
M  +2    -0    src/themesmodel.h

https://invent.kde.org/plasma/sddm-kcm/commit/803a5d8b160e1e6201f9ba90b0fd17ed5b9bd5b3
Comment 7 Alexander Lohnau 2022-06-13 06:02:57 UTC
Git commit 373260064f64486e008b7294e3de41fabe90a9a6 by Alexander Lohnau.
Committed on 13/06/2022 at 06:02.
Pushed by alex into branch 'Plasma/5.25'.

Only show delete button for themes that were manually or through KNS installed

Rather than just hardcoding breeze, we check if the theme was installed using the sddmthemeinstaller.
In case that was done, we have an entry in the config file with the file path.


(cherry picked from commit 803a5d8b160e1e6201f9ba90b0fd17ed5b9bd5b3)

M  +1    -0    src/package/contents/ui/main.qml
M  +4    -0    src/themesmodel.cpp
M  +2    -0    src/themesmodel.h

https://invent.kde.org/plasma/sddm-kcm/commit/373260064f64486e008b7294e3de41fabe90a9a6