Sie sind auf Seite 1von 49

Thinstation 3.

0 Configuration Guide

Jader Henrique da Silva, 2MI Tecnologia


Marcos M. Amorim, 2MI Tecnologia

Thinstation 3.0 Configuration Guide


by Jader Henrique da Silva and Marcos M. Amorim
Copyright 2009 2MI Tecnologia
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any
later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of
the license is included in the section entitled "GNU Free Documentation License".

Table of Contents
Introduction ..................................................................................................................................... vii
1. Global configuration ........................................................................................................................ 1
Version ..................................................................................................................................... 1
Keyboard .................................................................................................................................. 1
Timezone .................................................................................................................................. 1
Syslog ...................................................................................................................................... 1
usbEnable .................................................................................................................................. 2
dailyReboot ............................................................................................................................... 2
audioLevel ................................................................................................................................ 2
User ......................................................................................................................................... 2
Password ................................................................................................................................... 2
2. Network ........................................................................................................................................ 4
Configure Network ..................................................................................................................... 4
Hostname .................................................................................................................................. 4
Default Gateway ........................................................................................................................ 4
Use DHCP ................................................................................................................................ 5
Interface .................................................................................................................................... 5
ID ............................................................................................................................................ 5
IP address ................................................................................................................................. 5
Netmask .................................................................................................................................... 6
Gateway .................................................................................................................................... 6
DNS ......................................................................................................................................... 6
Domain Search .......................................................................................................................... 6
3. Get remote configuration files ........................................................................................................... 7
Configuration Files ..................................................................................................................... 7
Thinstation Hosts File ......................................................................................................... 7
By Global File ................................................................................................................... 8
By IP Address ................................................................................................................... 8
By Mac Address ................................................................................................................ 8
By Group .......................................................................................................................... 9
Parameters ................................................................................................................................. 9
Enable/Disable remote config ............................................................................................... 9
Server IP or Address ........................................................................................................... 9
Method to get config files .................................................................................................. 10
Command to execute to get config ....................................................................................... 10
Base path on remote server ................................................................................................ 10
Basename remote file ........................................................................................................ 10
Examples ......................................................................................................................... 11
4. Services ....................................................................................................................................... 14
RDate ..................................................................................................................................... 14
Enable/Disable remote date ................................................................................................ 14
Server IP or Address ......................................................................................................... 14
Telnet Server ........................................................................................................................... 14
Enable/Disable Telnet Server .............................................................................................. 15
Allow remote access ......................................................................................................... 15
5. Thinstation Sessions ...................................................................................................................... 16
Understanding Thinstation Sessions ............................................................................................. 16
Sessions .................................................................................................................................. 16
Available session parameters .............................................................................................. 16
An session full example ..................................................................................................... 18
Sessions Default Parameters ....................................................................................................... 19

iv

Thinstation 3.0 Configuration Guide

SessionsDefaults system related tags ....................................................................................


SessionsDefaults session related tags ....................................................................................
6. Sessions Examples ........................................................................................................................
Examples Thinstation Sessions ....................................................................................................
Firefox ....................................................................................................................................
Parameters .......................................................................................................................
Flash ......................................................................................................................................
Parameters .......................................................................................................................
ICA ........................................................................................................................................
Parameters .......................................................................................................................
IceWM ....................................................................................................................................
Parameters .......................................................................................................................
Minimo ...................................................................................................................................
Parameters .......................................................................................................................
Mplayer ..................................................................................................................................
Parameters .......................................................................................................................
NX .........................................................................................................................................
Parameters .......................................................................................................................
NX specific configuration ..................................................................................................
Openbox ..................................................................................................................................
Parameters .......................................................................................................................
Qiv .........................................................................................................................................
Parameters .......................................................................................................................
Rdesktop .................................................................................................................................
Parameters .......................................................................................................................
Replimenu ...............................................................................................................................
Parameters .......................................................................................................................
Telnet .....................................................................................................................................
Parameters .......................................................................................................................
VmView ..................................................................................................................................
Parameters .......................................................................................................................
VNC Viewer ............................................................................................................................
Parameters .......................................................................................................................
Xdm .......................................................................................................................................
Parameters .......................................................................................................................

19
21
24
24
24
24
25
25
26
26
27
28
28
28
29
30
31
31
32
32
33
33
34
35
36
37
37
37
38
38
39
40
41
41
42

List of Examples
5.1. A very simple session .................................................................................................................
5.2. Session titles ..............................................................................................................................
5.3. A session and it's sessionsDefaults complement ...............................................................................
5.4. SessionsDefaults system related tags ..............................................................................................
5.5. Session defaults XML session information ......................................................................................
5.6. Option as parameter and value ......................................................................................................
5.7. Option as parameter only .............................................................................................................
5.8. Option as no parameter ................................................................................................................
5.9. Environment variable with value ...................................................................................................
5.10. Environment variable without value .............................................................................................
6.1. ICA session XML configuration ....................................................................................................
6.2. NX session XML configuration .....................................................................................................
6.3. NX configuration file ..................................................................................................................

vi

16
17
19
20
22
23
23
23
23
23
26
31
32

Introduction
Thinstation 3.0 uses a XML based configuration. All configuration resides in a key file located at /etc/
thinstation.xml.
This file contains informations used to spawn programs after boot, to configure sessions default parameters
and environment variables and system default configuration values (e.g. keyboard map, system language,
timezone and network configuration).
This document describes XML system and session values available to the configuration file.

vii

Chapter 1. Global configuration


Global system configuration information.

