Headless - sdon2/thermal-printer-tray GitHub Wiki
Compatibility
- :white_check_mark: 2.1 | :no_entry: 2.0 | :no_entry: 1.9 | ...
Objective
- Run QZ Tray in a headless environment
- See also windows-service
Prerequisites
-
A Certificate (
digital-certificate.txtif generated from our portal)Note: Step 2 of the signing messages tutorial needs to be completed in order to establish a websocket connection
Steps
-
Whitelist the certificate
The first step is to whitelist the Certificate your signatures will be authenticating against. You can launch the software prior to this, but you will not be able to make a websocket connection, as there is no GUI for the warning dialogues to display in, causing an immediate disconnect.
-
Open a terminal or
cmdprompt and execute the appropriate command for your OS:Note: the
--whitelistflag can be substituted withed--allowor-aOS Command Windows java -jar "%PROGRAMFILES%\QZ Tray\qz-tray.jar" --whitelist "path\to\digital-certificate.txt"... and optionallycopy "%appdata%\qz\allowed.dat" "%programdata%\qz\allowed.dat"see also#749.Linux java -jar /opt/qz-tray/qz-tray.jar --whitelist "path/to/digital-certificate.txt"macOS java -jar /Applications/QZ\ Tray.app/qz-tray.jar --whitelist "path/to/digital-certificate.txt" -
Verify the entry
Successfully added YOUR COMPANY to allowed listin the log displayed in the command prompt -
An
allowed.datfile is created with the finger print of the Intermediate Certificate (digital-certificate.txt).OS Location Windows %APPDATA%\qz\allowed.datLinux ~/.qz/allowed.datmacOS ~/Library/Application\ Support/qz/allowed.dat
-
-
Launch QZ Tray in headless mode
-
Run the software from the command line using the
--headlessor-hflag:OS Command Windows java -Xms512m -jar "%PROGRAMFILES%\QZ Tray\qz-tray.jar" --headlessLinux java -Xms512m -jar /opt/qz-tray/qz-tray.jar --headlessmacOS java -Xms512m -jar /Applications/QZ\ Tray.app/qz-tray.jar --headless
-