Since version 6.10.12, the NoMachine client is able to read extra options from a file named 'options' and append them to the normal session options, in order to override default values.
The options file can be useful to customize some default behaviours or even to change options not accessible through the graphical user interface or the .nxs and .cfg files. This is the case of the client timeout which defines how long it has to wait before disconnecting and auto-reconnecting in case of network unstability (see example below). Usage of the options file can be extended to cover other cases according to new users' needs.
To use the 'options' file place it in the path suitable for your needs, as eplained below.
Path to apply extra options to all users:
Windows: C:Program Files (x86)NoMachineshare
Path to apply extra options to a specific user, overriding the system-wide extra options liste above:
Linux and macOS: $HOME/.nx
The options file must contain a comma separated list of 'key=value' attributes and will be validated by the client.
A practical example - How to tune client behaviour in case of brief network disconnections
Brief network disconnections can lead to the disconnection and auto-reconnection of NoMachine sessions. it's possible to increase the timeout of the client to force it waiting for a certain amount of seconds before disconnecting. Default timeout is 30 seconds.
When the connection layer stops receiving data from remote and the link doesn't get interrupted by an error, the client enters a standby state
(users will see the spinning wheel in desktop sessions) and keeps waiting for the amount of seconds set in the 'timeout' parameter.
If this timeout expires and no data is received, the client disconnects and starts the automatic reconnection procedure. Raising the timeout doesn't have drawbacks.
To do that:
1) Create a file named 'options' and place it on the end-user's computer: in the .nx folder in the user's home or in the 'share' folder under NoMachine's installation path if the client will be used by more than one user. The options file must be readable by all users who need to use it.
2) In the 'options' file add the following text:
where 'n' is the amount of seconds that the client will have wait before disconnecting.