## Kermit 95 Command-Line Options

Command line options are operands given on the shell command line used to start a program, such as K95, that can be processed by the program after it starts. For example:

      C:\> k95 -Y -l com2 -b 57600

Each letter preceded by a dash is an option. Command-line options are case-sensitive; "-s" is different from "-S". Some options (like "-l" and "-b") take arguments (like "com1" or "57600"), others (like "-Y") don't. When an option does not require an argument it can be bundled with other options:

      C:\> k95 -Qis oofa.exe

If an option contains spaces, it must be enclosed in doublequotes:

       C:\> k95.exe -s "filename with spaces"

When any "action options" are included on the command line (such as `-s` to send a file), Kermit exits after executing its command-line options. If -S is included, or no action options were given, Kermit enters its interactive command parser and issues its prompt.

Exceptions to the rules:

- If the first command-line option is a filename, Kermit executes commands from the file. Additional command-line options can follow the filename.
- The special option "=" (equal sign) or "--" (double hyphen) means to treat the rest of the command line as data, rather than commands; this data is placed in the argument vector array, \&@[], along with the other items on the command line, and also in the top-level \%1..\%9 variables.
- A similar option "+" (plus sign) means: the name of a Kermit script file follows. This file is to be executed, and its name assigned to \%0 and \&_[0]. All subsequent command-line arguments are to be ignored by Kermit but made available to the script as \%1, \%2, ..., as well as in the argument-vector arrays. The initialization file is not executed automatically in this case.
- The -s option can accept multiple filenames, separated by spaces.
- the -j and -J options allow an optional second argument, the TCP port name or number.

To get help on all available command-line options, including those which are not documented here, type `help options all` at the Kermit 95 prompt, or type `help option x` to get help for option x.

Kermit also offers a selection of "extended command-line" options. These begin with two dashes, followed by a keyword, and then, if the option has arguments, a colon (:) or equal sign (=) followed by the argument. Unlike single-letter options, extended option keywords aren't case-sensitive, and they can be abbreviated to any length that still distinguishes them from other extended-option keywords. Example:

       C:\> k95.exe --banner:oofa.txt

which designates the file oofa.txt to be printed upon startup, rather than the built-in banner (greeting) text. To obtain a list of available extended options, type `help extended-options ?`. To get help about all extended options, type `help extended-options`. To get help about a particular extended option, type `help extended-option xxx`, where "xxx" is the option keyword.

Command line Kermit 95 has in common with C-Kermit are documented here. This section lists only those options that are specific to K95.

`-l _number`
  The `-l` option is normally used to specify the name of the communications device to use. However, if instead of a device name, you give a number preceded by an underscore, e.g.:

        k95 -l _1234

  this is interpreted as a Windows device handle for a communications connection that has already been opened by another process. This allows other programs to make connections and then use Kermit 95 to peform selected tasks on them. When K95 is started this way, it bypasses all device initialization and conditioning, and it does not close the device when it exits.

`-j _number`
  The `-j` `_`number option is similar to `-l` one, except a network connection is assumed for the open handle. Kermit 95 is prepared to accept Telnet negotiations but does not initiate them.

`-J host [ port ]`
  The `-J` command-line option makes Kermit 95 act just like Telnet. Follow the -J with whatever you would put on the Telnet command line: host name or IP address, optionally followed by the service port name or number, e.g.:

        telnet oofa.com
        telnet martini.eecs.umich.edu 3000

        k95 -J oofa.com
        k95 -J martini.eecs.umich.edu 3000

  When started this way, Kermit 95 makes a Telnet connection to the host and enters CONNECT (Terminal) mode automatically. It lets you escape back and reconnect any number of times (e.g. to transfer files or anything else you want), but when the connection is broken (typically, when you log out of the remote host or service), Kermit 95 exits and disappears automatically.

  The `TELNET.EXE` and `RLOGIN.EXE` programs that come with Kermit 95 invoke K95.EXE in this way.

  NOTE: OS/2 Telnet has a different command-line syntax; the `TELNET.EXE` program that comes with Kermit/2 converts from OS/2 Telnet syntax to Kermit/2.

