s3270/Command-line options

From The x3270 Wiki

The syntax for s3270 is:

s3270 [option]... [hostname [port]]

or to specify a session file:

s3270 [option]... session-filename.s3270

On Windows, a session file can also be specified with the suffix .ws3270.

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

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

Options

Option Meaning Resource
and Further Details
Default Notes
--help Display basic command-line help and then exit
-4
Prefer IPv4 addresses preferIpv4 = true false New in 4.2
-6
Prefer IPv6 addresses preferIpv6 = true false New in 4.2
-accepthostname name
Name to match in the host's TLS certificate acceptHostname
-cadir dir
Directory containing CA root certificates for TLS caDir OpenSSL only
-cafile file
File containing CA root certificate for TLS caFile OpenSSL only
-callback [address:]port
Connect to the specified port for an s3270 protocol session callback New in 4.0
-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 and Windows 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
-e command [arg ...] Command to run instead of connecting to a host Must be the last option on the command line
POSIX only
-httpd [address:]port
Start HTTP server httpd
-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
-keypasswd password
Password for the key file (OpenSSL) for TLS
Password for the certificate file (macOS) for TLS
keyPasswd
-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
-noverifycert
Do not verify the TLS host certificate verifyHostCert = false true
-nvt
Force NVT mode -- do not negotiate 3270 mode nvtMode = 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
-scriptport [address:]port
Accept TCP connections for s3270 protocol sessions scriptPort
-scriptportonce
Accept only one -scriptport session scriptPortOnce = true false
-set resource
-set resource=value
Set a Boolean resource to true
Set a resource to some value
-socket
Accept s3270 protocol sessions on the Unix-domain socket /tmp/x3sck.pid socket = true false POSIX only
-tn terminal-name
Use terminal-name as the terminal name reported to the host termName varies
-trace
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 POSIX: /tmp/x3trc.pid
Windows: x3trc.pid.txt
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
-utf8
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 's3270.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
-verifycert
Verify the TLS host certificate verifyHostCert = true true Redundant; this is the default