Bug 447171

Summary: Automatically copy theme files from ~/.local/share to /var/lib/sddm/.local/share as a part of the sync process
Product: [Applications] systemsettings Reporter: Nate Graham <nate>
Component: kcm_sddmAssignee: David Edmundson <kde>
Status: CONFIRMED ---    
Severity: wishlist CC: ad.liu.jin, bugseforuns, filipfila.kde, hsaom, kde, plasma-bugs
Priority: NOR Keywords: usability
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nate Graham 2021-12-18 14:52:54 UTC
When you snyc your stuff to SDDM, it only syncs settings, and tells you with a little note at the bottom of the window that only systemwide theme files will actually get used.

This is not particularly helpful because *most* theme files will not satisfy that condition, having been installed using GHNS rather than the system's package manager. Unhelpfully, the sync process does not give you a button to copy them or even tell you how to to it manually.

Since the sync process already copies over settings files, we should consider having it automatically copy over theme files too, so that this works automatically. Then we could remove the warning message entirely since the thing it's warning you about just works as expected.
Comment 1 Antonio Rojas 2021-12-18 17:05:12 UTC
Creating files under /usr which are not tracked by the distribution package manager is frowned upon as it can create conflicts. It should be copied to sddm's home dir (/var/lib/sddm by default) instead.
Comment 2 Nate Graham 2021-12-18 17:31:01 UTC
Oh yeah, that would be fine.
Comment 3 Nate Graham 2024-01-11 18:25:01 UTC
*** Bug 479018 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2024-03-11 21:18:35 UTC
*** Bug 483113 has been marked as a duplicate of this bug. ***
Comment 5 Jin Liu 2024-03-11 23:06:26 UTC
483113 is about the KDE default Breeze theme, which is not in ~/.local. Not a duplicate.
Comment 6 Nate Graham 2024-09-05 20:43:44 UTC
*** Bug 492416 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2024-10-11 18:23:56 UTC
*** Bug 494534 has been marked as a duplicate of this bug. ***
Comment 8 Filip Fila 2024-10-16 06:28:33 UTC
I steered away from this when working on the sync function because I didn't trust putting unreviewed code in root directories. But if no one objects from a security point of view to copying user files to /var/lib/sddm and chowning them as the sddm user, this is doable. I agree it's not very user-friendly to just tell the user to globally install their theme files.

I tested copying the Plasma theme and an icon theme to sddm's directory and upon changing the ownership, the login screen picks up on these themes.

Instead of copying whole folders of themes, I suppose a good implementation would be to parse Plasma config files, grab the name of the theme used as a default, locate it in the user's directory, copy it to /var/lib/sddm/ and set permissions. I can look into implementing this, although it might take me some time.

Ideally the syncing process would be further upgraded if updates for user-installed themes can be picked up (registering changes in Discover in GHNS), and then automatically synced to SDDM so the user doesn't have to manually do it. This would require password prompts in such actions, but can be defended by saying it wouldn't affect the majority of the users, who presumably use default themes (I don't have any stats for this though). I don't have what it takes to implement that, but I'd be glad to help out any way I can.