macOS xdg-desktop-icon

Jim Douglas jimdouglas at mac.com
Wed Oct 24 17:40:08 UTC 2018


With Oracle inexplicably ditching javaws in Java 11, and ending public updates of Java 8 in January, end users are desperately looking for a replacement…and IcedTea-Web is really the only viable option. In my testing here, it basically works; it reliably launches our customers’ existing JNLPs, giving them a path forward. But now that we’ve established that it basically works, our customer testers are focused on fine-grained deployment details, and they care a lot about those desktop icons.

I spent days trying to build <https://icedtea.classpath.org/wiki/IcedTea-Web#Building_IcedTea-Web> IcedTea-Web in macOS, but I had to eventually give up; I couldn’t get past the errors. I’ve been doing Windows & Mac testing with a build that Laurent Bourgès kindly provided <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2018-September/040118.html> to me. Since I have no ability to edit and build IcedTea-Web, I had to take a different approach; I put together the attached Mac-specific dropin replacement for the xdg-desktop-icon script, which works reasonably well in my testing here; it parses the .desktop file and generates a minimal macOS AppBundle corresponding to the JNLP parameters. I hope someone will find it useful, or even use it as the basis for integrating macOS desktop integration directly into IcedTea-Web.

Now I’m back to the Windows 10 system, which is also not creating the desktop icon. First, I always get this flood of permissions errors launching any JNLP; I have no idea what this is trying to tell me:

Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4369\http\10.0.1.5\8888\basis\10.0.1.5-launchdock-launch.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4369\http\10.0.1.5\8888\basis\10.0.1.5-launchdock-launch.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4370\http\10.0.1.5\8888\basis\asm-6.2.1.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4370\http\10.0.1.5\8888\basis\asm-6.2.1.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4371\http\10.0.1.5\8888\basis\BBjUtil.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4371\http\10.0.1.5\8888\basis\BBjUtil.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4372\http\10.0.1.5\8888\basis\swingx-1.0.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4372\http\10.0.1.5\8888\basis\swingx-1.0.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4373\http\10.0.1.5\8888\basis\HelpAll.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4373\http\10.0.1.5\8888\basis\HelpAll.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4374\http\10.0.1.5\8888\basis\guava-24.0-jre.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4374\http\10.0.1.5\8888\basis\guava-24.0-jre.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4375\http\10.0.1.5\8888\basis\BBjBootstrap.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4375\http\10.0.1.5\8888\basis\BBjBootstrap.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4376\http\10.0.1.5\8888\basis\demoslaunchdockClientFiles.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4376\http\10.0.1.5\8888\basis\demoslaunchdockClientFiles.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4377\http\10.0.1.5\8888\basis\baristahelp.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4377\http\10.0.1.5\8888\basis\baristahelp.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4378\http\10.0.1.5\8888\basis\commons-logging-1.2.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4378\http\10.0.1.5\8888\basis\commons-logging-1.2.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4379\http\10.0.1.5\8888\basis\webstart2166.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4379\http\10.0.1.5\8888\basis\webstart2166.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4380\http\10.0.1.5\8888\basis\ExtUtil.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4380\http\10.0.1.5\8888\basis\ExtUtil.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4381\http\10.0.1.5\8888\basis\asm-commons-6.2.1.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4381\http\10.0.1.5\8888\basis\asm-commons-6.2.1.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4382\http\10.0.1.5\8888\basis\asm-tree-6.2.1.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4382\http\10.0.1.5\8888\basis\asm-tree-6.2.1.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4383\http\10.0.1.5\8888\basis\cglib-3.2.6.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4383\http\10.0.1.5\8888\basis\cglib-3.2.6.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4384\http\10.0.1.5\8888\basis\JnlpIndex.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4384\http\10.0.1.5\8888\basis\JnlpIndex.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4385\http\10.0.1.5\8888\basis\asm-util-6.2.1.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4385\http\10.0.1.5\8888\basis\asm-util-6.2.1.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4386\http\10.0.1.5\8888\basis\JnlpExtIndex.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4386\http\10.0.1.5\8888\basis\JnlpExtIndex.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4387\http\10.0.1.5\8888\basis\BBjThinClient.jar.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4387\http\10.0.1.5\8888\basis\BBjThinClient.jar.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4388\http\10.0.1.5\8888\basis\baristahelp.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4388\http\10.0.1.5\8888\basis\baristahelp.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4389\http\10.0.1.5\8888\basis\10.0.1.5-launchdock-launch.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4389\http\10.0.1.5\8888\basis\10.0.1.5-launchdock-launch.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4390\http\10.0.1.5\8888\basis\BBjThinClient.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4390\http\10.0.1.5\8888\basis\BBjThinClient.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4391\http\10.0.1.5\8888\basis\asm-util-6.2.1.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4391\http\10.0.1.5\8888\basis\asm-util-6.2.1.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4392\http\10.0.1.5\8888\basis\commons-logging-1.2.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4392\http\10.0.1.5\8888\basis\commons-logging-1.2.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4393\http\10.0.1.5\8888\basis\demoslaunchdockClientFiles.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4393\http\10.0.1.5\8888\basis\demoslaunchdockClientFiles.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4394\http\10.0.1.5\8888\basis\cglib-3.2.6.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4394\http\10.0.1.5\8888\basis\cglib-3.2.6.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4395\http\10.0.1.5\8888\basis\guava-24.0-jre.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4395\http\10.0.1.5\8888\basis\guava-24.0-jre.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4396\http\10.0.1.5\8888\basis\ExtUtil.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4396\http\10.0.1.5\8888\basis\ExtUtil.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4397\http\10.0.1.5\8888\basis\JnlpIndex.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4397\http\10.0.1.5\8888\basis\JnlpIndex.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4398\http\10.0.1.5\8888\basis\asm-tree-6.2.1.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4398\http\10.0.1.5\8888\basis\asm-tree-6.2.1.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4399\http\10.0.1.5\8888\basis\BBjBootstrap.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4399\http\10.0.1.5\8888\basis\BBjBootstrap.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4400\http\10.0.1.5\8888\basis\HelpAll.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4400\http\10.0.1.5\8888\basis\HelpAll.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4401\http\10.0.1.5\8888\basis\swingx-1.0.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4401\http\10.0.1.5\8888\basis\swingx-1.0.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4402\http\10.0.1.5\8888\basis\BBjUtil.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4402\http\10.0.1.5\8888\basis\BBjUtil.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4403\http\10.0.1.5\8888\basis\asm-6.2.1.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4403\http\10.0.1.5\8888\basis\asm-6.2.1.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4404\http\10.0.1.5\8888\basis\asm-commons-6.2.1.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4404\http\10.0.1.5\8888\basis\asm-commons-6.2.1.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4405\http\10.0.1.5\8888\basis\JnlpExtIndex.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4405\http\10.0.1.5\8888\basis\JnlpExtIndex.jar.pack.gz.pack.gz.info.temp failed
Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4406\http\10.0.1.5\8888\basis\webstart2166.jar.pack.gz.pack.gz.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4406\http\10.0.1.5\8888\basis\webstart2166.jar.pack.gz.pack.gz.info.temp failed

