I believe we can do better for all display managers than what exists now. If we are going to make this change, let's do a complete rethink. I suggest creating a new service script for each DM we have but put common functions easily accessible so users can know for certain which DM they are starting. Examples attached
Created attachment 689340 [details] /etc/rc.conf.d/display-manager.conf Common function file saved into /etc/rc.conf.d/
Created attachment 689343 [details] /etc/init.d/lxdm Sample DM script
Aisha: please review.
Created attachment 690399 [details] /etc/rc.conf.d/display-manager.conf looks like hyphens are not allowed, removed
Created attachment 690402 [details] /etc/init.d/xdm Updated to match other attachment
Code should not be put in /etc/rc.conf.d. This directory exists to allow overriding configuration settings in /etc/rc.conf without touching this file. If you put code there, it becomes available to all service scripts on user's systems. Also, with the approach on bug #768729, the display manager is manually picked in /etc/conf.d/display-manager, so I'm not sure what your concern is about users not knowing for certain which display manager they are starting.
(In reply to William Hubbs from comment #6) > Code should not be put in /etc/rc.conf.d. This directory exists to allow > overriding configuration settings in /etc/rc.conf without touching this > file. If you put code there, it becomes available to all service scripts > on user's systems. > Ok, the location really does not matter to me. It was just a way to load automatically. I see that sourcing can be done from any location so that would be the fine. The point here is to have a common functions with varying commands and options and not have to hack the script every time a new DM appears. I mean, that's what started all this to begin with.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=856c7ecf226fcd8803d3e144a0ec97291de87a18 commit 856c7ecf226fcd8803d3e144a0ec97291de87a18 Author: Piotr Karbowski <slashbeast@gentoo.org> AuthorDate: 2022-10-09 22:08:58 +0000 Commit: Piotr Karbowski <slashbeast@gentoo.org> CommitDate: 2022-10-09 22:10:32 +0000 gui-libs/display-manager-init: 1.1 version bump Following WilliamH suggestion, the init has been redone in a openrc-friendly way, along with little cleanup and restore support for nox boot parameter, since nox were with us since always, good to still support it alongside nogui one. Closes: https://bugs.gentoo.org/show_bug.cgi?id=774189 Closes: https://bugs.gentoo.org/show_bug.cgi?id=768729 Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org> .../display-manager-init-1.1.ebuild | 54 ++++++ .../files/display-manager-setup.initd-r1 | 13 ++ .../files/display-manager.initd-r3 | 201 +++++++++++++++++++++ 3 files changed, 268 insertions(+)