Hello, I think we already agreed that xdm init.d script is currently too complex and not flexible enough, and it needs redesign. First, I'd like to discuss on how should we handle different display managers.
I have the following ideas:
1) 'profile' files installed by DMs
-----------------------------------
This is the most flexible yet heaviest of the possible solutions. It
assumes that we set up some kind of 'session' directory in which
various DMs install a single file describing how to launch them, and
the XDM script tries to match one of these files and use them to set
the DM up.
For example, xdm would install a file like:
# /usr/share/gentoo/dms/xdm
exe=/usr/bin/xdm
pidfile=/var/run/xdm.pid
This is very close to what we do now. It still requires a lot of
customization for non-typical DMs (like lxde).
On the other hand, this way we could grab 'any installed DM' easily
without requiring user to specify it in DISPLAYMANAGER.
2) separate init.d scripts
--------------------------
This one is even heavier but more clean. This way, we only keep
a minimal subset of DM-related code in common, and let every DM install
its own init.d script. This way, we keep them clean and flexible.
On the other hand, that would introduce a lot of repeating code,
and user would need to explicitly add appropriate DM to the runlevel.
3) fixing DMs and a lot of guessing
-----------------------------------
Many DMs resemble a common concept of executable name and pidfile. If
we limited the amount of DISPLAYMANAGER possibilities, we could use
an approach like:
EXE=$(which ${MY_XDM})
PIDFILE=/var/run/${MY_XDM}.pid
But that won't work with all current DMs, so we'll probably end up with
a thing similar to what we do now...
Maybe someone else has a better idea on how to handle it?
--
Best regards,
Michał Górny
signature.asc
Description: PGP signature
