Revision [371]
This is an old revision of SoftwarePackageCreation made by coolpup on 2009-08-09 02:25:25.
- Create a *.desktop file so that the menu will show an entry for that software application.
The rest of this page explains how to create a .desktop file.
*.desktop File
Please use this template for the *.desktop file.It adheres to the latest freedesktop specification.
It is also displayed in the Appendix below.
Once the file is created it needs to be located in this directory:
/usr/share/applications
The entries in the file are {key,value} pairs in the format:
Key=Value
Note that the "Encoding" key is deprecated, i.e. obsolete and no longer recognized. Any keys not found in the latest freedesktop specification are not recognized.
Keys are either optional or required. That is why the {key,value} pairs have been ordered into 3 groups. The first is required and the rest are optional. The second group will be often used, and the third is used under rare and special circumstances.
Menu and Desktop Icons
With regards to PET package creation where should the menu icon files be placed and what size should they be (16x16, 24x24, or 48x48)?There are necessarily different standard locations for different types of icons.
/usr/local/libs/X11/mini-icons is for all of the sub-menu icons and the preferred size is 24x24 although most of the legacy icons are 16x16. These smaller versions will eventually be weeded out as resolutions increase and applications are updated. They were a legacy of early versions of JWM which did n0t support larger menu icons.
/usr/local/libs/X11/pixmaps is only for the desktop icons that are part of the packaged desktop themes and their associated icons for the 1st level menus. For desktop icons the preferred size is 48x48. For 1st level menu icons the preferred size is 24x24. We also need to standardise on a given set of icons that constitutes a desktop theme. Some themes call icons by one name, others by another. That causes many problems. We are keen to ensure that /usr/local/libs/X11/pixmaps is kept exclusively for those icons that are used in the pinboard and 1st level menus. That is because that is what Barry's desktop icon switcher uses. We insist that only desktop theme icons go in /usr/local/lib/X11/pixmaps where they are regularly overwritten by themes from the /usr/local/libs/X11/themes directories.
Legacy locations from other Linux distributions (Debian, Red Hat, etc.) [We would like to be able to do away with them but the first converted .DEB or .RPM application that installs will place its own icons in there anyway.]
- /usr/share/icons is for application icons installed from 3rd party pet files and called from /usr/share/applicationsusr/share/pixmaps is for application icons installed from 3rd party PET files and called from /usr/share/applications/*.desktop files
The preferred format for all icons, regardless of their purpose, is XPM format. Failing that, PNG is to be preferred. Renaming PNG files with an XPM extension maintains some consistency of naming, if not underlying format.
The PET software package should contain not one but two icons:
- one of 24x24 for the sub-menu (placed in /usr/local/lib/X11/mini-icons) and called into the menu from the associated /usr/share/applications/*.desktop file
- one of 48x48 for use with a desktop shortcut if the user creates one; the latter icon should be placed in either /usr/share/pixmaps or /usr/share/icons - /usr/share/pixmaps is preferred
Therefore the abiword.desktop file would consist of:
Desktop Entry] Type=Application Name=AbiWord word processor Exec=abiword Comment=AbiWord word processor Icon=/usr/local/lib/X11/mini-icons/abiword24.png Categories=WordProcessor
Appendix
All Puppy packagers are encouraged to use this template for the sake of standardization[Desktop Entry] Type=Application Name= Exec= Comment= Icon=/usr/local/lib/X11/mini-icons/iconfilename24.png Categories=
Other optional keys are available which are seldom used:
[Desktop Entry] Type=Application Name= Exec= Comment= Icon=/usr/local/lib/X11/mini-icons/iconfilename24.png Categories= #Terminal=true #MimeType= #GenericName= #NoDisplay= #Hidden= #OnlyShowIn= #NotShowIn= #TryExec= #Path= #StartupNotify=true #StartupWMClass= #Name[az]= #Name[bg]= #Name[ca]= #Name[cs]= #Name[de]= #Name[dz]= #Name[el]= #Name[en_CA]= #Name[en_GB]= #Name[es]= #Name[et]= #Name[fi]= #Name[fr]= #Name[ga]= #Name[he]= #Name[hr]= #Name[hu]= #Name[it]= #Name[ja]= #Name[ko]= #Name[lt]= #Name[lv]= #Name[mk]= #Name[ml]= #Name[mr]= #Name[ms]= #Name[nb]= #Name[ne]= #Name[nl]= #Name[nn]= #Name[pl]= #Name[pt]= #Name[pt_BR]= #Name[ru]= #Name[sk]= #Name[sr]= #Name[sr@Latn]= #Name[sv]= #Name[te]= #Name[tr]= #Name[uk]= #Name[vi]= #Name[zh_CN]= #Name[zh_TW]=