x3270/Command-line options

From The x3270 Wiki
Revision as of 19:42, 22 September 2023 by Pmattes (talk | contribs) (→‎Options)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The syntax for x3270 is:

x3270 [option]... [hostname [port]]

or to specify a session file:

x3270 [option]... session-filename.x3270

Here is a summary of x3270 command-line options. The table columns are:

The name and syntax of the option.
A summary of what the option does.
Resource and Further Details
The x3270 resource that the option sets. Most command-line options set an x3270 resource value. The hyperlink to the x3270 resource gives more detailed information about what the option does.
The default value of the x3270 resource.
Additional information about the option.


Option Meaning Resource
and Further Details
Default Notes
--help Display basic command-line help and then exit
Prefer IPv4 addresses preferIpv4 = true false New in 4.2
Prefer IPv6 addresses preferIpv6 = true false New in 4.2
-accepthostname name
Name to match in the host's TLS certificate acceptHostname
Make the icon a live miniature of the screen activeIcon = true false
Sets APL mode aplMode = true false
-bg color
Default background color background white
-cadir dir
Directory containing CA root certificates for TLS caDir OpenSSL only
-cafile file
File containing CA root certificate for TLS caFile OpenSSL only
-certfile file
File containing client certificate for TLS certFile
-certfiletype type
Type of client certificate file (pem or asn1) for TLS certFileType pem OpenSSL only
-chainfile file
File containing chain of CA certificates for TLS chainFile OpenSSL only
-clear resource
Set a Boolean resource to false
-clientcert name
Name of client certificate for TLS clientCert macOS only
-codepage codepage
Host EBCDIC code page codePage bracket
-connecttimeout seconds
Timeout before giving up on a host connection connectTimeout
-devname device-name
Device name (workstation ID) response to TELNET NEW-ENVIRON request devName
-display display-name
X11 display to connect to display
-e command [arg ...] Command to run instead of connecting to a host Must be the last option on the command line
-efont font
Font to use for the terminal display emulatorFont 3270
-fg color
Default foreground color foreground black
-geometry widthxheight+x+y
Initial window position and size geometry
-httpd [address:]port
Start HTTP server httpd
Start iconified (minimized) iconic = true false
-im input-method
Multi-byte input method inputMethod
-keyfile file
Key file for TLS client certificate keyFile OpenSSL only
-keyfiletype type
Type of client certificate key file (pem or asn1) for TLS keyFileType pem OpenSSL only
-keymap keymap
Keymap to use keymap
Start with the keypad visible keypadOn = true false
-keypasswd password
Password for the key file (OpenSSL) for TLS
Password for the certificate file (macOS) for TLS
-loginmacro actions
Actions to run when host connection is established loginMacro
-minversion version
Minimum version number required (major.minortypeiteration) minVersion
-model model
Model of 3270 to emulate model 3279-4-E
Do not verify the TLS host certificate verifyHostCert = false true
Force NVT mode -- do not negotiate 3270 mode nvtMode = true false
Exit x3270 when the host session is disconnected once = true false
-oversize columnsxrows
Make the display larger than the default for the 3270 model oversize
-port number
TCP port to connect to port 23
-proxy type:[user[:pass]@]server[:port]
Type of proxy and proxy server to use proxy
Reconnect to host after session disconnects reconnect = true false
Accept s3270 protocol actions on standard input scripted = true false
-scriptport [address:]port
Accept TCP connections for s3270 protocol sessions scriptPort
Accept only one -scriptport session scriptPortOnce = true false
Limit actions that can modify the local workstation secure = true false
-set resource
-set resource=value
Set a Boolean resource to true
Set a resource to some value
-sl lines
Save lines lines of screen data in the scrollbar buffer saveLines 4096
Accept s3270 protocol sessions on the Unix-domain socket /tmp/x3sck.pid socket = true false POSIX only
-title text
Set the window title to text title varies
-tlsmaxprotocol version
Set the maximum TLS protocol tlsMaxProtocol varies New in 4.3
-tlsminprotocol version
Set the minimum TLS protocol tlsMinProtocol varies New in 4.3
-tn terminal-name
Use terminal-name as the terminal name reported to the host termName varies
Turn on data stream and action tracing trace = true false
-tracefile file-name
Use file-name as the file for data stream and action tracing traceFile /tmp/x3trc.pid Use -trace to turn on tracing
-tracefilesize bytes
Limit trace files to bytes bytes in size traceFileSize
-user user-name
Use user-name in the reply to the TELNET NEW-ENVIRON sub-negotiation user varies
Use UTF-8 encoding for all I/O on the workstation (files, script output, etc.) utf8 = true false
-v Display version information on standard output and then exit
-xrm 'x3270.resource: value' Set the value of a resource

Deprecated options

Option Meaning Resource
and Further Details
Default Notes
-charset codepage
Host EBCDIC code page charset bracket Use -codepage instead
Simulate a monochrome X11 workstation, for testing purposes mono = true false Not the way to turn on 3278 emulation
Verify the TLS host certificate verifyHostCert = true true Redundant; this is the default