1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

ITALC in a ThinClient environment

From italc

Jump to: navigation, search

Contents

Installation and Operation of iTALC in the openSUSE LTSP environment

iTALC comes pre-installed on openSUSE Edu Li-f-e DVD.

Howto for using iTALC on openSUSE LTSP environment is here

http://en.opensuse.org/LTSP/iTALC

Installation and Operation of iTALC in the Ubuntu LTSP environment

Here is a howto for Ubuntu 8.04.1:

https://help.ubuntu.com/community/UbuntuLTSP/iTalc


Start ICA on correct port at logon

This article is based on the German article http://wiki.skolelinux.de/italc which contains a tutorial on how to setup iTALC in a ThinClient environment.

First we have to make sure, that ICA is started at logon.

Copy the following line

/usr/local/bin/start_ica & 

and insert it into /etc/kde3/kdm/Xstartup.


Now the file /usr/local/bin/start_ica has to be created. You can try to use the following template:

#!/usr/bin/perl -w
#
#
# written by Patrick Winnertz 11.12.05
# and modified by Giovanni Gimelli - Osservatorio Tecnologico Italy
# licensed under GPL2+
#
use Socket;
use strict;
#Figure out your DISPLAY
my $display = $ENV{'DISPLAY'};
#Delete :* at the end of the string
my $displayname = $display ;
$display =~s/:[^:]*$//;
my $log = $display ;
my $address = 0;
my $isdport = 5800;
#if this script is started on the server $address is empty:
my $ivsport = 11000;
if (length($display) > 0) {
        #convert name into ipaddress
        $address = inet_ntoa(inet_aton($display));
        #Save only the last part (yyy) of the IP: xx.xx.xx.yyy
        $address =~ s/(\d*).(\d*).(\d*).(\d*)/$4/;
        my $IVSBASEPORT = 11000;
        my $ISDBASEPORT = 11400;
        $ivsport = $IVSBASEPORT+$address;
        $isdport = $ISDBASEPORT+$address;
}
#Finally start ICA:
system("/usr/bin/ica -noshm -ivsport $ivsport -isdport $isdport -display $displayname  &");

Save this script as root to /usr/local/bin/start_ica. Additionally you have to make it executable:

chmod u+x /usr/local/bin/start_ica

Now the script should be started properly at every logon.


Setup IMA

Now follows the probably most time-expensive part. You have to add all clients and setup the port of each client.

First start iTALC and switch to Client Manager. Click right to add a new classroom. After you did so, you can add clients by clicking right and select Add client. A dialog will appear where you can enter several stuff. First of all enter the name of the client, e.g. ltsp001.

As the X-sessions all are running on the server, you can enter local host for Local IP-address'. Now you have to find out the port, at which ICA is running on the according ThinClient.

If $DISPLAY doesn't contain an IP-address, you can convert it into an IP:

dig "$(echo $DISPLAY | awk -F: '{print $1}')"


The result could look like

; <<>> DiG 9.2.4 <<>> ltsp238
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13949
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ltsp238.                       IN      A

;; ANSWER SECTION:
ltsp238.                86400   IN      A       192.168.0.238

;; Query time: 70 msec
;; SERVER: 192.168.0.254#53(192.168.0.254)
;; WHEN: Fri Nov 11 22:41:10 2005
;; MSG SIZE  rcvd: 43


The most important part is the ANSWER SECTION where you can find the IP of the ThinClient, in this case 192.168.0.238. Take the last part of the IP, here 238, and add 11000. Place the result separated by ':' at the end of Local IP-address'. In this case it would be

localhost:11238

<TODO: remote-ip stuff etc.>


iTALC on workstations

When using workstations as clients, you only have to use fixed port 11000 as a local X-server is running on workstations.


iTALC on Windows Terminal Server

The key is to force each new terminal session (and therefore each new italc instance) to connect to the iTALC manager on a different port. This can be achieved by creating different startup shortcuts for each terminal user.