…then it fails to create the desktop icon, with a not very helpful stack trace:

Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\4407\http\10.0.1.5\8888\basis\clouds\images\Demos.png.info.temp failed
Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\4407\http\10.0.1.5\8888\basis\clouds\images\Demos.png.info.temp failed
java.io.IOException: Cant create file C:\Users\Jim\.cache\icedtea-web\tmp\LaunchDock from launchdock.jnlp.desktop.temp
	at java.desktop/net.sourceforge.jnlp.util.FileUtils.createRestrictedFile(FileUtils.java:238)
	at java.desktop/net.sourceforge.jnlp.util.FileUtils.createRestrictedFile(FileUtils.java:164)
	at java.desktop/net.sourceforge.jnlp.util.XDesktopEntry.installDesktopLauncher(XDesktopEntry.java:361)
	at java.desktop/net.sourceforge.jnlp.util.XDesktopEntry.createDesktopShortcuts(XDesktopEntry.java:315)
	at java.desktop/net.sourceforge.jnlp.runtime.ApplicationInstance.addMenuAndDesktopEntries(ApplicationInstance.java:189)
	at java.desktop/net.sourceforge.jnlp.runtime.ApplicationInstance.initialize(ApplicationInstance.java:145)
	at java.desktop/net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:530)
	at java.desktop/net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:943)

