Your company here — click to reach over 10,000 unique daily visitors

tn5250rc - Man Page

tn5250 and lp5250d configuration file


The tn5250rc file contains groups of options for tn5250 and lp5250d. When a hostname is passed to one of these programs, the named group is looked up in tn5250rc, and any options given in that group are processed.

If a named group is found, and defines a host option, that option specifies the server. Otherwise, the host parameter to the program is used.

A group of options looks like this:

   groupname {

Each group of options starts with the group name, followed by a left brace (curly bracket) character. Following lines should have one option on each line. The last line of the group has a single right brace.

The global tn5250rc file may be overridden by the user's ~/.tn5250rc file.


The options given here may be used inside a section of the configuration file, or on the tn5250 or lp5250d command line.  Most options take the form OPTION=VALUE. Options listed with a leading +/- can be either turned on (+OPTION) or off (-OPTION).

Common Options

These options apply to both printer and display emulation sessions.


Set the host to connect to.  The URL is of the form [PROTOCOL:]HOSTNAME[:PORT]. The default protocol, if not supplied, is tn5250. See Protocols below for descriptions of the available protocols.


Set the translation table between ASCII and EBCDIC.  This should match the CCSID of the interactive job.  The default is 37. See Translation Maps below for more information.


Set the device name for the AS/400 to assign to the 5250 session. This should be up to ten characters long and consist of only letters and numbers.  It will be converted to uppercase and used as the name of the 5250-compatible device on the AS/400.  There may only be one session active with any given name at one time.


Log all actions to TRACEFILE. This file will get very large, and may contain sensitive information such as the password used to log in.


If set, then verify that the server's certificate was issued by a CA in the file given by the ssl_ca_file option. If the certificate's issuer cannot be verified, do not connect to the server.


Specify the file containing the certificate for the CA that issued the server's certificate. If the server certificate is self-signed, CAFILE should contain the certificate displayed by the Digital Certificate Manager option Copy and paste certificate.


Specify the file containing the personal certificate, in PEM format. This must be a certificate associated with your user profile on the AS/400 by DCM.


If the personal certificate given by ssl_cert_file is password protected, the password may be given here to bypass the password prompt.

Display Options

These options are specific to tn5250 and xt5250.


Force or disable the use of underscore characters instead of the underline attribute, for terminals that do not support underlining but where tn5250 does not work this out itself.


Turn the ruler feature on or off.  When enabled, the row and column of the cursor will be highlighted.


Set the terminal model name for the emulation session to use.  The default depends on whether the terminal supports colour, and whether it is large enough to support the large terminal size.  See Display Types below for valid model names.

The default model emulated is an IBM-3179-2, a 24x80 colour terminal.


If tn5250 is running in an xterm, sets the font to change to when the terminal is in 80 column mode.  This should be a valid X font name, such as can be chosen with xfontsel.


If the emulated terminal has a size of 27x132, set the font to use in 132 column mode, as for the font_80 option.


If present, will run the supplied command instead of using the terminal beep.


If enabled, automatically resets the input inhibited state when cursor movement keys or function keys are pressed.  The default is disabled.


Set any other environment variables controlling the terminal session. A list of relevant variables is given in section 5 of RFC2877.

Printer Options


Set the command that will be run to receive printer output.  The default command is `scs2ascii |lpr'.


Set the name of the host print transform description to use on the AS/400.  This is the same as the MFRTYPMDL parameter on the CRTDEVPRT command.  See the CL Reference or the online help for a list of valid values.


Set any other environment variables controlling the printer session. A list of relevant variables is given in section 7 of RFC2877. More generally, the variables are the parameters of the CRTDEVPRT command, with a prefix of IBM.

Option Values


The supported protocols for the emulation session are listed below.


Connect to the AS/400 using a normal unencrypted telnet connection. tn5250 is an alias for telnet.


Connect securely using an encrypted SSL session. This option is only available if tn5250 was compiled with SSL support.


Instead of connecting to a server, replay the trace generated by the trace option.  The path to the trace file should be given instead of the hostname.

Translation Maps

CCSIDs on the AS/400 are listed in Appendix G of IBM manual SC41-5101-01, AS/400 National Language Support.  This manual is available on the web at <http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AWC01/G.2>.

Currently recognised values for the translation map are: 37, 256, 273, 277, 278, 280, 284, 285, 290, 297, 420, 424, 500, 870, 871, 875, 880, 905, and 1026.  Most of these are translated to ISO-8859-1, also known as Latin 1.  Some of them contain characters only present in another encoding, which is used instead.  The valid CCSID values, and the Unix encoding used, are listed below.

CCSIDUnix encodingDescription
37ISO-8859-1US, Canada, Netherlands,
Portugal, Brazil, Australia,
New Zealand
273ISO-8859-1Austria, Germany
277ISO-8859-1Denmark, Norway
278ISO-8859-1Finland, Sweden
284ISO-8859-1Spanish, Latin America
285ISO-8859-1United Kingdom
290JIS_X0201Katakana Extended
500ISO-8859-1Belgium, Canada, Switzerland
870ISO-8859-2Eastern Europe
905ISO-8859-3Turkey - Latin3
1026ISO-8859-9Turkey - Latin5

If possible, configure your terminal to use the appropriate encoding if your AS/400 uses any of these CCSIDs.

Display Types

The following values are valid for the env.TERM option.

IBM-3179-224x80 color
IBM-3180-227x132 monochrome
IBM-3196-A124x80 monochrome
IBM-3477-FC27x132 color
IBM-3477-FG27x132 monochrome
IBM-5251-1124x80 monochrome
IBM-5291-124x80 monochrome
IBM-5292-224x80 color


Define a connection named dsp01 that connects to the machine iseries.example.com, using the German CCSID, a 132 column terminal, and printing underscore characters instead of using underlines.

   disp01 {
       host = iseries.example.com
       map = 273
       env.TERM = IBM-3477-FC

Define a printer connection, using host print transform to produce PCL output for an HP Laserjet compatible printer.

   print01 {
       host = iseries.example.com
       env.DEVNAME = HPLJ01
       env.IBMMFRTYPMDL = *HP4

Define a secure SSL session, checking the server's certificate against the CA certificare stored in cacert.pem, and using the client certificate in jbloggs.pem to sign on automatically.

   secure01 {
       host = iseries.example.com
       ssl_ca_file = cacert.pem
       ssl_cert_file = jbloggs.pem

See Also

tn5250(1), lp5250d(1), http://tn5250.sourceforge.net/, RFC1205, RFC2877, II10918.


tn5250 was written by Michael Madore, Jay Felice, Scott Klement and others; see the AUTHORS file for details. This manual page was written by Carey Evans.

Referenced By

lp5250d(1), tn5250(1).

12 November 2001