Command-line options

PHINDOWS.EXE supports several command-line options.

You typically add these parameters to the command when you create the icon or shortcut to launch Phindows. The options are:

-b link_speed[,commbaud]
The effective link speed.

If you use a direct serial connection, then the comm port's baud rate is set to this value as well, unless you give a specific baud rate (commbaud). If you don't specify a baud rate, the Windows default baud rate is used.

The effective link speed is used by Photon to decide if certain draw operations should be performed in a more simple bandwidth-saving way. This option allows you to specify a value independent of the serial port baud rate, if you wish. The effective link speed is also used for TCP/IP connections, in which case it defaults to 10000000 (10Mbps). If you have a faster network or don't want Photon to speed-optimize any draw operations (such as divider column resizing) then specify 100000000, which is 100Mbps. &"

-d method
Double Buffering method:
  • 0 — disable
  • 1 — use default method
  • 2 — use Direct3D
  • 3 — use DirectDraw
  • 4 — use system memory

Introduced in Phindows version 3, double buffering greatly improves the speed at which portions of the Phindows main window get redrawn after they are damaged.

When double buffering is enabled, all draws received from the remote QNX system will be performed in an offscreen memory context and then blitted to the main window. This blitting can affect the performance and CPU usage of Phindows, so a number of blitting methods have been made available for the user to choose from. In theory, because of the hardware acceleration features of most modern video cards, blitting within video memory should be faster than blitting from system memory into video memory.

Phindows can use two different methods to access video ram (Direct3D and DirectDraw), or it can blit using system memory. The specific software/hardware configuration of your computer will determine which method is faster. Direct3D is preferred, because it offers the most flexibility for future enhancements. To use this method you must have DirectX 9.0c (or later) installed on your computer. If the correct version of DirectX is not available, or if there is a failure initializing Direct3D, Phindows will fall back to using an older DirectDraw interface. If DirectDraw fails to initialize, or if it can't get access to video ram, then double buffering will be disabled. In order to enable double buffering with no video ram available, you must specify the "system memory" option.

The double buffering method choices are described in greater detail below:

No double buffering will be performed. Performance will be the same as in older versions of Phindows.
On Windows NT/2000/XP/Vista, Phindows will attempt to use Direct3D, falling back to DirectDraw if necessary. If both methods fail, double buffering will be disabled. On Windows 98/Me, double buffering will be disabled. On Windows Vista and Windows 7, double buffering will be disabled if Aero composition is active, otherwise the behaviour will be the same as on XP.
Direct3D will be used in all versions of Windows. If this fails, Phindows will notify the user, then fall back to using DirectDraw. If both methods fail, double buffering will be done using system memory.
Direct3D will not be initialized. Phindows will attempt to use DirectDraw. If this fails, Phindows will notify the user, and then double buffering will be done using system memory.
System Memory
Direct3D and DirectDraw will not be initialized. Double buffering will be done using regular system memory. In some cases this method can perform better than using video memory.

Windows Vista (Windows Aero) and Windows 7 make use of the Desktop Compositing Engine (DCE) to implement new transparencies, live thumbnails, and various other on-screen effects. This is achieved by having each application window drawn off-screen and then composited. With the DCE enabled, Phindows' built-in double buffering is redundant. To save video RAM and increase performance, Phindows will detect if compositing is active. If compositing is active, double buffering will not be enabled by default.

In some cases under Windows Vista or Windows 7, the DCE will not be enabled, for example if the system does not have a DirectX 9.0 (Shader Model 2.0) capable video card, or if the user (or an application) has disabled it. In those cases, Phindows will do its own double buffering by default. For more information on Aero and the DCE, refer to the Windows Vista or Windows 7 documentation.


On Linux, you can run Phindows using WINE. See for more information. In some cases, Direct3D may cause performance problems. If you encounter performance problems, you can set the Phindows double buffering method to \"system memory\" or \"disabled\".

Note: For context help on the different items in the Phindows Connect dialog, click on the ? icon in the title bar of the dialog and then click on the item you want more information on.
Note: Phindows is supported on the following versions of Windows: Windows 2000, Windows XP, Windows Vista and Windows 7. Phindows runs well on the following additional platforms but not all features may be available: WINE under Linux, Windows 98 and Windows Me.
-F cache_dir
Specify the directory that Phindows can use for its image and font caches. Phindows creates two subdirectories called cache and font. If you don't specify a cache directory, the one shown in the Phindows Connect dialog is used. (See the note below.)
-h height
Initial window height (default: 480).
-H t1[,t2[,t3]]
Specify the mouse holdoff times (default: t1=1.2*9600/baud, t2=t1/2, t3=t1/4):
  • t1 — holdoff time for normal mouse motion.
  • t2 — holdoff time when the a mouse button is pressed.
  • t3 — holdoff time when a drag cursor is being moved.
Phindows built-in help.
-I icon_file
The icon to use instead of the default icon.
-i igrp
Connect to a specific Photon input group (default: 1).
-K key
Specify a private key for data encryption. The key can be up to 31 characters. A matching key must exist in the /etc/config/phkeys file on the host machine you're connecting to, and the version of phrelay running on the host must support encryption. You can also specify a user (using the -U option) when you connect to a Photon service using the -s option. See the phrelay documentation in the Neutrino Utilities Reference for more information about the /etc/config/phkeys file, and specifying keys and users.
  • This option works on Phindows version 3.09 and greater, and phrelay running on QNX Neutrino 6.4.0 and greater. If you specify this option and attempt to connect to a version of phrelay that doesn't support encryption, the connection will fail. If phrelay does support encryption, but there's a key mismatch, Phindows displays Error: Permission problem on host.
  • If phrelay is launched with the -e option (force encryption), then a private key must be specified on the Phindows command-line, or else the connection will fail.
