qzind / qz-print

Archive for legacy qz-print versions (1.8, 1.9). See https://github.com/qzind/tray for modern versions.
Other
141 stars 101 forks source link

Couldn't start QZ-tray on Freya 0.3.1. #89

Closed feryardiant closed 9 years ago

feryardiant commented 9 years ago

Just successfuly installed QZ-Tray on Elementary-OS Freya 0.3.1 but it couldn't start and when I try to start from Terminal, I got this:

sudo java -jar /opt/qz-tray/qz-tray.jar 
Sep 13, 2015 3:28:56 AM qz.common.TrayManager addLogHandler
WARNING: Could not write to log file debug.  Log history be limited to the console only.
java.nio.file.NoSuchFileException: /root/.qz/debug0.log.lck
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
    at java.nio.channels.FileChannel.open(FileChannel.java:287)
    at java.nio.channels.FileChannel.open(FileChannel.java:335)
    at java.util.logging.FileHandler.openFiles(FileHandler.java:459)
    at java.util.logging.FileHandler.<init>(FileHandler.java:402)
    at qz.common.TrayManager.createLogHandler(Unknown Source)
    at qz.common.TrayManager.addLogHandler(Unknown Source)
    at qz.common.TrayManager.<init>(Unknown Source)
    at qz.ws.PrintWebSocketServer.<clinit>(Unknown Source)

Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.UnsupportedOperationException
    at java.awt.TrayIcon.<init>(TrayIcon.java:144)
    at java.awt.TrayIcon.<init>(TrayIcon.java:168)
    at qz.ui.PopupTray.createTrayIcon(Unknown Source)
    at qz.ui.PopupTray.<init>(Unknown Source)
    at qz.ui.AutoHidePopupTray.<init>(Unknown Source)
    at qz.common.TrayManager.<init>(Unknown Source)
    at qz.ws.PrintWebSocketServer.<clinit>(Unknown Source)

I'm using Oracle Java 1.8.0-60

java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

any thoughts?? Best regards

feryardiant commented 9 years ago

Is it related to #38 (I guess)

tresf commented 9 years ago

This may be due to the tray icon not being supported on your platform. We've offered support for this with the 1.9.4 release, which we expect to have ready in a day or so although you are free to compile yourself via

https://github.com/qzind/qz-print/wiki/Compiling

feryardiant commented 9 years ago

Hi @tresf

Looking forward till it's officialy ready :grin:

klabarge commented 9 years ago

QZ Tray 1.9.4 still fails to start in Elementary-OS Freya 0.3.1

tresf commented 9 years ago

Install log?

tresf commented 9 years ago

FYI - http://elementaryos.stackexchange.com/questions/1706/system-tray-icons-for-java-and-nodewebkit-applications

tresf commented 9 years ago

@Vzor- can we write a wrapper which simulates the tray through a JFrame when not available?

klabarge commented 9 years ago

In 1.9.4 my console output is different, so I will post it.

Note that I have to CTRL+C out of this.

kyle@ElementrayOS-Freya:~/Downloads$ sudo java -jar /opt/qz-tray/qz-tray.jar
Sep 18, 2015 12:11:37 AM qz.ui.PopupTray getSystemTray
SEVERE: System tray is not supported on this platform
Sep 18, 2015 12:11:38 AM qz.ui.PopupTray getSystemTray
SEVERE: System tray is not supported on this platform
Sep 18, 2015 12:11:39 AM qz.utils.ShellUtilities execute
INFO: Executing: [uname, -a]
Sep 18, 2015 12:11:39 AM qz.utils.ShellUtilities execute
INFO: Executing: [gconftool-2, --get, /desktop/gnome/shell/windows/theme]
Sep 18, 2015 12:11:39 AM qz.utils.ShellUtilities execute
INFO: Executing: [grep, dark_bg_color, /usr/share/themes/Ambiance/gtk-3.0/gtk.css]
Sep 18, 2015 12:11:39 AM qz.utils.ShellUtilities execute
INFO: Executing: [grep, dark_bg_color, /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css]
Sep 18, 2015 12:11:40 AM qz.deploy.DeployUtilities loadSSLProperties
INFO: SSL properties file from /opt/qz-tray/qz-tray.properties
Sep 18, 2015 12:11:40 AM qz.utils.ShellUtilities execute
INFO: Executing: [certutil, -d, sql:/home/kyle/.pki/nssdb, -A, -t, TC, -n, QZ Industries, LLC, -i, /opt/qz-tray/auth/qz-tray.crt]
Sep 18, 2015 12:11:42 AM qz.auth.CRL$1 run
INFO: Loading CRL https://crl.qz.io...
Sep 18, 2015 12:11:43 AM qz.deploy.DeployUtilities loadSSLProperties
INFO: SSL properties file from /opt/qz-tray/qz-tray.properties
2015-09-18 00:11:44.201:INFO::main: Logging initialized @10276ms
2015-09-18 00:11:45.334:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT
2015-09-18 00:11:45.819:INFO:oejs.ServerConnector:main: Started ServerConnector@726ef1fb{HTTP/1.1}{0.0.0.0:8182}
2015-09-18 00:11:46.510:INFO:oejs.ServerConnector:main: Started ServerConnector@11a190e1{SSL-HTTP/1.1}{localhost:8181}
2015-09-18 00:11:46.511:INFO:oejs.Server:main: Started @12634ms
Sep 18, 2015 12:11:46 AM qz.common.TrayManager$16 run
INFO: Tray Message: Server started on port(s) 8182, 8181
Sep 18, 2015 12:11:46 AM qz.ws.PrintWebSocketServer runServer
INFO: Server started on port(s) 8182, 8181
Sep 18, 2015 12:11:48 AM qz.auth.CRL$1 run
INFO: Successfully loaded 1 CRL entries from https://crl.qz.io
tresf commented 9 years ago

Well, that's better than @feryardiant's UnsupportedOperationException. It is certainly starting and running. Perhaps the dialogs aren't showing, but we tackled that scenario with kiosk mode via #60, so this should work.

klabarge commented 9 years ago

Sorry for the false information. I restarted my VM, launched QZ Tray from the console, and I was able to successfully load the demo page (https://demo.qz.io) using Chrome.

tresf commented 9 years ago

Thanks. Please post a screenshot. Closing as duplicate of #60.

klabarge commented 9 years ago

Initial prompt on Chrome:

image

Successful page load of QZ Tray 1.9.4

image

tresf commented 9 years ago

:+1:

feryardiant commented 9 years ago

+1

Best, Fery.