For a broader explanation and more scope beyond your query covering the background of what, why and how then look here:
http://standards.freedesktop.org/des...y-spec/latest/
If you want to add system-wide for all users then you must make a desktop entry file in:
Code:
/usr/share/applications/
Look at Thunar.desktop as an example:
Note, i have deleted other languages except for generic and en_GB (English, Great Britain)
Code:
david@slackware13:/usr/share/applications$ cat Thunar.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Thunar File Manager
Name[en_GB]=Thunar File Manager
Comment[en_GB]=Browse the filesystem with the file manager
GenericName=File Manager
GenericName[en_GB]=File Manager
Exec=Thunar %F
Icon=Thunar
Terminal=false
StartupNotify=true
Type=Application
Categories=Application;System;Utility;Core;GTK;FileManager;
As an example, as root:
Code:
cd /usr/share/applications
cp Thunar.desktop my_app.desktop
and then edit the parameters/options/paths/executable command of (my_app.desktop) so it is matching/pointing/personalised to your executable program/script/binary etc