This repository was archived by the owner on Dec 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 99
Print Server
Tres Finocchiaro edited this page Nov 25, 2015
·
15 revisions
#Print Server Configuration
##Prerequisites
- QZ Tray 1.9.5 or higher
##Objective
- Run QZ Tray as a dedicated service, useful for machines that cannot have QZ Tray installed (such as a Terminal Services/Citrix environment).
##Obstacles
-
Deploy QZ
- By default, the
deployQZ
function is bound tolocalhost
. To override this, replace all calls todeployQZ
in your code withdeployQZ("foo.bar");
, where "foo.bar" is the hostname or IP address which QZ Tray is running on.
- By default, the
-
Localhost bindings
- For secure websockets support (HTTPS), QZ Tray generates a certificate for
localhost
traffic at install time calledqz-tray.crt
. In order for QZ Tray to run on a separate machine, thehostname
(usually "localhost") must exist in the certificate. This is an override which be done by running a custom script explained below###### FIXME ######
.
- For secure websockets support (HTTPS), QZ Tray generates a certificate for
-
Certificate installation
- Certificate installation varies between browsers and platforms. Distributing a certificate marked for a custom hostname is a manual process which much be done on all workstations requiring HTTPS + QZ Tray. This is outlined further below
###### FIXME ######
.
- Certificate installation varies between browsers and platforms. Distributing a certificate marked for a custom hostname is a manual process which much be done on all workstations requiring HTTPS + QZ Tray. This is outlined further below
-
Firefox
- Firefox doesn't allow self-signed certificates to be imported directly, instead a manual import process is needed explained below
###### FIXME ######
.
- Firefox doesn't allow self-signed certificates to be imported directly, instead a manual import process is needed explained below
##Steps
- Install QZ Tray via the desktop installer
- Re-run the certificate generation (
"foo.bar"
is the hostname or IP address that QZ Tray will run on)
Note: This will re-generate the
qz-tray.properties
,qz-tray.crt
andqz-tray.jks
Note: If you require Firefox HTTPS support, Firefox needs to be installed prior to this step.
###Windows
REM Regenerate the certificate
cd "%PROGRAMFILES%\QZ Tray\"
cscript auth\windows-keygen.js . install "foo.bar"
###Linux
# Reinstall completely with specified hostname or IP address
sudo qz-tray-1.9.x.run -- -y "foo.bar"
###Apple
# Regenerate the certificate
sudo /Applications/QZ\ Tray.app/auth/apple-keygen.sh install "foo.bar"
# Optionally, regenerate the Firefox configuration files
sudo /Applications/QZ\ Tray.app/auth/firefox/firefox-cert.sh install "foo.bar"
- Copy the following files from the QZ Tray installation directory
-
qz-tray.properties
,qz-tray.crt
andqz-tray.jks
Note:* Linux stores these files in
/opt/qz-tray/
- Optionally, if Firefox support is needed, copy the following files from the Firefox installation directory:
defaults/pref/firefox-prefs.js
firefox-config.cfg
Note: If unsure of the location of these files on your system install QZ Tray on a test system and search for them by name. They are both created by QZ Tray and can safely be overwritten.
Testing ###### FIXME ######
- Copy
demo
folder from QZ Tray to a separate test PC. - Edit
sample.html
, changedeployQZ()
todeployQZ("foo.bar")
where "foo.bar" is the hostname or IP address which is running QZ Tray. - Install
qz-tray.crt
into Trusted Root Certificates (this process will vary depending on platform) - Open Google Chrome
- Right Click, Inspect Element on the sample page
- Click the Console tab
- Verify the secure websocket connection to 8181 succeeds.