I have the following situation: I have to modify a .desktop file that is into the package of an application of which I am working.
I have a strange problem that happens when I try to open the content of the file. If I click on it and then I try to click on "Open" it give me an error message that means in English: "LAUNCHER OF APPLICATIONS UNRELIABLE"
The only way to open the .desktop file is for me is to run the following shell command:
sudo gedit myApplication.desktop
Why is this so? Why does the error message appear when I try to open the .desktop file normally?
The content of the .desktop file is:
[Desktop Entry]
Icon=myApplication
Categories=Utility;
Type=Application
Exec=/usr/share/MyApplication/appl/launcher.sh
Name[en_US]=Connect Data Space
Name=My Application Name
Comment[en_US]=
Comment=
StartupNotify=true
Terminal=false
OnlyShowIn=GNOME;Unity;
StartupWMClass=MyApplication
Actions=CheckUpgrade
[Desktop Action CheckUpgrade]
Name=Verifica Aggiornamenti
Exec=java -jar /usr/share/MyApplication/appl/lib/shellExtBridge.jar -checkupgrade
OnlyShowIn=GNOME;Unity;
And now I have some doubts about it:
1) Icon: reading some documentation it seems to me that if I put an icon called myApplication.png inside the folder /usr/share/pixmaps of my package, it use this icon, is it right?
2) Exec: reading some documentation it seems to me that this field specifies the path to the file that is executed when my icon is clicked, is it right? But in this case what file is executed? /usr/share/MyApplication/appl/launcher.sh or /usr/share/MyApplication/appl/lib/shellExtBridge.jar -checkupgrade.
I think the first file is executed, but then what is the functionality of the file in the second Exec statement?
In general, what is the functionality of the .desktop file? It seems to me that it only adds my application icon to the Unity toolbar to start my application clicking on it. Is that right, or is there additional functionality of the .desktop file?