On 12/21/05, Ryan Viljoen <[EMAIL PROTECTED]> wrote:
> So I was wondering if this was possible with Gentoo. Its not as simple
> as adding xdm to the boot runlevel. dont worry I tried...
The Gentoo xdm script waits until all other init services
(particularly getty sessions) are started, to allow for those display
managers that don't know what tty to run on, and may cause a conflict
and a dead keyboard. See the comments in /etc/init.d/xdm.
However, if your display manager (in my case kdm) is properly
configured, and doesn't conflict with /etc/inittab, you can start the
display manager much earlier in the startup sequence, but you have to
make your own init script for that. This is what I did, based on the
xdm init script:
-Richard
#!/sbin/runscript
# Derived from /etc/init.d/xdm, which is Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2
# Start X Font Server before X
depend() {
use xfs hotplug
}
source /etc/profile.env
cmdline_opt() {
if [[ "$#" -ne 1 ]]; then
return 1
fi
for opt in $(</proc/cmdline); do
case ${opt} in
${1}) eval ${1}="true" ;;
esac
done
}
nox() {
# Don't start X if we were passed 'nox' at boot (#83680)
cmdline_opt nox
if [[ "$?" -ne 0 ]]; then
return 1
fi
if [[ -n "${nox}" ]]; then
return 0
else
return 1
fi
}
start() {
if nox; then
einfo "Skipping ${EXE}, received 'nox'"
else
ebegin "Starting kdm"
start-stop-daemon --start --quiet --exec $(which kdm) \
--pidfile /var/run/kdm.pid &>/dev/null
eend $? "Error starting kdm"
fi
}
stop() {
local retval=0
local curvt="$(fgconsole)"
ebegin "Stopping kdm"
start-stop-daemon --stop --quiet --exec $(which kdm) \
--pidfile /var/run/kdm.pid &>/dev/null
retval=$?
chvt "${curvt}" &>/dev/null
eend ${retval} "Error stopping kdm"
return ${retval}
}
# vim:ts=4
--
[email protected] mailing list