Install iTALC on the Terminal Server as you normally would. Unregister the service by typing ""C:\Program Files\iTALC\ica.exe" -unregisterservice" in a run command. It will pop up confirmation that the service was unregistered. Now create a shortcut for the ica.exe. Open the properties for the shortcut and add "-ivsport [port number]" to the target so it looks like this: ""C:\Program Files\iTALC\ica.exe" -ivsport 4001". I use ports after 4000 because those are the ports open on my server. Create more shortcuts for however many users you have, changing the port for each of them. Put the shortcuts in each user's startup folder. I'm sure there's an automated way to do this or an easier way, but I only have 12 users on my TS so it works for me.




Setting just the "ivsport" didn't quite work for me -- Like Linux, Windows needs both the "isvport" and the "isdport" set to different ports. Below is the VBScript I use on my servers. It allows for up to 100 connections before problems ensue (namely overlapping ports) -- which is way more than one of my servers will ever have at once. If you need to increase the connection count, just change the line that starts "cmd = """C:\Program Files" near the end of the script -- change the "useport-100" to "useport+/-(greaterValue)"

' Start_iTALC.vbs
' Getting Process functions Author Guy Thomas http://computerperformance.co.uk/
' Rest of script author Bryan Murphy
' -------------------------------------------------------'
Option Explicit
Dim objWMIService, objProcess, colProcess
Dim objFSO, objTextFile
Dim cmd, Command
Dim processCount, usePort
'If you need to use a different starting port, change it on the next line
Const defaultPort = 5900
'You need a plain text file that users need to be able to update, you can change the location on the next line.
Const textFile = "C:\iTALC\iTALCPort.txt"

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")

processCount = defaultPort
Set colProcess = objWMIService.ExecQuery ("Select * from Win32_Process")
For Each objProcess in colProcess 
	if UCase( objProcess.Name ) = "ICA.EXE" then
		processCount = processCount + 1
	end if
Next

if processCount = defaultPort then
	usePort = defaultPort
else
	Set objTextFile = objFSO.OpenTextFile(textFile, 1)
	usePort = objTextFile.Readline
	objTextFile.Close 
end if

Set objTextFile = objFSO.OpenTextFile(textFile, 2)
objTextFile.WriteLine(usePort+1)
objTextFile.Close


Set Command = WScript.CreateObject("WScript.Shell")
' This next line is set for 64-bit version of Windows, change the path as necessary for your installation
cmd = """C:\Program Files (x86)\iTALC\ica.exe"" -ivsport " & usePort & " -isdport " & usePort-100
Command.Run (cmd) 

WScript.Quit

To use the above script save it as a ".vbs" file and put it in the %ALLUSERSPROFILE%\Start Menu\Programs\Startup folder.

You'll also need to drop a plain text file somewhere and allow all users who can logon access to change it. That file is what holds the next available starting port -- the script will update it when a user logs on so there are no port conflicts. Also, the script checks if any instances of iTALC are running, if not, it will reset the port to the default value (5900) -- that's also to help prevent overlapping ports. As a result, however, users won't normally be assigned the same port on the server.

To access the different user's screens on the master application, add a computer and use the IP or Hostname followed by :portNumber. For instance, 192.168.0.1:5900 -- the port should be the "ivsport" value, not the "isdport" value. Just a reminder, make certain you add an exception to any Firewall you use, if you have one enabled, for the "ica.exe" application or the Master app won't be able to connect remotely. I created a GLOBALCONFIG.XML file for my teachers that included a bunch of pre-configured ports (more than they should need at once), and put it in their userprofile/application data/italc folder so iTALC just loaded it.

This script was tested on Windows Server 2003 x86 Enterprise and worked fine for the most part. I've recently loaded it on Windows Server 2008 x64 Enterprise and appears to be working -- though on 2008, the Username doesn't seem to be populating on the Master application (it just says "unknown") -- not sure if that's the script's/connection's fault or a change in the way one gets the username in 2008 Server.

Personal tools