|Q112298: HOWTO: Create Desktop Shortcuts On the Solaris Java Desktop|
|Retired InstallAnywhere Versions|
This article applies to InstallShield Multiplatform 11.5.
With the release of Solaris 10, Sun included the ability for users to choose between two desktops. The first is the original Common Desktop Environment, or CDE, and the second a new Desktop called the Java Desktop System. This desktop is based on the Gnome desktop. Because the Java Desktop is based on the Gnome desktop, it does not recognize shortcuts installed using InstallShield as they are installed where the CDE Desktop expects them. This article explains how to configure your installer to install shortcuts on the Java Desktop System.
In order for a shortcut to be displayed on the Java Desktop System, you need to create a text file in the directory /usr/share/applications with the name of your shortcut with a .desktop extension like: MyShortcut.desktop. Its contents should be similar to the following:
[Desktop Entry] Encoding=UTF-8 Name=MySwingSetLauncher Comment=This is the launcher for SwingSet Exec=/opt/AShortTest/SwingSet.bin Terminal=false Icon=/opt/AShortTest/Ant.xpm Type=Application Categories=Application;Development;
Name is the name of your shortcut. The Exec property specifies the executable file the shortcut should invoke. The Icon property specifies the location of the icon you want displayed for your shortcut.
for the Categories property causes the shortcut to be created in the Applications > Programming menu on the Java Desktop. You can easily create this text file using an ASCII File Update action in your installer. Insert the ASCII File Update Action after the Shortcut Action that you are using to create the Shortcut on CDE. You can then set the ASCII File Updates properties like the following, where bean2 is the BeanID of the Shortcut Action prior to this action and bean3 is the BeanID of the Launcher installed previously to be targeted:
ASCII File = /usr/share/applications/$P(bean2.name).desktop Reboot Required = False Backup ASCII File = False Overwrite Existing File = False Delete File on Uninstall = True Enable on Reinstall = True
Then, set its Install Action as Add Text and set this up like:
Add Option: Text Text Lines: [Desktop Entry] Encoding=UTF-8 Name=$P(bean2.name) Comment=This is the launcher for SwingSet Exec=$P(bean3.installedFileName) Terminal=false Icon=$P(absoluteInstallLocation)/Ant.xpm Type=Application Categories=Application;Development; Location: Start of File
In order to successfully create the Shortcut, end users will have to install as root or have permissions to write to /usr/share/applications.
For more information on the Sun Java Desktop System, see the homepage.
|Last Modified Date: 05-07-2012ID: Q112298|