Closed tresf closed 8 years ago
Initial support added via 66185b2, 4c40812 (Windows only). Linux and Mac will require some more research.
@klabarge if you're interested in researching the Linux side of things, please do and post your findings here.
Apple support added via b57c573f.
Linux support added via 5eb78bf which closes this issue out.
@lite1979 @klabarge can you test this out? The easiest way is to add this to an HTML file:
<a href="qz:launch">Launch QZ Tray</a>
I compiled and installed the latest version on Ubuntu 14.04
I added the line:
<a href="qz:launch">Launch QZ Tray</a>
to sample.html
to create a link.
When clicking the link in Chrome, the following dialogue appears:
When clicking "Launch Application," another instance of Chrome is launched. QZ Tray is not launched.
Doing this in Firefox results in the following:
Thanks Kyle. Can you try the following command please?
xdg-mime default qz-tray.desktop x-scheme-handler/qz
This will only affect the current logged in user but was the first approach I had tried.
Actually Kyle... instead can you try to run this command interactively, perhaps there's a bug with the way I'm calling it in our install script...
sudo update-desktop-database
I first ran: sudo update-desktop-database
and tried launching QZ Tray from both Chrome and Firefox.
I then ran xdg-mime default qz-tray.desktop x-scheme-handler/qz
Chrome works fine for me on both 14.04 and 12.04 so as long as I use that sudo update-desktop-database
after install. I'm still perplexed as to why it needs to be run again...
In regards to it not launching for you in Chrome, try launching Google Chrome from command line via google-chrome
and see if the error console says anything about why it won't launch.
Testing results (I will update this post for other distros):
Ubuntu 12.04 x64
Launcher | Version | Test Results |
---|---|---|
chromium-browser |
37 | :white_check_mark: Pass |
google-chrome |
46 | :white_check_mark: Pass |
xdg-open |
1.0.2 | :white_check_mark: Pass |
firefox |
23 | :no_entry: Fail |
firefox |
42 | :white_check_mark: Pass |
Ubuntu 14.04 x64
Launcher | Version | Test Results |
---|---|---|
chromium-browser |
37 | :no_entry: Fail |
google-chrome |
46 | :no_entry: Fail |
xdg-open |
1.0.2 | :no_entry: Fail |
firefox |
34 | :no_entry: Fail |
firefox |
42 | :no_entry: Fail |
sudo update-desktop-database
is run manually after install. This shouldn't be needed. What is special about Ubuntu 14.04?Ubuntu 14.04 fixed via ba51664.
This seems to be broken for Firefox on OSX. Reopening.
Some more details about Firefox 43 + OS X 10.7:
Edit: Upstream bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=718422
Although Chrome and Safari work, Firefox seems to be pickier.
<a href="javascript:window.location("qz:launch");">...
and <a href="qz:launch">
differs in Firefox on Mac which means we may need to change the code in sample.html
to accommodate.If the following keys are added to about:config
(Firefox on Mac), it shows the launch dialog, but doesn't have QZ Tray auto-filled as the application to launch.
# Boolean
network.protocol-handler.expose.qz=false
network.protocol-handler.external.qz=true
# String
network.protocol-handler.app.qz=/Applications/QZ Tray.app
I've reached out to Mike Kaply for assistance. Perhaps he knows a trick to get this working. Note, this problem doesn't occur with mailto:
links, which is what I used for my baseline when testing.
Edit: Update, this seems to remedy the problem... I've no idea how to automate this though.
Firefox/Profiles/<current profile>.default/mimeTypes.rdf
Add the following lines:
<RDF:Description RDF:about="urn:scheme:handler:qz" NC:useSystemDefault="true" NC:alwaysAsk="false"/>
<RDF:Description RDF:about="urn:scheme:qz" NC:value="qz">
<NC:handlerProp RDF:resource="urn:scheme:handler:qz"/>
</RDF:Description>
<!-- FIND
<RDF:Seq RDF:about="urn:schemes:root">
<RDF:li RDF:resource="urn:scheme:webcal"/>
<RDF:li RDF:resource="urn:scheme:ircs"/>
<RDF:li RDF:resource="urn:scheme:mailto"/>
<RDF:li RDF:resource="urn:scheme:irc"/>
APPEND -->
<RDF:li RDF:resource="urn:scheme:qz" />
<!--
</RDF:Seq> -->
I think I figured out a fix. Ready to test via dd5956e.
Works so as long as preference network.protocol-handler.expose.qz
is set to false
, but only for physical qz:launch
links, not for window.location.assign("qz:launch");
(how we recommend launching it).
Mike's offered to write a protocol handler... I think this is quite overkill, but I don't think we have an option at this point if we want our "Launch QZ Tray" button to work.
A placeholder to add a mimetype/URI launcher for the web browsers which allows QZ Tray to be launched by URL, i.e.
I think this is doable at install time via a URL like