Mailing List Archive

[RFC] Refactor display manager openrc init scripts to independent package
Hi all,
  This change is for OpenRC init scripts only.
  Currently the way our display managers are started, is by using the
xdm init script present in the xorg-base/xorg-server package, with its script
dependencies spread across four other packages, without any logical separation.
This makes it so that every display manager needs the whole xorg-server
package even if just for the init scripts.
There are bugs open about this for a while to refactor the scripts out from
xorg-server and into their own independent package, to make them easier
to manage and modify
- https://bugs.gentoo.org/730644
- https://bugs.gentoo.org/356915
The change is not just for the sake of closing bugs either.
Given the recent number of huge additions in wayland, it is now possible
to have a Xorg-free setup starting from the display manager.
There are wayland-only display-managers available in gentoo
- gui-apps/gtkgreet
- gui-apps/tuigreet

It should now be possible to start these display managers using openrc
without pulling in Xorg.

The changes are currently being worked on in the PR at
https://github.com/gentoo/gentoo/pull/16554

Changes
 - xdm init.d is replaced by display-manager init.d script
 - Configuration of display-manager is done similar to xdm by modifying
    /etc/conf.d/display-manager
 - Add display-manager to default runlevel and it should start working

Other changes, less relevant to everyday users
 - boot parameter nox has been replaced by nogui
 - usage of /etc/.nox has been removed in favor of /run/.nogui as the boot
    parameter is a better controller

Cheers,
Aisha
Re: [RFC] Refactor display manager openrc init scripts to independent package [ In reply to ]
On 10/10/20 1:57 PM, Aisha Tammy wrote:
> Hi all,
>   This change is for OpenRC init scripts only.
>   Currently the way our display managers are started, is by using the
> xdm init script present in the xorg-base/xorg-server package, with its
> script
> dependencies spread across four other packages, without any logical
> separation.
> This makes it so that every display manager needs the whole xorg-server
> package even if just for the init scripts.
> There are bugs open about this for a while to refactor the scripts out
> from
> xorg-server and into their own independent package, to make them easier
> to manage and modify
> - https://bugs.gentoo.org/730644
> - https://bugs.gentoo.org/356915
> The change is not just for the sake of closing bugs either.
> Given the recent number of huge additions in wayland, it is now possible
> to have a Xorg-free setup starting from the display manager.
> There are wayland-only display-managers available in gentoo
> - gui-apps/gtkgreet
> - gui-apps/tuigreet
>
> It should now be possible to start these display managers using openrc
> without pulling in Xorg.
>
> The changes are currently being worked on in the PR at
> https://github.com/gentoo/gentoo/pull/16554

+1 to separating xdm from xorg-server.


>
> Changes
>  - xdm init.d is replaced by display-manager init.d script

Why this rename? I can't find a reason for that.


>  - Configuration of display-manager is done similar to xdm by modifying
>     /etc/conf.d/display-manager
>  - Add display-manager to default runlevel and it should start working

My counter-proposal at this point would be to handle DMs similarily to
how it's done with systemd. In other words, every DM would provide their
own init and conf files (or, "service" files) and they'd be controlled
like that. I really see no point in renaming xdm to display-manager. xdm
to gdm, xdm to lightdm etc causes at least the same amount of confusion
and hassle, but would at least match the other init system. Then
swapping between openrc and systemd would be one step less difficult.

I have both openrc and systemd systems installed, and find the systemd
way a lot cleaner in this regard. What would other people think?

-- juippis


>
> Other changes, less relevant to everyday users
>  - boot parameter nox has been replaced by nogui
>  - usage of /etc/.nox has been removed in favor of /run/.nogui as the
> boot
>     parameter is a better controller
>
> Cheers,
> Aisha
>
Re: [RFC] Refactor display manager openrc init scripts to independent package [ In reply to ]
On 10/10/20 8:00 AM, Joonas Niilola wrote:
>
> On 10/10/20 1:57 PM, Aisha Tammy wrote:
>> Hi all,
>>   This change is for OpenRC init scripts only.
>>   Currently the way our display managers are started, is by using the
>> xdm init script present in the xorg-base/xorg-server package, with its
>> script
>> dependencies spread across four other packages, without any logical
>> separation.
>> This makes it so that every display manager needs the whole xorg-server
>> package even if just for the init scripts.
>> There are bugs open about this for a while to refactor the scripts out
>> from
>> xorg-server and into their own independent package, to make them easier
>> to manage and modify
>> - https://bugs.gentoo.org/730644
>> - https://bugs.gentoo.org/356915
>> The change is not just for the sake of closing bugs either.
>> Given the recent number of huge additions in wayland, it is now possible
>> to have a Xorg-free setup starting from the display manager.
>> There are wayland-only display-managers available in gentoo
>> - gui-apps/gtkgreet
>> - gui-apps/tuigreet
>>
>> It should now be possible to start these display managers using openrc
>> without pulling in Xorg.
>>
>> The changes are currently being worked on in the PR at
>> https://github.com/gentoo/gentoo/pull/16554
>
> +1 to separating xdm from xorg-server.
>
>
>>
>> Changes
>>  - xdm init.d is replaced by display-manager init.d script
>
> Why this rename? I can't find a reason for that.
>
The name change was to make it clear that its separate from xorg-server
as it no longer has any ties to xdm.
display-manager can be run without having xdm on your system.

