Bug 454509

Summary: Installing global themes with SDDM impossible on immutable OS
Product: [Frameworks and Libraries] frameworks-knewstuff Reporter: doncbugs
Component: generalAssignee: Dan Leinir Turthra Jensen <admin>
Status: CONFIRMED ---    
Severity: major CC: alexander.lohnau, enderpirate98, hey, kdelibs-bugs, nate, postix, travier
Priority: NOR    
Version: 5.91.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
URL: https://github.com/sddm/sddm/issues/1561
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description doncbugs 2022-05-27 22:27:28 UTC
SUMMARY
Installing a global theme on the immutable distro, Fedora Kinoite, fails if the theme contains root components (obviously). If an SDDM theme is included, the install fails and the theme does not appear to be installed. It should probably fail more gracefully? 


STEPS TO REPRODUCE
1. On an immutable system, install a global theme with Get New Global Themes
2. Enter password in prompt for extracting SDDM to root
3. 

OBSERVED RESULT
User is presented with an error and the install of the theme fails.

EXPECTED RESULT
Install should proceed (perhaps if a component is non-critical, which should be everything in a theme?) and simply omit the SDDM theme, leaving the other components

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 36 (Kinoite)
(available in About System)
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
Comment 1 Nate Graham 2022-06-01 17:23:48 UTC
Hmm, yeah, this would be a problem.
Comment 2 Alexander Lohnau 2022-06-01 19:09:41 UTC
How could we detect an immutable OS?
Comment 3 doncbugs 2022-06-02 00:36:12 UTC
(In reply to Alexander Lohnau from comment #2)
> How could we detect an immutable OS?

I wasn't really looking for any detection, really just a more graceful fail. I could have sworn themes still installed even if an individual component couldn't be installed.

Not too keen on specifics, but some avenues might be checking for the presence of things like OSTree, or how the /sysroot is mounted? https://fedoraproject.org/wiki/Changes/Silverblue_Kinoite_readonly_sysroot

 I suppose trying to write something to root would be the ultimate test.
Comment 4 Timothée Ravier 2022-06-03 19:39:13 UTC
On Kinoite, /usr is read only but /etc is not. I would recommend that SDDM supports reading themes from two locations, one in /usr for distribution installed themes and one in /etc for user/admin installed themes.
Comment 5 Timothée Ravier 2022-06-03 19:39:52 UTC
You can also use a path under /var such as /var/lib/sddm/themes which is also writable on Kinoite.
Comment 6 Alexander Lohnau 2022-06-05 04:14:11 UTC
>On Kinoite, /usr is read only but /etc is not. I would recommend that SDDM supports reading themes from two locations

That seems like a good idea. Maybe you could file a bug for SDDM?
Comment 7 Timothée Ravier 2022-06-18 11:20:59 UTC
https://github.com/sddm/sddm/issues/1561
Comment 8 doncbugs 2022-06-18 20:07:48 UTC
Heads up, fixing this bug will break nearly every popular SDDM theme on the store. This is because the path to most assets is hardcoded and expects things to be in /usr/share/sddm/themes/. So, it might not actually help all that much for immutable users.

Anyway, I suppose I needed a reason to learn how to supply relative paths to Plasma Components anyway.
Comment 9 Alexander Lohnau 2022-06-19 05:31:31 UTC
>Heads up, fixing this bug will break nearly every popular SDDM theme on the store

It will break every theme, because the installer wants t put them in /usr :)
Comment 10 Vinícius 2024-08-27 15:08:16 UTC
*** Bug 492245 has been marked as a duplicate of this bug. ***