-------------------
Hi,

I noticed that the "Sessions" pulldown in the greeter never had anything 
except "default", and a bunch of junk was over in the "languages" 
pulldown menu instead.  It seems--perhaps in 7.10--that the format of the 
answer when you query port 9571 has changed, so it now has an 
explicit "type" field in a colon separated format.  This breaks the 
function get_serverinfo in /opt/ltsp/i386/usr/lib/ltsp/greeters/gtk

What follows is the replaced function, which seems to do the trick for me.

Regards,
Andy Valencia


    def get_serverinfo(self, type):
        try:
            ldm_info = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            ldm_info.connect((socket.gethostbyname('server'), 9571))
            sesslist = []
            langlist = []

            for line in ldm_info.recv(1024).split('\n'):
                # Format is:
                #  {session | language | rating} : <value>
                burst = line.split(':')
                if len(burst) < 2:
                    continue
                t = burst[0]
                val = burst[1]
                if t == 'session':
                    sesslist.append(val)
                elif t == 'language':
                    langlist.append(val)
            ldm_info.close()
            if type == 'session':
                return sesslist
            else:
                return langlist
        except:
            return False

-------------------------------------------------------------------------
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-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