>
>>  - Configuration of display-manager is done similar to xdm by modifying
>>     /etc/conf.d/display-manager
>>  - Add display-manager to default runlevel and it should start working
>
> My counter-proposal at this point would be to handle DMs similarily to
> how it's done with systemd. In other words, every DM would provide their
> own init and conf files (or, "service" files) and they'd be controlled

This is quite hard as openrc manages tty handling differently than
systemd.
Currently display-managers work by adding an extra run level in openrc
(see https://github.com/gentoo/gentoo/pull/16554/files#diff-6d89a718d595e0c0516c6d6b96bd4cd5R21)

It is not possible to do this independently for each of lightdm/gdm/sddm
separately, there would be too much redundant copying of code.

> like that. I really see no point in renaming xdm to display-manager. xdm
> to gdm, xdm to lightdm etc causes at least the same amount of confusion
> and hassle, but would at least match the other init system. Then
> swapping between openrc and systemd would be one step less difficult.
>
> I have both openrc and systemd systems installed, and find the systemd
> way a lot cleaner in this regard. What would other people think?
>
> -- juippis
>
>
>>
>> Other changes, less relevant to everyday users
>>  - boot parameter nox has been replaced by nogui
>>  - usage of /etc/.nox has been removed in favor of /run/.nogui as the
>> boot
>>     parameter is a better controller
>>
>> Cheers,
>> Aisha
>>
>
Re: [RFC] Refactor display manager openrc init scripts to independent package [ In reply to ]
>>>>> On Sat, 10 Oct 2020, Aisha Tammy wrote:

> On 10/10/20 8:00 AM, Joonas Niilola wrote:
>>>  - xdm init.d is replaced by display-manager init.d script
>>
>> Why this rename? I can't find a reason for that.
>>
> The name change was to make it clear that its separate from xorg-server
> as it no longer has any ties to xdm.
> display-manager can be run without having xdm on your system.

Still sounds like a rename for the sake of renaming. /etc/init.d/xdm
is already now a generic init script and not tied to any specific
display manager.

Since this will affect users' systems (and maybe require manual
intervention), I think you'll need a better reason for renaming.

Ulrich
Re: [RFC] Refactor display manager openrc init scripts to independent package [ In reply to ]
On 10/10/20 2:18 PM, Ulrich Mueller wrote:
>>>>>> On Sat, 10 Oct 2020, Aisha Tammy wrote:
>
>> On 10/10/20 8:00 AM, Joonas Niilola wrote:
>>>>  - xdm init.d is replaced by display-manager init.d script
>>>
>>> Why this rename? I can't find a reason for that.
>>>
>> The name change was to make it clear that its separate from xorg-server
>> as it no longer has any ties to xdm.
>> display-manager can be run without having xdm on your system.
>
> Still sounds like a rename for the sake of renaming. /etc/init.d/xdm
> is already now a generic init script and not tied to any specific
> display manager.
>
> Since this will affect users' systems (and maybe require manual
> intervention), I think you'll need a better reason for renaming.
>

Manual intervention is going to be needed in any case.
The display manager inits are independent scripts and need to be installed
manually as none of the display managers have a dependency on it.

In which case it makes sense to also make it clear what these scripts are
for and to not overload the xdm term for both the actual dm and also the
init script.

