Bug 386241 - sddm KCM should write settings to /etc/sddm.conf.d with sddm >= 0.16.0
Summary: sddm KCM should write settings to /etc/sddm.conf.d with sddm >= 0.16.0
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_sddm (show other bugs)
Version: 5.11.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-27 09:48 UTC by Elvis Angelaccio
Modified: 2019-06-17 10:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.17


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elvis Angelaccio 2017-10-27 09:48:31 UTC
From the release announcement: https://github.com/sddm/sddm/wiki/0.16.0-Release-Announcement

> users should write their settings to /etc/sddm.conf.d
Comment 1 Patrick Silva 2017-10-29 13:02:22 UTC
Autologin setting is not remembered on opensuse krypton.
Is this problem related to this report?
Comment 2 Fabian Vogt 2018-04-18 19:17:37 UTC
(In reply to Elvis Angelaccio from comment #0)
> From the release announcement:
> https://github.com/sddm/sddm/wiki/0.16.0-Release-Announcement
> 
> > users should write their settings to /etc/sddm.conf.d

IMO that's bad for kcm_sddm.
It means that the file saved by the kcm isn't actually the one with the final values, which might cause confusion in some cases.

Example:
/etc/sddm.conf.d/kcm_sddm.conf contains "key=foo"
/etc/sddm.conf.d/my_changes.conf contains "key=bar".

This results in "bar" being the option for key, no matter what the kcm writes.
Just open/close of the kcm would lose settings.

(In reply to Dr. Chapatin from comment #1)
> Autologin setting is not remembered on opensuse krypton.
> Is this problem related to this report?

No, that's unrelated. Autologin on openSUSE is configured in /etc/sysconfig/displaymanager.
Comment 3 Elvis Angelaccio 2018-04-21 10:48:09 UTC
(In reply to Fabian Vogt from comment #2)
> (In reply to Elvis Angelaccio from comment #0)
> > From the release announcement:
> > https://github.com/sddm/sddm/wiki/0.16.0-Release-Announcement
> > 
> > > users should write their settings to /etc/sddm.conf.d
> 
> IMO that's bad for kcm_sddm.
> It means that the file saved by the kcm isn't actually the one with the
> final values, which might cause confusion in some cases.
> 
> Example:
> /etc/sddm.conf.d/kcm_sddm.conf contains "key=foo"
> /etc/sddm.conf.d/my_changes.conf contains "key=bar".
> 
> This results in "bar" being the option for key, no matter what the kcm
> writes.

Well, why would you want to manually create a file in /etc/sddm.conf.d/ overwriting the keys set by the KCM?
Comment 4 Fabian Vogt 2018-04-21 11:13:57 UTC
(In reply to Elvis Angelaccio from comment #3)
> (In reply to Fabian Vogt from comment #2)
> > (In reply to Elvis Angelaccio from comment #0)
> > > From the release announcement:
> > > https://github.com/sddm/sddm/wiki/0.16.0-Release-Announcement
> > > 
> > > > users should write their settings to /etc/sddm.conf.d
> > 
> > IMO that's bad for kcm_sddm.
> > It means that the file saved by the kcm isn't actually the one with the
> > final values, which might cause confusion in some cases.
> > 
> > Example:
> > /etc/sddm.conf.d/kcm_sddm.conf contains "key=foo"
> > /etc/sddm.conf.d/my_changes.conf contains "key=bar".
> > 
> > This results in "bar" being the option for key, no matter what the kcm
> > writes.
> 
> Well, why would you want to manually create a file in /etc/sddm.conf.d/
> overwriting the keys set by the KCM?

That's what the directory is for. System wide settings override.
Comment 5 Elvis Angelaccio 2018-04-21 15:00:47 UTC
Yes, but if I'm using the KCM for those settings, I wouldn't create another file to override the very same settings, no?
Comment 6 Rex Dieter 2018-04-21 15:02:54 UTC
It's safer, as it doesn't doesn't the defaults (in sddm.conf)
Comment 7 Fabian Vogt 2018-04-21 15:03:47 UTC
(In reply to Elvis Angelaccio from comment #5)
> Yes, but if I'm using the KCM for those settings, I wouldn't create another
> file to override the very same settings, no?

It would not, but it would not have any effect either. Then on the next start it shows the effective settings again, which appears to the user as if they were silently lost.
Comment 8 Filip Fila 2019-06-16 21:46:23 UTC
Git commit 3e3dbbb2fbd3450b87ee3400fb8de469ae0cfe69 by Filip Fila.
Committed on 16/06/2019 at 21:46.
Pushed by filipf into branch 'master'.

[sddm-kcm] Write settings to /etc/sddm.conf.d instead of etc/sddm.conf

Summary:
As of SDDM release 0.16.0 it advised to use /etc/sddm.conf.d/ as the directory for user settings.

This patch aims to achieve it by saving in that very same directory under the filename "kde_settings.conf".

It must also remove identical entries from the old "sddm.conf" file because SDDM will simply load them instead of new user set values.
FIXED-IN: 5.17

Test Plan:
- compiles
- writes to new config file
- reads from new config file
- deletes identical entries from old config file when writing them to new one

Reviewers: davidedmundson, ngraham, #plasma

Reviewed By: davidedmundson, ngraham, #plasma

Subscribers: GB_2, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21832

M  +9    -3    sddmauthhelper.cpp
M  +8    -8    src/advanceconfig.cpp
M  +4    -0    src/sddmkcm.cpp
M  +1    -0    src/sddmkcm.h
M  +1    -1    src/themeconfig.cpp

https://commits.kde.org/sddm-kcm/3e3dbbb2fbd3450b87ee3400fb8de469ae0cfe69
Comment 9 David Edmundson 2019-06-17 10:31:57 UTC
>It means that the file saved by the kcm isn't actually the one with the final values, which might cause confusion in some cases.

Yes, but that would require a user to have done that. If they choose to shoot themselves in the foot it's hard to stop them.

There is an upstream request to move the legacy config /etc/sddm.conf to the lowest of the include stack so we needed this move sometime.

Any distro changes or defaults should be in /lib/sddm.conf.d so that's a non issue.

Renaming our newly written config 99-kde.conf might make sense.