Chapter 12. Accessing Client Resources from the Terminal Server
12.2. Using Serial Port redirection
12.2.1. Introduction
Using ThinLinc, it is possible to access the serial ports of the client from the terminal servers. This
means that you can utilize peripheral devices which connect through a serial port, such as digital
cameras, PDAs and modems. Up to two serial ports are supported at a time.
12.2.2. Requirements
• The application which communicates with the serial port must be dynamically linked. Statically linked
applications are not supported.
12.2.3. Enabling Serial Port Redirection
Serial port redirection is activated (for the current user session) by sourcing the file
tl-serial-redir.sh. It can be done manually with this command:
$ source /opt/thinlinc/libexec/tl-serial-redir.sh
It is necessary to source this file, because it sets the environment variables CYCLADE_DEVICES and
LD_PRELOAD. Thus, all applications needing serial port access should be started as a subprocess to this
shell. The easiset way to accomplish this is to source tl-serial-redir.sh from the session startup
scripts. To automatically activate serial port redirection at login for all users, execute this command:
# ln -s /opt/thinlinc/libexec/tl-serial-redir.sh /opt/thinlinc/etc/xstartup.d/42-tl-serial-redir.sh
12.2.4. Accessing the redirected port from applications
When using redirected serial ports, applications should be configured to use a special, personal
device-file, instead of a port such as /dev/ttyS0. The two device files are called
$TLSESSIONDATA/dev/ttyS0. and $TLSESSIONDATA/dev/ttyS1.
Best Practice: Since the session number varies, it’s often convenient to use the symbolic link
/var/opt/thinlinc/sessions/$USER/last, which points to the last started session directory. For
example, the first serial port can be accessed as
/var/opt/thinlinc/sessions/$USER/last/dev/ttyS0.
131
Comentarios a estos manuales