Version
Thinstation configuration file version, must not be changed.
<?xml version="1.0"?>
<thinstation>
<global>
<version>3.0</version>
</global>
</thinstation>

Keyboard
Thinstation default keyboard layout.
<?xml version="1.0"?>
<thinstation>
<global>
<keyboard>us</keyboard>
</global>
</thinstation>

Timezone
Thinstation
3.0
default
system
timezone.
www.worldtimezone.com/] to find out your timezone

Check

www.worldtimezone.com

[http://

<?xml version="1.0"?>
<thinstation>
<global>
<timezone>UTC-3</timezone>
</global>
</thinstation>

Syslog
Use remote or local syslog, to use a remote server, change tag "syslog" from 'local' to ip address of syslog
server
<?xml version="1.0"?>
<thinstation>
<global>
<syslog>local</syslog>
</global>
</thinstation>

Global configuration

usbEnable
If USB support is enabled or disabled. 1 means enabled
<?xml version="1.0"?>
<thinstation>
<global>
<usbEnable>1</usbEnable>
</global>
</thinstation>

dailyReboot
TODO
<?xml version="1.0"?>
<thinstation>
<global>
<dailyReboot>1</dailyReboot>
</global>
</thinstation>

audioLevel
Determine audio level to station, the values will be between 0 and 100, remember 100 is maximum volume
<?xml version="1.0"?>
<thinstation>
<global>
<audioLevel>80</audioLevel>
</global>
</thinstation>

User
Default username to execute session commands
<?xml version="1.0"?>
<thinstation>
<global>
<user>ts</user>
</global>
</thinstation>

Password
TODO
<?xml version="1.0"?>
<thinstation>
<global>

Global configuration

<password>pleasechangeme</password>
</global>
</thinstation>

Chapter 2. Network
Configure first interface

Configure Network
Configuring All supported sessions complete this session with they options
<?xml version="1.0"?>
<thinstation>
<network>
<hostname>ts_*</hostname>
<defaultGw>eth0</defaultGw>
<ethernet>
<useDhcp>1</useDhcp>
<id>0</id>
<interface>eth0</interface>
<address>10.0.0.2</address>
<netmask>255.255.255.0</netmask>
<gateway>10.0.0.1</gateway>
<nameserver1>10.0.0.1</nameserver1>
<nameserver2>10.0.0.1</nameserver2>
<domain>thinstation.org</domain>
</ethernet>
</network>
</thinstation>

Hostname
Set device hostname
The character * will be replace by Mac Address of the first interface
<?xml version="1.0"?>
<thinstation>
<network>
<hostname>ts_*</hostname>
</network>
</thinstation>

Default Gateway
Configure device default gateway, this is necessary to work with any interfaces
<?xml version="1.0"?>
<thinstation>
<network>
<defaultGW>ts_*</defaultGW>
</network>
</thinstation>

Network

Use DHCP
Configure interface to use or not dhcp
<?xml version="1.0"?>
<thinstation>
<network>
<ethernet>
<useDhcp>1</useDhcp>
</ethernet>
</network>
</thinstation>

Interface
Optional tag to indicate which interface to configure
<?xml version="1.0"?>
<thinstation>
<network>
<ethernet>
<interface>eth0</interface>
</ethernet>
</network>
</thinstation>

ID
Arbitrary numeric interface id. Obrigatory if <interface> tag is not specified.
<?xml version="1.0"?>
<thinstation>
<network>
<ethernet>
<id>0</id>
</ethernet>
</network>
</thinstation>

IP address
Configure this IP to interface
<?xml version="1.0"?>
<thinstation>
<network>
<ethernet>
<address>10.0.0.2</address>
</ethernet>
</network>
</thinstation>

Network

Netmask
Configure this netmask to interface
<?xml version="1.0"?>
<thinstation>
<network>
<ethernet>
<netmask>255.255.255.0</netmask>
</ethernet>
</network>
</thinstation>

Gateway
Configure this default gateway
<?xml version="1.0"?>
<thinstation>
<network>
<ethernet>
<gateway>10.0.0.1</netmask>
</ethernet>
</network>
</thinstation>

DNS
Configure dns nameserver
<?xml version="1.0"?>
<thinstation>
<network>
<ethernet>
<nameserver1>10.0.0.1</nameserver1>
<nameserver2>10.0.0.1</nameserver2>
</ethernet>
</network>
</thinstation>

Domain Search
Configure domain search
<?xml version="1.0"?>
<thinstation>
<network>
<ethernet>
<domain>thinstation.org</domain>
</ethernet>
</network>
</thinstation>

Chapter 3. Get remote configuration


files
Thinstation has the ability to download files from remote settings, using the protocols tftp, ftp and
http. Files downloaded from the server, will be added to the main 'thinstation.xml'. Some files will be
downloaded automatically from the server in the following order:

basepath/basename-network.xml

basepath/basename-IPADDRESS.xml

basepath/basename-MACADDRESS.xml

basepath/basename-GROUP.xml

basepath/basename-HOSTNAME.xml

Configuration Files
Thinstation allow multiples remote configuration file, this section explain all files and here you can view
all parameters.

Thinstation Hosts File


The basename-hosts file has a format to provide for the Thinstation a way to obtain configuration files
based on groups of Thin Client.

Example
This is an example to hosts file.
<thinstation xmlns="http://thinstation.sourceforge.net/xmlconf">
<hosts>
<macaddr>080027900611</macaddr>
<hostname>hostname_*</hostname>
<group>test</group>
</hosts>
</thinstation>

Parameters
This is example to get config from http server
<thinstation xmlns="http://thinstation.sourceforge.net/xmlconf">
<hosts>
<macaddr>080027900611</macaddr>
<hostname>hostname_*</hostname>
<group>test</group>
</hosts>
<hosts>
<macaddr>090030900AFF</macaddr>
<hostname>hostname_*</hostname>

Get remote configuration files

<group>test</group>
</hosts>
</thinstation>

macaddr
Tell mac AddRes Thin Client
<thinstation xmlns="http://thinstation.sourceforge.net/xmlconf">
<hosts>
<macaddr>080027900611</macaddr>
</hosts>
</thinstation>

hostname
You may inform hostname or not
<thinstation xmlns="http://thinstation.sourceforge.net/xmlconf">
<hosts>
<hostname>hostname_*</hostname>
</hosts>
</thinstation>
*The character * will be replace by mac address

group
The group name of Thin Client
<thinstation xmlns="http://thinstation.sourceforge.net/xmlconf">
<hosts>
<group>groupname1</group>
</hosts>
</thinstation>
*The group tag will be used by remote conf to get configuration file by group name

By Global File
The global file "basename-network.xml" is first file to be downloaded, this file can contain any valid
configuration.

By IP Address
The RemoteConf search on a file server with the ip address of thin client in the basepath server, this file
should be named basename-IPADDRESS.xml without any dots
thinstation-192168010.xml
This example correspond, 'thinstation' to basename and Thin Client ip address is 192.168.0.10.

By Mac Address
The RemoteConf search on a file server with the ethernet address of thin client in the basepath server, this
file should be named basename-MACADDRESS.xml without any dots

Get remote configuration files

thinstation-080027900611.xml
This example correspond, 'thinstation' to basename and Thin Client ethernet address is 08:00:27:90:06:11.

By Group
The RemoteConf need another file to know the group that this thin client, and that the file 'basenamehosts.xml' is downloaded before you continue and download the configuration file for each group. See
Thinstation Hosts File for more.

Parameters
Bellow you view all parameters to remote config
<?xml version="1.0"?>
<thinstation>
<services>
<remoteConf>
<enable>0</enable>
<server>192.168.15.212</server>
<method>http</method>
<cmd>/usr/bin/wget</cmd>
<basepath>./</basepath>
<basename>thinstation</basename>
</remoteConf>
</services>
</thinstation>

Enable/Disable remote config


Enable or Disable remote config, if enable another configs options be need.

Note
0 = Disable - 1 = Enable
<?xml version="1.0"?>
<thinstation>
<services>
<remoteConf>
<enable>0</enable>
</remoteConf>
</services>
</thinstation>

Server IP or Address
See tftp/http/ftp example to review correct parameter to server
<?xml version="1.0"?>
<thinstation>
<services>
<remoteConf>
<server>192.168.10.1</server>
</remoteConf>

Get remote configuration files

</services>
</thinstation>

Method to get config files


Today only tftp/http/ftp is supported by remote config
<?xml version="1.0"?>
<thinstation>
<services>
<remoteConf>
<method>tftp</method>
</remoteConf>
</services>
</thinstation>

Command to execute to get config


This command is necessary to ts-netfiles
<?xml version="1.0"?>
<thinstation>
<services>
<remoteConf>
<cmd>/usr/bin/tftp</cmd>
</remoteConf>
</services>
</thinstation>

Base path on remote server


The basepath on remote server

Note
Example: default basepath is '.', but you can specify 'config/'
<?xml version="1.0"?>
<thinstation>
<services>
<remoteConf>
<basepath>./</basepath>
</remoteConf>
</services>
</thinstation>

Basename remote file


The basename parameter determine initial filename from remote server

Note
Example: default basename is 'thinstation', but you can specify 'myconfig'
<?xml version="1.0"?>
<thinstation>

10

Get remote configuration files

<services>
<remoteConf>
<basepath>thinstation-</basepath>
</remoteConf>
</services>
</thinstation>

Examples
Bellow all config examples to supported protocols

TFTP
This is default config to remote conf, get config from tftp server
<?xml version="1.0"?>
<thinstation>
<services>
<remoteConf>
<enable>1</enable>
<server>192.168.15.212</server>
<method>tftp</method>
<cmd>/usr/bin/tftp</cmd>
<basepath>./</basepath>
<basename>thinstation-</basename>
</remoteConf>
</services>
</thinstation>

HTTP
This is example to get config from http server
<?xml version="1.0"?>
<thinstation>
<services>
<remoteConf>
<enable>1</enable>
<server>http://192.168.15.212</server>
<method>http</method>
<cmd>/usr/bin/wget</cmd>
<basepath>./</basepath>
<basename>thinstation</basename>
</remoteConf>
</services>
</thinstation>

Note
If you http server running on diferent port you change server tag to 'http://address:port'

FTP
This is example to get config from ftp server

11

Get remote configuration files

<?xml version="1.0"?>
<thinstation>
<services>
<remoteConf>
<enable>1</enable>
<server>ftp://192.168.15.212</server>
<method>ftp</method>
<cmd>/usr/bin/wget</cmd>
<basepath>./</basepath>
<basename>thinstation</basename>
</remoteConf>
</services>
</thinstation>

Note
If you ftp server running on diferent port you change server tag to 'ftp://address:port'

Note
If you ftp server need username and password change server tag to 'ftp://username:password@address'

Get configuration files after boot


To get remote files after boot you can use the command 'remoteconf', this command accept some options,
see below:
Usage: remoteconf [options]
Options:
-g
-h
-i
-m
-G
-H

IPADDR
MAC
GROUP
HOSTNAME

Get global remote config


This help text
Get config by ip address
Get config by mac address
Get config by group name
Get config by hostname

-g
Get global config file basepath/basename-network.xml.

-h
Print help messages.

-i
Get configuration file by IP address, the ip address must be informed.

-h
Get configuration file by mac address, the mac address must be informed.

-g
Get configuration file by group name, the group name must be informed.
12

Get remote configuration files

-h
Get configuration file by hostname, the hostname must be informed.

13

Chapter 4. Services
Thinstation services.

RDate
Retrieve the date and time from a host or hosts on the network and optionally set the local system time.
<?xml version="1.0"?>
<thinstation>
<services>
<rdate>
<enable>0</enable>
<server>ntp.on.br</server>
</rdate>
</services>
</thinstation>

Enable/Disable remote date


Enable or Disable remote date setting, indicates if a rdate must be started at boot (1 if it must, 0 if it must
not).
<?xml version="1.0"?>
<thinstation>
<services>
<remoteConf>
<enable>0</enable>
</remoteConf>
</services>
</thinstation>

Server IP or Address
Remote date server address
<?xml version="1.0"?>
<thinstation>
<services>
<remoteConf>
<server>ntp.on.br</server>
</remoteConf>
</services>
</thinstation>

Telnet Server
Configure telnet server and allow access from remote client.
<?xml version="1.0"?>
<thinstation>

14

Services

<services>
<telnetd>
<enable>0</enable>
<allowAccessFrom>all</allowAccessFrom>
</telnetd>
</services>
</thinstation>

Enable/Disable Telnet Server


Enable or Disable telnet server, indicates if a telnet must be started at boot (1 if it must, 0 if it must not).
<?xml version="1.0"?>
<thinstation>
<services>
<telnetd>
<enable>0</enable>
</telnetd>
</services>
</thinstation>

Allow remote access


This parameter control access to telnet server, you can use * to enable all network to access.
To allow all networks use: all
To allow by network: 192.168.0.0/24 or
To allow by single ip address: 192.168.0.1
<?xml version="1.0"?>
<thinstation>
<services>
<allowAccessFrom>all</allowAccessFrom>
</services>
</thinstation>

15

Chapter 5. Thinstation Sessions


Understanding Thinstation Sessions
This section explain the Thinstation Sessions

Sessions
Sessions contains basic and specific session information used by start-session to run a session. All session
information is obtained from merging a sessionsDefaults session entry with a sessions entry for a specific
session type.
If a session option is specified both in <sessions> and <sessionsDefaults>, the value in <sessions> will
be used.

Example 5.1. A very simple session


<?xml version="1.0"?>
<thinstation>
<sessions>
<mysession>
<type>my_application</type>
<id>0</id>
<display>0</display>
</mysession>
</sessions>
</thinstation>

Available session parameters


Autostart
Autostart indicates if a session must be started at boot (1 if it must, 0 if it must not).

Note
If not configured, fallback to Sessions Defaults

Type
The session type maps an active session to a sessionsDefaults complement. Thinstation determines which
programs and default values to use based on this value. If this tag is not set in XML session configuration,
thinstation will try to determine the session type based on session's root tag name (e.g.: "mysession").
Known session types:

firefox

flash

16

Thinstation Sessions

ica

icewm

minimo

mplayer

nx

openbox

qiv

rdesktop

replimenu

telnet

vmview

vnc

Title
The session title contains a user friendly session name useful to be displayed by menu applications. Some
sessions might use title as a configuration file basename.
Title is exported as an environment variable named SESSION_TITLE.

Example 5.2. Session titles

Desktop

Web Browser

Movie Player

Remote Desktop

Flash Player

ID
The session ID is an alfanumeric value used to uniquely identify a session. This value must always be
present, set and unique. Note that altough thinstation use only numeric values for session IDs, you may
use any combination of letters and numbers.
ID is exported as an environment variable named SESSION_ID.
You should not set it at sessionsDefaults because all session of this same type will inheirit it.

17

Thinstation Sessions

TTY
TTY determines in which tty (vt) the session will run on.
If session requires a X display, TTY will determine in which vt this X display will be spawned. Otherwise,
the session application will be run on this vt.

Display
The X display where this session will run on. If this tag is present, a X server session will be spawned
and the session application will be run over this X session on the specified display. If it is not set, no X
server will be spawned.
Display is exported as two environment variables named DISPLAY_NUMBER and DISPLAY (the last
one is prepended with ':' and appended with Screen).

DisplayAddress
The display host address where this session will run on. If this tag is present, a X server session will not
be spawned and the session application will be run over a X session on the specified host. If it is not set,
no X server will be spawned.
DisplayAddress is exported as an environment variable named DISPLAY_ADDRESS and is prepended
to DISPLAY.

Screen
The X screen where this session will be run on if display is set.
Screen is exported as an environment variable named SCREEN_NUMBER and is appended to DISPLAY.

Multi screen support


You may set screen mutiple times to obtain multi screen support.
When using multiscreen, SCREEN_NUMBER and DISPLAY will use the first screen found.
Two variables will be exported in this mode, SCREENS and DISPLAYS. SCREENS is set to all Screen
values separated by space. DISPLAYS is set with space separated DISPLAY-like values.

An session full example


As you may notice, all tags from a sessionDefaults session entry can be used within a sessions entry and
vice versa.

18

Thinstation Sessions

Example 5.3. A session and it's sessionsDefaults complement


<?xml version="1.0"?>
<thinstation>
<sessionsDefaults>
<mysession>
<type>my_application</type>
<title>My Application</title>
<autostart>0</autostart>
<cmd>
<global>/usr/bin/myapp</global>
<menu>/usr/bin/myapp</menu>
<window>/usr/bin/myapp</window>
</cmd>
<parameters>
<count param="-c">16</fullscreen>
<daemonize param="-d">ON</fullscreen>
<logerror param="-e">OFF</fullscreen>
</parameters>
<env>
<home var="HOME">/tmp</home>
<libraryPath var="LD_LIBRARY_PATH">/usr/lib/myapp</libraryPath>
<posix var="POSIX_COMPLIANCE">1</posix>
</env>
</mysession>
</sessionsDefaults>
<session>
<mysession>
<type>my_application</type>
<id>0</id>
<tty>5</tty>
<display>12</display>
</mysession>
</session>
</thinstation>

Sessions Default Parameters


A thinstation session represents one or more applications that, generally, run over a Xorg display and a
window manager. A session is declared as a group of XML tags described in the following sections. A
session may be a local-only (e.g.: openbox, Qiv) or remote connection oriented application (e.g.: RDP,
VNC, ICA).
Every session have default parameters that allow it to be declared in a very simple form. These default
parameters are described in SessionDefaults session related tags section.

SessionsDefaults system related tags


SessionDefaults contains desktop or session relevant global tags.

19

Thinstation Sessions

Example 5.4. SessionsDefaults system related tags


<?xml version="1.0"?>
<thinstation>
<sessionsDefaults>
<workspace>0</workspace>
<showIcon>1</showIcon>
<showMenu>0</showMenu>
<screenPosition>1</screenPosition>
<reconnectOnPrompt>1</reconnectOnPrompt>
</sessionsDefaults>
</thinstation>

Workspace
TODO
<?xml version="1.0"?>
<thinstation>
<sessionsDefaults>
<workspace>0</workspace>
</sessionDefatuls>
</thinstation>

Show Icon
If enable add icons to all aplications and sessions to desktop, using package ts-idesk
<?xml version="1.0"?>
<thinstation>
<sessionsDefaults>
<showIcon>1</showIcon>
</sessionDefatuls>
</thinstation>
Possible Values:
O - Disable Icons
1 - Enable Icons
*You can add this options to session

Show Menu
If enable add menu itens to all aplications and sessions
<?xml version="1.0"?>
<thinstation>
<sessionsDefaults>
<showMenu>1</showMenu>
</sessionDefatuls>
</thinstation>

20

Thinstation Sessions

Possible Values:
O - Disable Icons
1 - Enable Icons
*You can add this options to session

Screen Position
Configure session to use screen position 'n'. When working with multiple monitors use this option to start
session in the 'n'th monitor (equivalent to X's screen)
<?xml version="1.0"?>
<thinstation>
<sessionsDefaults>
<screenPosition>1</screenPosition>
</sessionDefatuls>
</thinstation>
ScreenPosition is exported as an environment variable named POSITION.

Reconnect On Prompt
Enable or disable the reconnection session alert for connection oriented sessions (e.g.: RDP)
<?xml version="1.0"?>
<thinstation>
<sessionsDefaults>
<reconnectOnPrompt>1</reconnectOnPrompt>
</sessionDefatuls>
</thinstation>
ReconnectOnPrompt is exported as an environment variable named RECONNECTONPROMPT.

SessionsDefaults session related tags


Beyond system tags, session defaults contains full session declarations. These sessions tags contains all
information needed to start a session in the simplest and most standard way.

21

Thinstation Sessions

Example 5.5. Session defaults XML session information


<?xml version="1.0"?>
<thinstation>
<sessionsDefaults>
<mysession>
<type>my_application</type>
<title>My Application</title>
<autostart>0</autostart>
<cmd>
<global>/usr/bin/myapp</global>
<menu>/usr/bin/myapp</menu>
<window>/usr/bin/myapp</window>
</cmd>
<parameters>
<count param="-c">16</fullscreen>
<daemonize param="-d">ON</fullscreen>
<logerror param="-e">OFF</fullscreen>
</parameters>
<env>
<home var="HOME">/tmp</home>
<libraryPath var="LD_LIBRARY_PATH">/usr/lib/myapp</libraryPath>
<posix var="POSIX_COMPLIANCE">1</posix>
</env>
</mysession>
</sessionsDefaults>
</thinstation>
Please note that, although these information fully describe a session, and a session is generally not runnable
without a sessionDefaults session entry, they alone are not responsable for starting a session. The process
and tags needed to start a session will be explained later on.
Every sessionsDefaults session entry contains an arbitrarily named session root tag (<mysession>) a type
(<type>my_application</type>), a title (<title>My Application</title>), an autostart flag, a <cmd> group
and optional <parameters> and <env> groups.

Type
The session type maps a default session configuration with an active session. See session-type for more.

Title
See session title.

Autostart
See session autostart.

Cmd
The <cmd> group contains commands used to start a session by start-session (global), a menu application
(menu) or a desktop icon (window).
Commands specified in the <cmd> group must not contain parameters. If your command needs parameters
you must use the <parameters> group.

22

Thinstation Sessions

Parameters
The <parameters> group is used to provide parameters for commands specified in <cmd> group.
A parameter is declared using an arbitrary tag name, a tag attribute called "param" and a tag value. There's
3 ways of using the <parameters> group to create parameters exemplified below. All examples below use
a "/usr/bin/command" <cmd> group.

Example 5.6. Option as parameter and value


<colourDepth param="-a">16</colourDepth>
Result command line: /usr/bin/command -a 16

Example 5.7. Option as parameter only


<colourDepth param="-a">ON</colourDepth>
Result command line: /usr/bin/command -a

Example 5.8. Option as no parameter


<colourDepth param="-a">OFF</colourDepth>
Result command line: /usr/bin/command

Env
Env is used to provide environment variables for commands specified in <cmd> group.
An environment variable is declared using an arbitrary tag name, a tag attribute called "var" which contains
the variable name and a tag content which is used as variable value. If tag content is empty, the variable
will be set to empty. Env can be used to provide a variable with or without a value. Environment variables
can carry a vlaue or be set as empty. All examples below use a "/usr/bin/command" <cmd> group.

Example 5.9. Environment variable with value


<env>
<libraryPath var="LD_LIBRARY_PATH">/usr/lib/myapp</libraryPath>
</env>
Result command line: LD_LIBRARY_PATH=/usr/lib/myapp /usr/bin/command

Example 5.10. Environment variable without value


<env>
<sessionManager var="SESSION_MANAGER" />
</env>
Result command line: SESSION_MANAGER= /usr/bin/command

23

Chapter 6. Sessions Examples


Examples Thinstation Sessions
Below are some examples of sessions supported by Thinstation.

Firefox
All supported sessions complete this session with they options
<?xml version="1.0"?>
<thinstation>
<sessions>
<firefox>
<type>firefox</type>
<id>1</id>
<title>Firefox</title>
<display>1</display>
<autostart>0</autostart>
<parameters>
<homePage param="-h">http://www.thinstation.org</homePage>
<fullscreen param="-f">0</fullscreen>
<blockPopup param="-bp">ON</blockPopup>
<savePassword param="-sp">ON</savePassword>
<profileName param="-profile">TS.Default</profileName>
</parameters>
</firefox>
</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'firefox'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more.

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

24

Sessions Examples

<homePage>*
Default home page to session

<fullscreen>
Use firefox with kiosk mode

<blockPopup>
Enable or disable block popup

<savePassword>
Enable or disable save password

<profileName>
Profile name to session firefox, default is TS.default.

Note
* Required values, must not be empty

Flash
All supported sessions complete this session with they options

<?xml version="1.0"?>
<thinstation>
<sessions>
<flash>
<type>flash</type>
<id>4</id>
<title>Flash</title>
<display>4</display>
<autostart>0</autostart>
<parameters>
<homepage param="-h">http://www.bezzmedia.com/swfspot/resources/47-phot
<fullscreen param="-f">ON</fullscreen>
</parameters>
</flash>
</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'flash'. See sessions-type for more.

<id>*
See sessions-id for more.

25

Sessions Examples

<title>*
See sessions-title for more.

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

<homePage>*
Default home page or flash movie to session

<fullscreen>
Use flash fullscreen mode

Note
* Required values, must not be empty

ICA
All supported sessions complete this session with they options

Example 6.1. ICA session XML configuration


<?xml version="1.0"?>
<thinstation>
<sessions>
<ica>
<type>ica</type>
<title>ICA Connection</title>
<id>1</id>
<display>1</display>
<autostart>0</autostart>
<env>
<application var="APPLICATION">My APP</application>
<server var="HOSTNAME">ica-server-address</server>
<username var="USERNAME">ica-server-username</username>
<password var="PASSWORD">ica-server-password</password>
<seamless var="SEAMLESS">On</seamless>
</env>
</ica>
</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*

26

Sessions Examples

Define connection type, here is 'ica'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

<application>
ICA application to be run. If empty, run ICA in Server Mode.

<server>
Server address or hostname.

<username>
Username to be used on authentication

<password>
Password to be used on authentication

<seamless>
Seamless mode. On or Off

Note
* Required values, must not be empty

IceWM
All supported sessions complete this session with they options
<?xml version="1.0"?>
<thinstation>
<sessions>
<icewm>
<type>icewm</type>
<id>0</id>
<title>IceWM</title>
<display>0</display>
<autostart>0</autostart>
</icewm>

27

Sessions Examples

</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'icewm'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

Note
* Required values, must not be empty

Minimo
All supported sessions complete this session with they options
<?xml version="1.0"?>
<thinstation>
<sessions>
<minimo>
<type>minimo</type>
<id>1</id>
<title>Minimo</title>
<display>1</display>
<autostart>0</autostart>
<parameters>
<homePage param="-h">http://www.thinstation.org</homePage>
<fullscreen param="-f">OFF</fullscreen>
</parameters>
</minimo>
</sessions>
</thinstation>

Parameters
Description of all session parameters

28

Sessions Examples

<type>*
Define connection type, here is 'icewm'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

<homePage>*
Default home page to session

<fullscreen>
Use minimo with kiosk mode

Note
* Required values, must not be empty

Mplayer
All supported sessions complete this session with they options

<?xml version="1.0"?>
<thinstation>
<sessions>
<mplayer>
<type>mplayer</type>
<id>5</id>
<title>Mplayer</title>
<display>5</display>
<autostart>0</autostart>
<parameters>
<custom param="-custom">OFF</custom>
<fullscreen param="-fs">ON</fullscreen>
<framedrop param="-framedrop">ON</framedrop>
<quiet param="-quiet">ON</quiet>
<uri param="-h">http://www.sparh.org/Videos/vids/superskateboardjump.wm
<zoom param="-zoom">ON</zoom>
<loop param="-loop">0</loop>
</parameters>
</mplayer>
</sessions>

29

Sessions Examples

</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'mplayer'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

<custom>
Custom parameter to mplayer you can use " " to add new parameters to this session.

<fullscreen>
Use mplayer fullscreen mode

<framdrop>
Enable frame dropping (for slow machines)

<quiet>
Make console output less verbose.

<uri>
Address to movie.

<zoom>
Fullscreen playback.

<loop>
Loops movie playback 'number' times. 0 means forever.

Note
* Required values, must not be empty
30

Sessions Examples

Note
Read man mplayer to new parameters, you can add new parameters to this session on custom parameters.

NX
All supported sessions complete this session with they options

Example 6.2. NX session XML configuration

<?xml version="1.0"?>
<thinstation>
<sessions>
<nx>
<type>nx</type>
<title>NX Server</title>
<id>1</id>
<display>1</display>
<autostart>0</autostart>
<env>
<session var="NX_GENERAL_SESSION">Unix</session>
<desktop var="NX_GENERAL_DESKTOP">true</desktop>
<server var="NX_GENERAL_SERVER_HOST">nx-server-address</server>
<resolution var="NX_GENERAL_RESOLUTION">fullscreen</resolution>
<sslEncryption var="NX_ADVANCED_ENABLE_SSL_ENCRYPTION">true</sslEncrypt
</env>
</nx>
</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'icewm'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
Used to name NX session configuration file. See sessions-title for more

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

<session var="NX_GENERAL_SESSION">

31

Sessions Examples

Custom NX variables. See specific configuration below

Note
* Required values, must not be empty

NX specific configuration
NX specific configuration is based on envinronment variables. You may declare these variables in XML
or using a Shell Script file, similar to those used by Thinstation 2.x.
If both XML and Shell Script file configuration is used, Shell Script variables will override those declared
in XML.

NX specific configuration using XML


You may use the '<env>' tag group to export NX variables.

<?xml version="1.0"?>
<thinstation>
<sessions>
<nx>
[...]
<env>
<session var="NX_GENERAL_SESSION">Unix</session>
<desktop var="NX_GENERAL_DESKTOP">true</desktop>
<server var="NX_GENERAL_SERVER_HOST">nx-server-address</server>
<resolution var="NX_GENERAL_RESOLUTION">fullscreen</resolution>
<sslEncryption var="NX_ADVANCED_ENABLE_SSL_ENCRYPTION">true</sslEncrypt
</env>
</nx>
</sessions>
</thinstation>

NX specific configuration using a Shell Script file


NX configuration may fallback on a shell script variables file, similar to Thinstation 2.x NX configuration
file. Any variables present in this file will replace '<env>' variables. The filename is in $HOME/.nx/
SESSION_TITLE or /etc/nx/SESSION_TITLE. SESSION_TITLE may have an arbitrary suffix. If both
file exists, the file at $HOME/.nx/ will overwrite /etc/nx/)

Example 6.3. NX configuration file


NX_ADVANCED_ENABLE_SSL_ENCRYPTION="true"
NX_GENERAL_DESKTOP="Gnome"
NX_GENERAL_SERVER_HOST="nx-server-address"
NX_GENERAL_REMEMBER_PASSWORD="true"
NX_GENERAL_RESOLUTION="fullscreen"
NX_GENERAL_SESSION="Unix"

Openbox
All supported sessions complete this session with they options

32

Sessions Examples

<?xml version="1.0"?>
<thinstation>
<sessions>
<openbox>
<type>openbox</type>
<id>0</id>
<title>OpenBox</title>
<display>0</display>
<autostart>1</autostart>
</openbox>
</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'openbox'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

Note
* Required values, must not be empty

Qiv
All supported sessions complete this session with they options
<?xml version="1.0"?>
<thinstation>
<sessions>
<qiv>
<type>qiv</type>
<id>3</id>
<title>QIV</title>
<display>3</display>
<autostart>0</autostart>
<parameters>

33

Sessions Examples

<images param="">/usr/share/wallpaper/*.jpg</images>
<fullscreen param="-f">ON</fullscreen>
<slide param="-s">ON</slide>
<random param="-r">ON</random>
<shuffle param="-S">OFF</shuffle>
<noStatusBar param="-i">ON</noStatusBar>
<statusBar param="-I">OFF</statusBar>
<transparency param="-p">OFF</transparency>
<watch param="-T">OFF</watch>
<delay param="-d">5</delay>
<readonly param="-R">ON</readonly>
</parameters>
</qiv>
</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'qiv'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

<images>*
Display images from directory, use * to select multiples images

<fullscreen>
Use qiv fullscreen mode

<slide>
Auto start slide after start, default is ON

<random>
Randomize images

<shuffle>

34

Sessions Examples

Shuffle images, default is OFF

<noStatusBar>
Don't show status bar.

<transparency>
Enable transparency for transparent images.

<watch>
Reload the image if it has changed on disk.

<delay>
Delay to show images.

<readonly>
Read only images.

Note
* Required values, must not be empty

Note
Read man qiv to new parameters, you can add new parameters to this session

Rdesktop
All supported sessions complete this session with they options
<?xml version="1.0"?>
<thinstation>
<sessions>
<rdesktop>
<type>rdesktop</type>
<title>Remote Desktop</title>
<id>6</id>
<display>6</display>
<autostart>0</autostart>
<parameters>
<colourDepth param="-a">16</colourDepth>
<redirectLPT param="-r printer:">OFF</redirectLPT>
<redirectDisk param="-r disk:">OFF</redirectDisk>
<smartCard param="-r scard:">OFF</smartCard>
<sound param="-r sound:local">OFF</sound>
<numlock param="-N">ON</numlock>
<server param="-h">192.168.15.211</server>
<custom param="-custom">OFF</custom>
<username param="-u">''</username>
</parameters>
</rdesktop>

35

Sessions Examples

</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'rdesktop'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

<colourDetpth>*
Connection colour depth.

<redirectLPT>
TODO

<redirectDisk>
TODO

<smartCard>
TODO

<numlock>
Enable numlock syncronization.

<server>
Server address or hostname.

<custom>
Custom options to rdesktop.

<username>
User name.

36

Sessions Examples

Note
* Required values, must not be empty

Replimenu
Replimenu, show all sessions configured and autostart is 0, this session can be access into tty12 (CTRL
+F12)
<?xml version="1.0"?>
<thinstation>
<sessions>
<replimenu>
<type>replimenu</type>
<title>Sessions Menu</title>
<autostart>0</autostart>
<user>root</user>
<group>root</group>
</replimenu>
</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'replimenu'. See sessions-type for more.

<title>*
See sessions-title for more.

<autostart>
See sessions-autostart for more.

<user>*
Session run as 'root' user.

<group>
Session run as 'root' group.

Telnet
Connect to Telnet Server.
<?xml version="1.0"?>
<thinstation>
<sessions>
<telnet>

37

Sessions Examples

<type>telnet</type>
<autostart>0</autostart>
<title>Telnet</title>
<tty>tty2<tty>
<parameters>
<user param="-l">OFF</user>
<server param="">towel.blinkenlights.nl</server>
<port param="">OFF</port>
</parameters>
</telnet>
</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'mplayer'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more

<tty>*
See sessions-tty for more.

<autostart>
See sessions-autostart for more.

<server>
Server address or hostname.

<username>
Username to be used on authentication

<port>
Port to be used on telnet server

VmView
This session allow connect to VDI VMWare Infrastructure
<?xml version="1.0"?>
<thinstation>
<sessions>

38

Sessions Examples

<vmware>
<type>vmware</type>
<title>VmVIew</title>
<id>1</id>
<display>6</display>
<autostart>0</autostart>
<parameters>
<background param="--background">/etc/background.jpg</background>
<desktopName param="--desktopName">mickey</desktopName>
<domainName param="--domainName">donaldduck.com</domainName>
<fullscreen param="--fullscreen">ON</fullscreen>
<nonInteractive param="--nonInteractive">ON</nonInteractive>
<password param="--password">mouse</password>
<userName param="--userName">'minnie'</userName>
<redirect param="--redirect">disk:usb=/mnt/usbdevice/sda1</redirect>
<redirect param="--redirect">'printer:usb='HP LaserJet 4''</redirect>
<serverURL param="--serverURL">192.168.1.1</serverURL>
<usb param="--usb">'xxx'</usb>
<usb param="--usb">'xxxx1'</usb>
<rdesktopOptions param="--rdesktopOptions">'-k pt_br -N'</rdesktopOptio
</parameters>
</vmware>
</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'vmware'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

<background>*
Configure Xorg background.

<desktopName>
Configure desktop name

39

Sessions Examples

<fullscreen>
Use connection in fullscreen mode, to disable change to OFF

<nonInteractive>
Connect automatically if enough values are given on the command line.

<passwod>
Specify password for password authentication.

<userName>
Specify user name for password authentication.

<serverURL>*
Specify connection broker. Only ip address or hostname without protocol

<redirect>
Forward device redirection to rdesktop. disk:usb=/mnt/usbdevice/sda1: Redirect mountpoint to
rdesktop

<usb>
Options for USB forwarding.

<rdesktopOptions>
Options used by rdesktop.

Note
* Required values, must not be empty

VNC Viewer
All supported sessions complete this session with they options
<?xml version="1.0"?>
<thinstation>
<sessions>
<vnc>
<type>vnc</type>
<id>1</id>
<title>VNC Viewer</title>
<display>1</display>
<autostart>0</autostart>
<parameters>
<fullscreen param="-fullscreen">ON</fullscreen>
<passwd param="-passwd">OFF</passwd>
<server param="-h">192.168.15.4</server>
</parameters>
</vnc>

40

Sessions Examples

</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'vnc'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

<fullscreen>*
Full screen session.

<passwd>
TODO: Create file with password.

<server>
Server address or hostname.

Note
* Required values, must not be empty

Xdm
Connect to X Server, using XDMCP
<?xml version="1.0"?>
<thinstation>
<sessions>
<x>
<type>x</type>
<id>10</id>
<title>XDMCP</title>
<display>6</display>
<autostart>1</autostart>

41

Sessions Examples

<env>
<type var="BROWSER">-broadcast</type>
<server var="SERVER">192.168.0.104</server>
</env>
</x>
</sessions>
</thinstation>

Parameters
Description of all session parameters

<type>*
Define connection type, here is 'mplayer'. See sessions-type for more.

<id>*
See sessions-id for more.

<title>*
See sessions-title for more

<display>*
See sessions-display for more.

<autostart>
See sessions-autostart for more.

<env> Environment variables

<type var="BROWSER>-broadcast</type>*
The type tag can use method to browser a xdm server, the possible values is: -query, -indirect or broadcast. With broadcast method isn't necessary the tag "server" describe below.

<server var="SERVER">0.0.0.0</server>
This value can change to ip or hostname address to a xdm server

Note
* Required values, must not be empty

42

Das könnte Ihnen auch gefallen