`-J _number`
`-J $number`
  When started this way, K95 treats the number as a TCP/IP socket handle. If the number is prefaced with an underscore, the socket is being used as a telnet client connection. If the number is prefaced by a U.S. currency (dollar) sign, the socket is being used as a telnet server connection.

`-# number`
  Startup Flags. Note: the `#` is literal, follow it by a number (e.g. `-# 4`). The number is bit mapped, the sum of the desired start options:

         1 - Disable Win95 special fixes
         2 - Do not load optional network dlls
         4 - Do not load optional tapi dlls
         8 - Do not load optional kerberos dlls
        16 - Do not load optional zmodem dlls
        32 - Use stdin for input instead of the console
        64 - Use stdout for output instead of the console
       128 - Do not terminate process in response to Session Logoff

  Options 2, 4, 8, and 16 can be used to speed up K95 program load and termination if you are not using the corresponding features, and/or to avoid bugs in the corresponding DLLs (if you don't need to use them).

  Options 32 and 64 are for interfacing K95 to other programs, such as screen readers:

  - Redirection from/to pipe/file is automatically detected.

  - When stdin is used, keymapping is effectively disabled. In other words no function keys, keypad differentiation, ...

  - When stdout is used no scrollback, no colors, no cursor repositioning.

  - When using standard output, terminal emulation is still supported for responses to inquiries, printing, even screen reading, but it can not be displayed properly on the screen.

  - If a passthrough mode is desired for the terminal emulator, set terminal type tty.

  - Set command/terminal height/width affects the internal buffers and will even be reported to the host if window size reports are active on the current conection. However, they will not change the window size.

  - As 16-bit shells use intermediate files for pipes it is not possible to pipe real time input in from another process from the shell command line.

  Option 128 is for use when K95 is started as a service on Windows NT or Windows 2000.

`-N number`
  (OS/2 only) NETBIOS adapter number, to be used when making NETBIOS connections and there is more than one NETBIOS adapter to choose from. Specify number as X to disable the NETBIOS adapter query.

`--xpos:n` (K95G only)
  X-coordinate of window position, expressed as the number of pixels to the right of the upper left screen corner

`--ypos:n` (K95G only)
  Y-coordinate of window position, expressed as the number of pixels below the upper left screen corner.

`--fontname:s (or --facename:s)` (K95G only)
  Font/typeface name: string with `_` (underscore) replacing blank.

`--fontsize:n` (K95G only)
  Font point size, number, such as 14. Half sizes can be given; e.g. 14.5.

`--height:n`
  Screen height (number of rows).

`--width:n`
  Screen width (number of columns).

`--termtype:name`
  Terminal emulation name, such as vt220.

`--title:string`
  Window title (string may contain spaces, which case you should enclose the the entire option in doublequotes: `"--title:This Is the Title"`.

`--nomenubar`
  The K95G window is to include no menu bar.

`--notoolbar`
  The K95G window is to include no tool bar.

`--nostatusbar`
  The K95G window is to include no status bar.

`--nobars`
  Equivalant to `--nomenubar` `--notoolbar` `--nostatusbar`.

`--nopush`
  Disallows invocation of external applications or commands from within Kermit 95 (GUI or Console). This also disables K95G's Dialer button.

`--noescape`
  Prevents the user from manually returning to the Command screen from the Terminal screen: disables the CONNECT-mode escape sequence as well as the `\Kexit` keyboard verb.

`--noscroll`
  Prevents the user from scrolling back to previous screens: disables the scrollback-related keyboard verbs as well as the GUI scrollbars (but does not make the scrollbars disappear).

`--lockdown`
  Combines `--noscroll`, `--noescape`, `--nopush`, `--nobars` and to create a "captive" session.

`--maximize`
  Starts K95G maximized (full screen). Equivalent to SET GUI WINDOW RUN-MODE MAXIMIZE.

`--minimize`
  Starts K95G minimized (i.e. appearing only on the Windows task bar). Equivalent to SET GUI WINDOW RUN-MODE MINIMIZE.

`--scalefont`
  Screen size changes are to result in font scaling (this is the default).

`--changedim`
  Screen size changes are to leave the font size alone and change the number screen rows and columns.

Click Back on your Browser's Toolbar to return.