Bug#323270: dexconf: Please add support for reconfiguring X at boot time
Package: xserver-common
Version: 6.8.2.dfsg.1-5
Severity: wishlist
Tags: patch
When booting live CDs and thin clients, there is a need to
(re)configure X automatically at boot time. To make this easier and
more convenient with the normal X packages, it would be nice if an
init.d script was provided to do call dexconf at boot time to generate
a new configuration. Here is a draft init.d script based on the
script included in xdebconfigurator and code fetched from the LTSP
package in Ubuntu.
#! /bin/sh
# /etc/init.d/xserver-common
#
# chkconfig: 2345 52 78
# description: Genererate X configuration at boot time
set -e
ENABLE_AT_BOOT=
if [ -f /etc/default/xserver-common ] ; then
. /etc/default/xserver-common
fi
do_start() {
if [ true = "$ENABLE_AT_BOOT" ] ; then
if [ -z "$xserver_package" ]; then
# set default xserver
if [ -d /usr/share/doc/xserver-org/ ]; then
xserver_package="xserver-xorg"
elif [ -d /usr/share/doc/xserver-xfree86/ ]; then
xserver_package="xserver-xfree86"
else
echo "WARNING: no known xserver detected"
return
fi
fi
msg="Generating new config file for $xserver_package."
logger -p user.info -t xserver-common "$msg"
echo "xserver-common: $msg"
# Add code in /etc/default/xserver-common if you want to
# preseed the values used during reconfiguration.
dpkg-reconfigure -fnoninteractive $xserver_package
fi
}
case "$1" in
start)
do_start
;;
stop|restart|force-reload|status)
;;
*)
echo $"Usage: $0 {start|stop|restart|force-reload|status}"
exit 2
;;
esac
exit 0
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-2-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages xserver-common depends on:
ii debconf [debconf-2.0] 1.4.57 Debian configuration management sy
ii libc6 2.3.5-3 GNU C Library: Shared libraries an
ii x11-common 6.8.2.dfsg.1-5 X Window System (X.Org) infrastruc
xserver-common recommends no packages.
-- debconf information:
xserver-common/xwrapper/nice_value/error:
xserver-common/xwrapper/allowed_users: Console Users Only
xserver-common/xwrapper/actual_allowed_users: console
xserver-common/xwrapper/nice_value: -10
Reply to: