Bug 482484 - Themes symlinked to other themes are shown twice in the KCM
Summary: Themes symlinked to other themes are shown twice in the KCM
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_sddm (show other bugs)
Version: 6.0.0
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-05 18:49 UTC by bruno
Modified: 2024-10-21 20:10 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments
An image showing the maya SDDM theme listed twice in System Settings. (54.54 KB, image/png)
2024-03-05 18:49 UTC, bruno
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bruno 2024-03-05 18:49:19 UTC
Created attachment 166433 [details]
An image showing the maya SDDM theme listed twice in System Settings.

SUMMARY
Maya theme is listed twice in SDDM KCM on Neon.

STEPS TO REPRODUCE
1. After a fresh install, open System Settings
2. Navigate to Colors and Themes > Login Screen (SDDM)

OBSERVED RESULT
Available SDDM themes are listed correctly.

EXPECTED RESULT
The same maya SDDM theme is listed twice.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon 6.0
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
An image is attached.
Comment 1 Nicolas Fella 2024-03-05 20:19:08 UTC
What's the output of running "ls /usr/share/sddm/themes" and "ls .local/share/sddm/themes"?
Comment 2 bruno 2024-03-05 20:20:36 UTC
(In reply to Nicolas Fella from comment #1)
> What's the output of running "ls /usr/share/sddm/themes" and "ls
> .local/share/sddm/themes"?

seems normal here..

bruno@arc:~$ ls -lha /usr/share/sddm/themes
total 16K
drwxr-xr-x 4 root root 4,0K ožu   4 22:11 .
drwxr-xr-x 7 root root 4,0K ožu   4 22:11 ..
drwxr-xr-x 3 root root 4,0K ožu   5 18:59 breeze
lrwxrwxrwx 1 root root   35 ožu   4 22:11 debian-theme -> /etc/alternatives/sddm-debian-theme
drwxr-xr-x 6 root root 4,0K ožu   4 22:11 maya

the other directory under .local doesn't exist on the system.
Comment 3 David Redondo 2024-03-06 08:12:18 UTC
 /etc/alternatives/sddm-debian-theme this links back to maya
Comment 4 Nate Graham 2024-03-06 17:27:50 UTC
So is this a Debian packaging bug, or a display bug in the KCM because we don't handle that properly?
Comment 5 David Redondo 2024-03-06 18:03:35 UTC
I think the kcm never expects there to be duplicated themes because because sddm only looks into one directory (according to man page) for themes. I wouldn't expect a sym-link to account for as themes either.  Let's say it's a kcm bug
Comment 6 bruno 2024-03-09 14:40:08 UTC
if we want to go this route, QDir::NoSymlinks can be added to https://invent.kde.org/plasma/sddm-kcm/-/blob/master/src/themesmodel.cpp?ref_type=heads#L146
if that sounds OK, i can open a MR?
Comment 7 bruno 2024-03-09 14:44:38 UTC
(the (probably better?) alternative is to resolve all symlink paths and remove duplicate paths from the list)
Comment 8 Nate Graham 2024-03-10 03:23:12 UTC
Sounds great, go ahead!
Comment 10 bruno 2024-04-05 16:59:52 UTC
bump! any update on this?
Comment 11 Nate Graham 2024-10-21 20:04:24 UTC
Git commit 8bcfc8e5eb09465e748e8694ea3dec8b9313d0ff by Nate Graham, on behalf of Bruno Ivan.
Committed on 21/10/2024 at 20:04.
Pushed by ngraham into branch 'master'.

Resolve and de-duplicate theme paths
FIXED-IN: 6.3.0

M  +13   -1    src/themesmodel.cpp

https://invent.kde.org/plasma/sddm-kcm/-/commit/8bcfc8e5eb09465e748e8694ea3dec8b9313d0ff
Comment 12 Nate Graham 2024-10-21 20:10:07 UTC
Git commit 6ef96b5b2811bc2490ed0b365a23096569c7b8dc by Nate Graham.
Committed on 21/10/2024 at 20:08.
Pushed by ngraham into branch 'Plasma/6.2'.

Resolve and de-duplicate theme paths
FIXED-IN: 6.3.0


(cherry picked from commit 8bcfc8e5eb09465e748e8694ea3dec8b9313d0ff)

cfbd596e Update themesmodel.cpp
01faf6a6 resolve and deduplicate theme paths

Co-authored-by: Bruno Ivan <bruno@oikei.net>

M  +13   -1    src/themesmodel.cpp

https://invent.kde.org/plasma/sddm-kcm/-/commit/6ef96b5b2811bc2490ed0b365a23096569c7b8dc