[K12OSN] xdm's Chooser feature
Andy Rabagliati
andyr at wizzy.com
Mon Apr 19 21:23:37 UTC 2004
On Sun, 18 Apr 2004, Andrew Fournier wrote:
> I have only played with this a little, but won't <X -indirect> (rather
> than <x -query>) get you a choice of servers?
This is the patch I apply to get some degree of redundancy in
my client startups. Problem ? reboot the client.
It allows you to list preferred XDM_SERVER s and XFS_SERVER s
in the lts.conf file.
Cheers, Andy!
--- /opt/ltsp/i386/etc/rc.local 2002-07-21 04:09:33.000000000 +0200
+++ /tmp/rc.local 2003-06-10 16:30:57.000000000 +0200
@@ -388,6 +388,15 @@
XDM_SERVER=`get_cfg XDM_SERVER ${DEFAULT_SERVER}`
+ for i in $XDM_SERVER
+ do
+ if ping -c 1 $i
+ then
+ XDM_SERVER=$i
+ break
+ fi
+ done
+
case "${XSERVER}" in
XF86_*) XBINARY="${XSERVER}"
@@ -423,9 +432,9 @@
fi
if [ -w /proc/progress ]; then
- echo "/usr/X11R6/bin/${XBINARY} ${XOPTS} ${ACC_CTRL} -query ${XDM_SERVER} >/dev/tty3 2>&1" >/tmp/start_ws
+ echo "/usr/X11R6/bin/${XBINARY} ${XOPTS} ${ACC_CTRL} -indirect ${XDM_SERVER} >/dev/tty3 2>&1" >/tmp/start_ws
else
- echo "/usr/X11R6/bin/${XBINARY} ${XOPTS} ${ACC_CTRL} -query ${XDM_SERVER}" >/tmp/start_ws
+ echo "/usr/X11R6/bin/${XBINARY} ${XOPTS} ${ACC_CTRL} -indirect ${XDM_SERVER}" >/tmp/start_ws
fi
chmod 0755 /tmp/start_ws
--- /opt/ltsp/i386/etc/rc.setupx 2001-12-01 02:45:11.000000000 +0200
+++ /tmp/rc.setupx 2003-06-10 16:28:38.000000000 +0200
@@ -81,9 +81,16 @@
if [ "${USE_XFS}" = "Y" ]; then
XFS_SERVER=`get_cfg XFS_SERVER ${DEFAULT_SERVER}`
- cat <<-EOF >>${XF86CONFIG}
+cat <<-EOF >>${XF86CONFIG}
Section "Files"
- FontPath "tcp/${XFS_SERVER}:7100"
+EOF
+echo -n FontPath \" >>${XF86CONFIG}
+for f in $XFS_SERVER
+do
+ echo -n tcp/${f}:7100, >>${XF86CONFIG}
+done
+echo \" >>${XF86CONFIG}
+cat <<-EOF >>${XF86CONFIG}
EndSection
EOF
else
More information about the K12OSN
mailing list