Gentoo Archives: gentoo-desktop

From: "Michał Górny" <mgorny@g.o>
To: gentoo-desktop@l.g.o
Subject: [gentoo-desktop] DM info variants for the new xdm init.d script
Date: Mon, 25 Oct 2010 21:03:47
Message-Id: 20101025223022.306dfe6c@pomiocik.lan
1 Hello,
2
3 I think we already agreed that xdm init.d script is currently too
4 complex and not flexible enough, and it needs redesign. First, I'd like
5 to discuss on how should we handle different display managers.
6
7 I have the following ideas:
8
9
10 1) 'profile' files installed by DMs
11 -----------------------------------
12
13 This is the most flexible yet heaviest of the possible solutions. It
14 assumes that we set up some kind of 'session' directory in which
15 various DMs install a single file describing how to launch them, and
16 the XDM script tries to match one of these files and use them to set
17 the DM up.
18
19 For example, xdm would install a file like:
20
21 # /usr/share/gentoo/dms/xdm
22 exe=/usr/bin/xdm
23 pidfile=/var/run/xdm.pid
24
25 This is very close to what we do now. It still requires a lot of
26 customization for non-typical DMs (like lxde).
27
28 On the other hand, this way we could grab 'any installed DM' easily
29 without requiring user to specify it in DISPLAYMANAGER.
30
31
32 2) separate init.d scripts
33 --------------------------
34
35 This one is even heavier but more clean. This way, we only keep
36 a minimal subset of DM-related code in common, and let every DM install
37 its own init.d script. This way, we keep them clean and flexible.
38
39 On the other hand, that would introduce a lot of repeating code,
40 and user would need to explicitly add appropriate DM to the runlevel.
41
42
43 3) fixing DMs and a lot of guessing
44 -----------------------------------
45
46 Many DMs resemble a common concept of executable name and pidfile. If
47 we limited the amount of DISPLAYMANAGER possibilities, we could use
48 an approach like:
49
50 EXE=$(which ${MY_XDM})
51 PIDFILE=/var/run/${MY_XDM}.pid
52
53 But that won't work with all current DMs, so we'll probably end up with
54 a thing similar to what we do now...
55
56
57 Maybe someone else has a better idea on how to handle it?
58
59 --
60 Best regards,
61 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies