JDK-6957030 : desktop shortcut is created without executable bit in Ubuntu 10.4
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux_ubuntu
  • CPU: x86
  • Submitted: 2010-05-28
  • Updated: 2013-11-12
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b130Fixed
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
Linux port-vendedor-1 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

ADDITIONAL OS VERSION INFORMATION :
Ubuntu 10.4 Desktop Edition
Linux port-vendedor-1 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
Ubuntu, Gnome 2.30

A DESCRIPTION OF THE PROBLEM :
When a Java Web Start application is launched and a desktop shortcut is created, the shortcut doesn't show the correct icon and it doesn't work. When it is executed it fails with an error saying that it is unsafe to execute that file. The only option in the error message is "Cancel". The only way to execute the shortcut is to manually open the file's permissions properties page and turn on the executable bit (or do so through the terminal). After that, the correct icon appears and the link works as expected.

I don't know how many Gnome-based systems are affected by this problem, I only had this one to test.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install Ubuntu 10.4 Desktop Edition
Configure any internet connection
Install sun-java6-jre
Launch a Java Web Start application that creates a desktop shortcut
(I recomend the BasicServiceDemo at http://pscode.org/jws/api.html#bs)

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
A fully functional desktop shortcut with the correct icon
ACTUAL -
A non-functional desktop shortcut without the correct icon

ERROR MESSAGES/STACK TRACES THAT OCCUR :
I'm really sorry but the system where I detected this issue is in Portuguese language and I was unable to test this in an English language system before this report so the erros messages I've written are translations that may not return the relevant results in search engines.

Error when attempting to execute the shortcut: "The shortcut "[name_of_file]" has not been marked as trusted. If you don't know the origin of this file, executing it may be unsafe."

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
The only workarounds I can think of need to be done in the client system. Either go to the shortcut properties, then to the permissions tab and turn on the permission to execute the file, or execute the command "chmod a+x" in the terminal.

Comments
EVALUATION the files are created in GnomeVfsWrapper.c, but using the permissions DEF_FIL_PERM: #define DEF_FIL_PERM S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH so this can likely be fixed by changing this to: #define DEF_FIL_PERM S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IROTH (ie: change from 644 to 744)
2011-01-27