> Ulrich
>
Re: [RFC] Refactor display manager openrc init scripts to independent package [ In reply to ]
On 10/10/20 2:26 PM, Aisha Tammy wrote:
>
>>> ?- Configuration of display-manager is done similar to xdm by modifying
>>> ??? /etc/conf.d/display-manager
>>> ?- Add display-manager to default runlevel and it should start working
>> My counter-proposal at this point would be to handle DMs similarily to
>> how it's done with systemd. In other words, every DM would provide their
>> own init and conf files (or, "service" files) and they'd be controlled
> This is quite hard as openrc manages tty handling differently than
> systemd.
> Currently display-managers work by adding an extra run level in openrc
> (see https://github.com/gentoo/gentoo/pull/16554/files#diff-6d89a718d595e0c0516c6d6b96bd4cd5R21)
>
> It is not possible to do this independently for each of lightdm/gdm/sddm
> separately, there would be too much redundant copying of code.
>
Would this not be resolved by switching to openrc-init instead of
systemv init?
Re: [RFC] Refactor display manager openrc init scripts to independent package [ In reply to ]
On 10/11/20 5:07 AM, Hans Fernhout wrote:
>
>
> On 10/10/20 2:26 PM, Aisha Tammy wrote:
>>
>>>>   - Configuration of display-manager is done similar to xdm by modifying
>>>>      /etc/conf.d/display-manager
>>>>   - Add display-manager to default runlevel and it should start working
>>> My counter-proposal at this point would be to handle DMs similarily to
>>> how it's done with systemd. In other words, every DM would provide their
>>> own init and conf files (or, "service" files) and they'd be controlled
>> This is quite hard as openrc manages tty handling differently than
>> systemd.
>> Currently display-managers work by adding an extra run level in openrc
>> (see https://github.com/gentoo/gentoo/pull/16554/files#diff-6d89a718d595e0c0516c6d6b96bd4cd5R21)
>>
>> It is not possible to do this independently for each of lightdm/gdm/sddm
>> separately, there would be too much redundant copying of code.
>>
> Would this not be resolved by switching to openrc-init instead of systemv init?
>
>

Gentoo is about choice and we can't (and don't want to) enforce the fact that
people should use openrc-init while we have a compatible solution to work with both.

Aisha
Re: [RFC] Refactor display manager openrc init scripts to independent package [ In reply to ]
On Samstag, 10. Oktober 2020 20:18:44 CEST Ulrich Mueller wrote:
> >>>>> On Sat, 10 Oct 2020, Aisha Tammy wrote:
> > On 10/10/20 8:00 AM, Joonas Niilola wrote:
> >>> - xdm init.d is replaced by display-manager init.d script
> >>
> >> Why this rename? I can't find a reason for that.
> >
> > The name change was to make it clear that its separate from xorg-server
> > as it no longer has any ties to xdm.
> > display-manager can be run without having xdm on your system.
>
> Still sounds like a rename for the sake of renaming. /etc/init.d/xdm
> is already now a generic init script and not tied to any specific
> display manager.

Being named 'xdm' without relating to x11-apps/xdm is already a source of
confusion, even on this mailing list.

Since X11 may not be involved at all in current and future display-manager it
would better move away from this false implication.

> Since this will affect users' systems (and maybe require manual
> intervention), I think you'll need a better reason for renaming.

I'm sure there is a way for the display-manager ebuild to migrate from old xdm
configs on users' systems. How much do config and init scripts differ at all?


...that said, I'm wondering if there is a way to implement juippis' proposal
of per-DM scripts while avoiding duplication at the same time, since
inevitably they will all do the same thing to a large extent.
Re: [RFC] Refactor display manager openrc init scripts to independent package [ In reply to ]
On Sun, Oct 18, 2020 at 4:17 AM Andreas Sturmlechner <asturm@gentoo.org> wrote:
>
> I'm sure there is a way for the display-manager ebuild to migrate from old xdm
> configs on users' systems. How much do config and init scripts differ at all?
>

Couldn't you just use a symlink so that either script name works?
Then the news item can be about deprecating the old name. There need
not be any rush to stop supporting it.

--
Rich
Re: [RFC] Refactor display manager openrc init scripts to independent package [ In reply to ]
On 10/18/20 8:57 PM, Rich Freeman wrote:
> On Sun, Oct 18, 2020 at 4:17 AM Andreas Sturmlechner <asturm@gentoo.org> wrote:
>>
>> I'm sure there is a way for the display-manager ebuild to migrate from old xdm
>> configs on users' systems. How much do config and init scripts differ at all?
>>
>
> Couldn't you just use a symlink so that either script name works?
> Then the news item can be about deprecating the old name. There need
> not be any rush to stop supporting it.
>

It is a possibility but I am opposed to this idea.
If more people want this, then I can implement it, its not hard, but it is
just delaying the inevitable. I do not see a long term use of this.

Aisha