Do we expect IcedTea-Web to be creating desktop icons on Windows? Is there anything I can do to get it working?



> On Oct 16, 2018, at 12:33 AM, Jiri Vanek <jvanek at redhat.com> wrote:
> 
> On 10/15/18 7:51 PM, Jim Douglas wrote:
>> Is anyone else testing Icedtea-Web on macOS? In my testing, it doesn’t install a desktop icon
> 
> Until recently, there was no usage of ITW on mac. It was know to "somehow work".  No mac-interested
> developer ever worked on ITW. I personally do not have any mac knowledge, nor do I have any mac
> around to test.
>> because it apparently assumes that the Linux-centric xdg-desktop-icon utility is installed, but that
>> utility does not seem to work with macOS.
> 
> Many parts, especially desktop integration needs if(mac)  .. elseif(win) .. else {}... But only few
> have actually did at least if(win).
> 
> If you have some knowledge abot mac desktop integration, please, contribute.
> 
> The exception below should not be a show stopper. If it is, you can disable desktop integration -
> "never create".
> 
> J.
>> 
>> https://www.freedesktop.org/wiki/Software/xdg-utils/
>> 
>>> On Sep 11, 2018, at 2:08 PM, Jim Douglas <jimdouglas at mac.com> wrote:
>>> 
>>> This doesn’t seem to be fatal, but it probably shouldn’t assume that xdg-desktop-icon exists in macOS:
>>> 
>>> You are trying to get resource http://localhost:8888/favicon.ico but it is not in cache and could
>>> not be downloaded. Attempting to continue, but you may expect failure
>>> java.io.IOException: Cannot run program "xdg-desktop-icon": error=2, No such file or directory
>>> at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
>>> at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
>>> at java.desktop/net.sourceforge.jnlp.util.XDesktopEntry.installDesktopLauncher(XDesktopEntry.java:385)
>>> at java.desktop/net.sourceforge.jnlp.util.XDesktopEntry.createDesktopShortcuts(XDesktopEntry.java:315)
>>> at
>>> java.desktop/net.sourceforge.jnlp.runtime.ApplicationInstance.addMenuAndDesktopEntries(ApplicationInstance.java:189)
>>> at
>>> java.desktop/net.sourceforge.jnlp.runtime.ApplicationInstance.initialize(ApplicationInstance.java:145)
>>> at java.desktop/net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:530)
>>> at java.desktop/net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:943)
>>> Caused by: java.io.IOException: error=2, No such file or directory
>>> at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
>>> at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:339)
>>> at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:270)
>>> at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
>>> ... 7 more
>>> 
>> 
> 
> 
> -- 
> Jiri Vanek
> Senior QE engineer, OpenJDK QE lead, Mgr.
> Red Hat Czech
> jvanek at redhat.com <mailto:jvanek at redhat.com>    M: +420775390109 <tel:+420775390109>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20181024/dc2d1d86/attachment-0002.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xdg-desktop-icon.mac.txt
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20181024/dc2d1d86/xdg-desktop-icon.mac-0001.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20181024/dc2d1d86/attachment-0003.html>


More information about the distro-pkg-dev mailing list