I want to thank everybody who answered me on this issue - it took me a 
few weeks to find time to start working on this (my LTSP installation is 
on a non-profit organization for which I work voluntarily... 
occasionally, when I find the time), but now it's done and I'd like to 
post my findings here for future reference...

BTW, I also accept and thank the tips on how to address this community, 
I realize this mailing list has the top experts on LTSP who are 
naturally busy people. I guess Chris Roberts made everything clear to me 
when he wrote "Asking for step-by-step instructions, whilst 
understandable, is not going to increase the likelihood of a response - 
quite the opposite.". Gotcha. :-)

I opted for a scripted menu inside the 
/opt/ltsp/i386/usr/share/ltsp/screen.d/rdesktop script, which I 
reproduce below. A few problems I had to solve (apart from my illiteracy 
in shell scripting) were:

1. Let "read" timeout every once in a while, so I can clear the screen 
and redraw the menu; I had a few error messages getting output to the 
screen, and they where garbling the menu.

2. Have a default server option be defined in lts.conf, while making 
this option overridable in the menu.

3. Make it possible for some stations to see the menu, but not 
necessarily all.

Here is the rdestkop script:
-------------
#!/bin/bash

PATH=/bin:$PATH; export PATH
. /usr/share/ltsp/screen-x-common

quit="no"
if [ -n "${MENU}" ]; then
   while [ $quit != "yes" ]
   do
     clear
     echo "   M A I N - M E N U"
     echo "----------------------------"
     echo "1. vm-xp1"
     echo "2. vm-xp2"
     echo "3. vm-xp3"
     echo "4. vm-w7"
     echo " "
     echo -n "Please enter option [1 - 4]"
     read -t 10 opt
     # case happens only if read didn't timeout:
     if [ $? = 0 ]; then
      echo " "
      quit="yes"
      case "$opt" in
       "1") echo "************ vm-xp1 *************";
          SERVER=vm-xp1;;
       "2") echo "*********** vm-xp2 **************";
          SERVER=vm-xp2;;
       "3") echo "*********** vm-xp3 **************";
          SERVER=vm-xp3;;
       "4") echo "*********** vm-w7 **************";
          SERVER=vm-w7;;
       "") echo "************ Defaulting to ${RDP_SERVER} **************";
          SERVER=${RDP_SERVER};;
       *) echo "$opt is an invaild option. Please select option between 
1-4 only";
          #echo "Press [enter] key to continue. . .";
          #read enterKey;
          sleep 2;
          quit="no";;
      esac
     fi
   done

   RDESKTOP_OPTIONS="${RDP_OPTIONS} -f $* ${SERVER}"

else

   RDESKTOP_OPTIONS="${RDP_OPTIONS} -f $* ${RDP_SERVER}"

fi
   # uncomment these lines for debugging purposes:
   #echo " "
   #echo "RDESKTOP OPTIONS is ${RDESKTOP_OPTIONS}"
   #echo " "
   #echo "Press [enter] key to continue. . ."
   #read enterKey
################################################################################
#
# Setup the XF86Config file
#
# while :; do
/usr/bin/xinit      /usr/bin/rdesktop.wrapper           \
                             -u "" \
                           ${RDESKTOP_OPTIONS}         \
                           -- \
                           ${DISP}                     \
                           vt${TTY}
#/usr/bin/x11vnc -display ${DISP} -passwd password -httpport 5800

#done
----------------

Notice that this final commented "while" loop has nothing to do with the 
menu, it was a previous change that I learned about here on the list. It 
is meant to solve a problem when rdesktop would timeout. The contents of 
that rdesktop.wrapper script are this:

----------
#!/bin/sh

program="${0%%\.wrapper}"

while true; do
    $program "$@"
done
-------------

Finally, my lts.conf looks like this:

-----------------
[Default]
# settings here apply to ALL stations: ************************************
     SCREEN_03    = shell
     SCREEN_07    = ldm

[WindowsStations]
# settings here apply to stations using "LIKE = WindowsStations": 
***********
     RDP_OPTIONS   = "-k pt -a 16 -r disk:Drives=/media/root"
     RDP_SERVER    = vm-xp1
     SCREEN_08     = rdesktop

[00:13:B5:91:5A:12]
     LIKE          = WindowsStations
     RDP_SERVER    = vm-xp3
     MENU          = true

----------

If the MENU=true option is present, then that station gets to see the 
menu. The RDP_SERVER is the default option. If the user just presses 
enter, he gets that option. If he chooses something else on the menu, 
then it overrides the default.

Hope this helps somebody. Suggestion for improvement are welcome.

Thanks.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to