Re: screen scripts with common X code
| Newsgroups | gmane.linux.terminal-server.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Mar 22, 2008 at 04:53:00PM -0400, Warren Togami wrote: > [email protected] wrote: > > bzr get http://llama.freegeek.org/~vagrant/bzr/ltsp/features/ltsp-common-x-screen.d/ > > > > i've also got patches to convert the ldm screen script to use this as > > well, though i don't have them in a branch yet. > > > > should be pretty much equivalent to how the screen scripts functioned > > before, with some feature additions and consistancy across the various > > scripts. > > > > i'll merge into ltsp-trunk and ldm-trunk wednesday the 26th, unless i > > hear objections. > Could you please post the converted screen.d/ldm script as well? What > you have in that branch looks OK, and I would like to test it with ldm > as well. new script attached, as the diff is much longer than the new script. > I hope your changes can be pushed sooner than the 26th. if i can get confirmation from other folks, i'd be happy to merge sooner. live well, vagrant ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _____________________________________________________________________ Ltsp-developer mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-developer For additional LTSP help, try #ltsp channel on irc.freenode.net
ldm
(text/plain, 2.1 KB)
#!/bin/sh
# Depend on the ldm package
#
# Copyright 2005, Canonical Ltd.
# Copyright 2006-2008 Vagrant Cascadian
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License with your
# Debian GNU system, in /usr/share/common-licenses/GPL. If not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
# Load code common to X based screen scripts
#
. /usr/share/ltsp/screen-x-common
while :; do
#
# Server scalability. If there exists a /usr/share/ltsp/get_hosts file, then
# use it to populate the LDM_SERVER environment variable.
#
if [ -z "${LDM_SERVER}" ]; then
if [ -x /usr/share/ltsp/get_hosts ]; then
LDM_SERVER=$(/usr/share/ltsp/get_hosts)
else
LDM_SERVER=${SERVER}
fi
fi
export LDM_SERVER
#
# Loop though each of the hosts, and get their ldminfo
#
if [ -n "${LDM_SERVER}" ]; then
test ! -d /var/run/ldm && mkdir -p /var/run/ldm
for SRV in $LDM_SERVER ; do
nc -w 5 $SRV 9571 > /var/run/ldm/$SRV
# Write server to /etc/hosts so reverse DNS lookup is not necessary
if ! grep -q "$SRV" /etc/hosts ; then
echo "$SRV server-$SRV" >> /etc/hosts
fi
done
fi
get_xfs_settings "$LDM_SERVER"
ldm vt${TTY} ${DISP} $X_ARGS
# Clean up from some buggy video drivers that need two kills
XPROC=$(pgrep -f "${DISP}")
while [ -n "${XPROC}" ]; do
kill $XPROC
sleep 1
XPROC=$(pgrep -f "${DISP}")
done
rm -f /root/.Xauthority
rm -f /tmp/.X11-unix/X${DISPNUM}
rm -f /tmp/.X${DISPNUM}-lock
done