What is the benefit of launching with the CLI?
Launching the Desktop client with the CLI gives you a lot of flexibility. The CLI allows you to launch the Desktop client normally without any changes, but you can also change its behavior by utilizing specific parameters. It can facilitate and automate many tasks such as server auto-login, disabling auto-updates, creating multiple instances of the client, restricting options, and more.
Before we can launch the Desktop client with the CLI, we need to find out what version our Server application is running on. In order for everything to function properly, the Desktop client file that will be launched from the CLI needs to have the same version number as the Server application.
How to launch via CLI
For Windows:
- Open Command Prompt and enter:
"C:\Program Files\Network Optix\Nx Witness\MediaServer\build_info.txt"
- Take note of the version number which appears on the first line (e.g., 4.0.0.29785).
- [Replace the red text with your version number]
In Command Prompt enter:dir C:\* /S /B | findstr "\\4.0.0.29785$" | clip
- [Replace the red text with your clipboard contents]
The resulting directory has been automatically copied to your clipboard. Navigate to it by entering:cd PASTEHERE
- [Parameters are optional, delete it or replace the example with one from the chart below]
To launch the client enter:"HD Witness.exe" --parameter
For Linux:
- Open Terminal and enter:
cat /opt/networkoptix/mediaserver/build_info.txt
- Take note of the version number which appears on the first line (e.g., 4.0.0.29785).
- [Replace the red text with your version number]
In Terminal enter:cd "$(sudo find / -name "4.0.0.29785")"/bin
- [Parameters are optional, delete it or replace the example with one from the chart below]
To launch the client, enter:./client-bin --parameter
For macOS:
- [Parameters are optional, delete it or replace the example with one from the chart below]
To launch the client, enter:~/.local/share/Network\ Optix/client/default/<your_version_app>/Nx\ Witness.app/Contents/MacOS/Nx\ Witness --show-full-info
Command-line parameters:
Parameter | Description | Default implied value | Examples |
--no-single-application | Allows having more than one instance of the client application running. (Also disables 'Beta version' warning message.) | true | --no-single-application |
--auth | Auto-login to the target server | - | Local Account Format: --auth=http://admin:1234@192.168.1.200:7001 Cloud Account Format: --auth=http://user%40gmail.com:1234@192.168.1.200:7001 |
--screen | Open client on the target screen | - | --screen=1 |
--window-geometry | Place the client window to the target coordinates and resize it | - | --window-geometry=100,100,1024x768 |
--soft-yuv | Enables video shader software emulation mode. May cause glitches. | true | --soft-yuv |
--local-settings | Changes settings source from registry to file system (Windows only) | true | --local-settings |
--no-fullscreen | Open client in the windowed mode. May cause glitches. | true | --no-fullscreen |
--skip-media-folder-scan | Do not scan media folders. Local resources will not be displayed. | true | --skip-media-folder-scan |
--log-level | Minimal level of the log messages that should be recorded to log-file. Allowed values:
| - | --log-level=always |
--no-client-update | Disable client auto-update and update notifications. | true | --no-client-update |
--acs | ACS mode (for Paxton integrations and similar scenarios) | true | --acs |
--videowall | Start client in the master videowall mode. Must contain GUID of the existing Video Wall to work properly. Requires valid --auth key without specified credentials. | - | --videowall={72934575-ceb7-54bb-23a0-84b81cf1d3f1} |
--videowall-instance | Start client in the slave videowall mode. Must contain the GUID of the existing Video Wall Item to work properly. Requires valid--videowall key. Requires valid --auth key without specified credentials. | - | --videowall-instance={8692e6e8-ceb7-54bb-23a0-84b81cf1d3f0} |
--layout-name | Name of layout which will be opened after connection to server. | - | --layout-name="Some layout name" |
--show-full-info | Display full info on cameras instead of the minimal. | true | --show-full-info |
--no-hidpi | Disable hidpi support | true | --no-hidpi |
Examples without the Nx URL Scheme
Connect to a specific Nx Server
- Ubuntu:
./client-bin --auth=http://admin:1234@192.168.1.200:7001
- Windows:
"HD Witness.exe" --auth=http://admin:1234@192.168.1.200:7001
Open to a Specific Layout
- Ubuntu:
./client-bin --auth=http://admin:1234@192.168.1.200:7001 --layout-name="Some layout name"
- Windows;
"HD Witness.exe" --auth=http://admin:1234@192.168.1.200:7001 --layout-name="Some layout name"
Examples with the Nx URL scheme
When using the Nx URL scheme on Windows, the exact version does not need to be specified in your command. As a result, you are not required to follow the steps in How to launch via CLI and simply enter start "" before your parameter.
The examples using the Nx URL Scheme on Ubuntu still require you to follow the steps listed in How to launch via CLI.
Open Nx Client (opens the latest version, no need to specify a client version)
- Ubuntu:
./client-bin "nx-vms://nxvms.com/"
- Windows:
start "" "nx-vms://nxvms.com/"
Opens Nx Client and displays the camera at the specified point in its archive
- Ubuntu:
./client-bin "nx-vms://nxvms.com/client/systemid/view?auth=YWRtaW46cXdlYXNkMTIz&resources=ed93120e-0f50-3cdf-39c8-dd52a640688c×tamp=1520110800000"
- Windows:
start "" "nx-vms://nxvms.com/client/systemid/view?auth=YWRtaW46cXdlYXNkMTIz&resources=ed93120e-0f50-3cdf-39c8-dd52a640688c×tamp=1520110800000"
Comments
0 comments
Article is closed for comments.