Bug 1125637 - sddm update always overwrites /usr/share/sddm/scripts/Xsetup
sddm update always overwrites /usr/share/sddm/scripts/Xsetup
Status: RESOLVED WORKSFORME
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: KDE Workspace (Plasma)
Current
x86-64 SUSE Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-Mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-15 22:28 UTC by Michael Hirmke
Modified: 2019-02-16 15:14 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Hirmke 2019-02-15 22:28:58 UTC
Whenever sddm gets updated, /usr/share/sddm/scripts/Xsetup (and I believe all other files in this directory) is overwritten without leaving an rpmsave file or instead creating an rpmnew file.
Comment 1 Wolfgang Bauer 2019-02-16 07:14:59 UTC
And why is that a problem?

/usr/share/sddm/scripts/Xsetup is not used at all by default (the shipped default config explicitly sets "DisplayCommand=/etc/X11/xdm/Xsetup"), and if you reconfigure sddm you can use an arbitrary location/filename anyway.
Comment 2 Michael Hirmke 2019-02-16 10:31:41 UTC
(In reply to Wolfgang Bauer from comment #1)
> And why is that a problem?
> 
> /usr/share/sddm/scripts/Xsetup is not used at all by default (the shipped
> default config explicitly sets "DisplayCommand=/etc/X11/xdm/Xsetup"), and if
> you reconfigure sddm you can use an arbitrary location/filename anyway.

not here - in my /etc/sddm.conf no DisplayCommand line existed by default.
In contrary the file was nearly empty for a longer time.

But if /etc/X11/xdm/Xsetup is the way to go, I can use this one, of course.
To my understanding this file was for xdm only, though. Besides that it uses the deprecated /etc/sysconfig/displaymanager.
Comment 3 Wolfgang Bauer 2019-02-16 12:29:10 UTC
(In reply to Michael Hirmke from comment #2)
> not here - in my /etc/sddm.conf no DisplayCommand line existed by default.
> In contrary the file was nearly empty for a longer time.

The default config is in /usr/lib/sddm/sddm.conf.d/00-general.conf.

> But if /etc/X11/xdm/Xsetup is the way to go, I can use this one, of course.
> To my understanding this file was for xdm only, though.

It is used for all displaymanagers in openSUSE IIANM.
Comment 4 Wolfgang Bauer 2019-02-16 12:31:57 UTC
(In reply to Wolfgang Bauer from comment #3)
> (In reply to Michael Hirmke from comment #2)
> > not here - in my /etc/sddm.conf no DisplayCommand line existed by default.
> > In contrary the file was nearly empty for a longer time.
> 
> The default config is in /usr/lib/sddm/sddm.conf.d/00-general.conf.

PS: specific config options can be overridden in /etc/sddm.conf or /etc/sddm.conf.d/, if you would want to use a different DisplayCommand script e.g.
Comment 5 Michael Hirmke 2019-02-16 14:37:58 UTC
(In reply to Wolfgang Bauer from comment #4)
> (In reply to Wolfgang Bauer from comment #3)
> > (In reply to Michael Hirmke from comment #2)
> > > not here - in my /etc/sddm.conf no DisplayCommand line existed by default.
> > > In contrary the file was nearly empty for a longer time.
> > 
> > The default config is in /usr/lib/sddm/sddm.conf.d/00-general.conf.
> 
> PS: specific config options can be overridden in /etc/sddm.conf or
> /etc/sddm.conf.d/, if you would want to use a different DisplayCommand
> script e.g.

ok, thx for that hint.
So I would use /etc/sddm.conf.d/my.conf with the desired contents, for excample DisplayCommand=/usr/local/share/sddm-Xsetup, and would do in sddm-Xsetup whatever I might need.
Will that DisplayCommand variable be used additionally to or instead of the default one? And: What is the order in which these files are used?
1. /usr/lib/sddm/sddm.conf.d/00-general.conf
2. /etc/sddm.conf
3. /etc/sddm.conf.d/*
?
Or the other way round?
Comment 6 Wolfgang Bauer 2019-02-16 15:04:26 UTC
(In reply to Michael Hirmke from comment #5)
> Will that DisplayCommand variable be used additionally to or instead of the
> default one?

There can only be one DisplayCommand script, i.e. if you set a different one in /etc/sddm.conf(.d/), it will be used instead of the default one.

> And: What is the order in which these files are used?
> 1. /usr/lib/sddm/sddm.conf.d/00-general.conf
> 2. /etc/sddm.conf
> 3. /etc/sddm.conf.d/*
> ?

From "man sddm.conf":
>       Configuration loads all files in the configuration directories followed by the
>       configuration file in the order listed below with the latter having  the  most
>       precedent. Changes should be made to the local configurations.
>
>       /usr/lib/sddm/sddm.conf.d
>              System configuration directory
>
>       /etc/sddm.conf.d
>              Local configuration directory
>
>       /etc/sddm.conf
>              Local configuration file for compatibility

I.e. /etc/sddm.conf wins over /etc/sddm.conf.d/* (for compatibility with older versions that didn't use /etc/sddm.conf.d/ yet), and both override the default config in /usr/lib/sddm/sddm.conf.d/*.

OTOH you can also modify /etc/X11/xdm/Xsetup if you want (and leave sddm's config as it is), that would work with other displaymanagers too.
That one is *not* overwritten by updates, as /etc/X11/xdm/ is marked as %config in xdm.spec.
Comment 7 Michael Hirmke 2019-02-16 15:14:22 UTC
Ok, thx again for the detailed explanation.
So probably I'll modify /etc/X11/xdm/Xsetup and call my script from there.