Start in kiosk (full-screen) mode. You can use ctrl alt k to toggle kiosk mode.
-M size
The maximum memory cache size, in kilobytes. If you don't specify a maximum memory cache size, the one shown in the Phindows Connect dialog is used. (See the note below.)
-m commport
Direct connect serial port (default: com1)
Note: Setting this option turns on RLL compression and CRC error checking by default. You can turn it off with the -o option.
-N number
Set the number of messages buffered to allow write-ahead draws to Phindows. The actual number used is the lesser of this option and the -b option of phrelay. The default value is 20. Use a lower value to save memory on the Neutrino host running phrelay at the expense of throughput, or, if memory is not an issue, a higher value to gain some additional throughput performance.

Adjusting this setting has the most effect when end-to-end response time is slow compared with throughput, such as over a modem or when there are many network hops between the local and remote ends.

-n node_or_photon_resource
Connect to an already-running Photon on the specified host, for example "/dev/photon". To get a list of available Photon sessions (if supported) use "List".
-o options
  • 0 — no compression.
  • 1 — BPE (Byte-Pair Encoding) compression.
  • 2 — RLL (Run Length Limited) compression.
  • 8 — Use CRC (Cyclic Redundancy Check) error checking.

Combine options by addition, e.g. to specify BPE and CRC, select 9. You can't have BPE and RLL compression at the same time. If you select both, only BPE compression is used.

  • If you don't specify this option, the RLL/BPE/CRC settings shown in the Phindows Connect dialog are used. (See the note below.)
  • The command-line options -t and -m turn on RLL compression by default. The -m also turns CRC error checking on. To adjust these side-effects you can use the -o option afterwards. For example, to run with no compression when specifying a TCP/IP connection from the command line, you would type: phindows -thost -o0.
-O [A|a]
Disable (A) or enable (a) Alt+Tab pass through to the remote QNX system. By default, Alt+Tab key presses are only passed through to the remote system when Phindows is in kiosk (full-screen) mode. When this option is enabled, Phindows always passes the key presses through to the remote system (unless the Phindows window doesn't have focus). When the option is disabled, the Alt+Tab key press is processed by the local Windows system.
-O [B|b]
Disable (B) or enable (b) clipboard sharing. This option is enabled by default.
-O [J|j]
Disable (J) or enable (j) antialiased fonts. This option is enabled by default.
Note: Turning off antialiased font support can improve performance over a slow communications link, at the expense of visual accuracy. Antialiased text is rendered with 8 bits per pixel instead of 1, requiring more data transfer. Using RLL or BPE compression reduces the performance impact of displaying antialiased fonts.
-O [O|o]
Disable (O) or enable (o) offscreen context support. This option is enabled by default.
-P palette_file
Use a non-default color palette file (e.g. %QNX_TARGET%\usr\photon\palette\grey.pal).
-s service
Request that this Photon service be automatically started.
-T size
The maximum disk cache size, in megabytes. If you don't specify a maximum disk cache size, the one shown in the Phindows Connect dialog is used. (See the note below.)
-t host_name [:port]
TCP/IP address (and optional port) or host name of QNX host (e.g.,, or myhost:4869).
Note: Setting this option turns on RLL compression by default. You can turn it off with the -o option.
-U userid[:password]
Initially log into this QNX userid (used with -s).
Unlocked mode (allows independent browsing of a Photon session). Phindows creates a separate input group when it connects to an existing Photon session. This allows independent interaction with the Photon session.
Increase the verbosity of Phindows status messages.
Connect in view-only mode, which disables the keyboard and mouse.
-W "Title"
Window title (default: Phindows). The title may need to be quoted, and may not contain any spaces. Underscores will be converted to spaces. Special character sequences are supported for substitution of the remote host name (%H) and the remote photon session name (%S).
-w width
Initial window width (default: 640).
-X position
Initial x position of Phindows window (default: position from previous session).
-Y position
Initial y position of Phindows window (default: position from previous session).
-x offset
Create a Photon region at this x offset (default: 0).
-y offset
Create a Photon region at this y offset (default: 0).
-z gzip_path
Compress images using gzip. Images are compressed in their entirety, unlike RLL and BPE compression which are applied at the packet-level. Over a slow connection, this can improve performance.

Both phrelay and Phindows run the gzip utility using an external call. You must ensure that the gzip utility is available at both ends:

  • On the Neutrino system, ensure that gzip is present in a directory listed in the PATH environment variable that is received by phrelay. In a typical self hosted Momentics installation, this is already the case.
  • On the Windows system, the -z option passed to Phindows must specify the full path of the gzip executable and all arguments, for example:
    -z'c:\gzip.exe -d -f'
    -z'"c:\Program Files\gzip\gzip.exe" -d -f'
    Note: You should use single quotes to allow arguments to be passed, and double quotes around the executable name if it contains embedded spaces.
Note: If you don't specify either -t or -m, Phindows displays the Connect dialog asking for communications parameters, and displays settings based on the last saved settings. When either -t or -m are specified, the Connect dialog isn't displayed, and settings are applied from the last saved session, or from defaults if there's no saved settings. Settings are saved to the phindows.ini file, whose location is shown in the About dialog.