Gentoo Archives: gentoo-dev

From: Aisha Tammy <gentoo.dev@×××××.cc>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [REVIEW] News Item - 2020-10-17-display-manager-init
Date: Sun, 18 Oct 2020 14:17:44
Message-Id: 8c6c5f20-e1a8-7a1a-0d2b-5506678e3489@aisha.cc
In Reply to: Re: [gentoo-dev] [REVIEW] News Item - 2020-10-17-display-manager-init by Gordon Pettey
1 On 10/18/20 9:40 AM, Gordon Pettey wrote:
2 > On Sun, Oct 18, 2020 at 6:02 AM Aisha Tammy <gentoo.dev@×××××.cc> wrote:
3 >
4 > On 10/18/20 2:29 AM, Joonas Niilola wrote:
5 > > On 10/18/20 8:48 AM, Michał Górny wrote:
6 > >> Do you really think a rename for the sake of renaming justifies
7 > >> requiring all users to rewrite their configuration?  While we're
8 > >> requiring the users to do that, wouldn't it be better to stop using
9 > >> the awful layout of 'one script to run them all', and switch to separate
10 > >> scripts for every DM?
11 > >>
12 > > This is exactly what I proposed in the previous RFC, systemd already works this way and is IMHO a lot clearer to use.
13 > >
14 > > -- juippis
15 > >
16 >
17 > This would need some more tinkering as OpenRC doesn't have a dedicated
18 > mechanism to control vt's while systemd controls the vts.
19 >
20 >
21 > Aside from that...
22 >
23 > Additionally we would need to able to say that each of them is going to conflict
24 > with the other.
25 >
26 >
27 > What conflict? Each package should have an init script with a matching name. The only conflict might arise from
28 > putting both in the same runlevel (assuming they don't just take the next available VT). If a user wants to try out
29
30 Making them take the next VT is the crucial point, as OpenRC
31 doesn't keep track of which VTs are currently used.
32 You can use openvt from sys-apps/kbd to check if a VT is
33 free or not (stolen from slashbeast in the PR)
34
35 openvt -c ${VT_N:-7} true >/dev/null 2>&1
36
37 This has race conditions when being used with openrc parallel
38 starts as two DMs can check for VT 7 being free and then try
39 to start on VT 7 in parallel, which is not cool.
40
41 This means that we need to make sure to only have ONE of the DM
42 scripts is enabled in the default runlevel (not a good idea to put
43 them in other runlevels).
44
45 Aisha
46
47 > a different DM, it is simpler IMHO to
48 > /etc/init.d/old-dm stop && /etc/init.d/new-dm start
49 > than editing xdm.conf. If new-dm crashes the system for whatever reason, no need to remember to edit xdm.conf
50 > to restore your old choice; just reboot and old-dm which was in the default runlevel is still your DM.