Summary: | x11-misc/sddm: Protect '/usr/share/sddm/scripts/Xsetup' through etc-update mechanism | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Matthias Nagel <matthias.nagel> |
Component: | Current packages | Assignee: | LxQt maintainers <lxqt> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | gentoo, groepaz, joost.ruis, josef64, lxqt, msdobrescu, nowa, public, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/sddm/sddm/issues/815 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Matthias Nagel
2016-01-09 11:48:10 UTC
Thanks for reporting. I'll look at it. Could you, please, also file an upstream bug on sddm issue tracker asking them to read settings from /etc/X11? for the same reason, this script is also required to get a different keyboard layout than the default US one - see for example: https://fitzcarraldoblog.wordpress.com/2015/12/03/sddm-keyboard-layout/ I cofirm this bug. Looks like pretty serious problem for me. It prevents using nvidia-drivers with optimus enabled every time when new version of sddm is installed. Also it is hard hard to debug, as one usually thinks that everything is configured properly and blames new version of nvidia-drivers for disfunctional X. Probably also related to the issue I described in Bug #582016 /etc/sddm.conf has configuration directives for where Xsetup, Xstop and Xsession files are looked for. If simply protecting /usr/share/sddm/scripts under the etc-update mechanism isn't satisfactory, then another option might be to patch/rewrite the default config file so that it looks for these things under a subdir of /etc, rather than somewhere in /usr/share/sddm . This bug report is ancient, but the problem is still not fixed. Everything under /usr/share/sddm/scripts gets overwritten whenever x11-misc/sddm is updated, which happens every 1-2 months. /usr/share/sddm/scripts/Xsetup and /usr/share/sddm/scripts/Xstop are obviousyl both designed to be user-editable scripts (they are installed in a version that contains only comments). So clearly they should be protected from being overwritten during upgrades. It is more than just annoying to have to restore them every couple of weeks. Please look into this bug again. (In reply to Markus Wernig from comment #6) > This bug report is ancient, but the problem is still not fixed. > > Everything under /usr/share/sddm/scripts gets overwritten whenever > x11-misc/sddm is updated, which happens every 1-2 months. > > /usr/share/sddm/scripts/Xsetup and > /usr/share/sddm/scripts/Xstop > > are obviousyl both designed to be user-editable scripts (they are installed > in a version that contains only comments). > > So clearly they should be protected from being overwritten during upgrades. > > It is more than just annoying to have to restore them every couple of weeks. > > Please look into this bug again. These things are usually configurable and are in /usr/share/ as examples. Typically, you'd move them to /etc and modify there. https://askubuntu.com/questions/789742/sddm-xsetup-location suggests you can configure the location. Thanks for picking this up again. Installing my versions of the scripts into /usr/local/bin and referencing them in /etc/sddm.conf took care of the overwriting issue. I still think that scripts that are meant to be modified should not be overwritten silently (and the default configuration points to them, so people are likely to modify them directly, instead of copy, modify and change sddm.conf). If they are to be considered sample scripts (valid point), it should say so in the script. Suggestion for Xsetup: #!/bin/sh # Xsetup - run as root before the login dialog appears # # This file is installed as an example only. If you need to modify it # copy it to another location (eg. /usr/local/bin) and update # the DisplayCommand setting in /etc/sddm.conf to the new location. And the default config in sddm.conf should probably not point to them. But I see how this is basically an upstream issue. On second thought, I don't think it's an upstream issue. If the sddm developers consider these files only examples, the files should be copied to a regular system location during installation, and that location should be referenced in /etc/sddm.conf eg: /etc/sddm.d/Xsetup /etc/sddm.d/Xstop /etc/sddm.d/Xsession /etc/sddm.d/wayland-session and /etc/sddm.conf [X11] DisplayCommand=/etc/sddm.d/Xsetup DisplayStopCommand=/etc/sddm.d/Xstop SessionCommand=/etc/sddm.d/Xsession [Wayland] SessionCommand=/etc/sddm.d/wayland-session Plus the comment in the sample files under /usr/share/sddm/scripts/ As a workaround put: CONFIG_PROTECT="/usr/share/sddm/scripts/Xsetup" In /etc/portage/make.conf (In reply to Markus Wernig from comment #9) > On second thought, I don't think it's an upstream issue. > > If the sddm developers consider these files only examples, the files should > be copied to a regular system location during installation, and that > location should be referenced in /etc/sddm.conf I chose this solution and it works. Any chance that this will become the official fix and will be included into the ebuilds? Ideally we can have the sddm package define a directory to source commands from, instead of a single file. I have this problem too. Is there any conclusion? (In reply to msdobrescu from comment #13) > I have this problem too. Is there any conclusion? With >=x11-misc/sddm-0.20 you can use /etc/sddm.conf.d/ and set DisplayCommand= and DisplayStopCommand=. Basically what @Markus Wernig said above. For earlier versions you can use the CONFIG_PROTECT= workaround. I have SDDM 0.18.1-r8, yet works to add the commands in /etc/sddm/Xsetup too. Sorry, pressed the save button too soon. I've made this by using /etc/sddm.conf: [X11] # Example scripts here: /usr/share/sddm/scripts/ DisplayCommand=/etc/sddm/Xsetup |