Revision [5916]

This is an old revision of SoftwarePackageCreation made by coolpup on 2010-02-28 13:18:44.

 

For the creation of software packages which require a menu entry perform the following:


The rest of this page explains how to create a .desktop file:

The entries in the file are {key,value} pairs in the format: Key=Value

Keys are either optional or required. The first three {key,value} pairs from the template are required; and the last two are optional but required for a menu icon to appear.

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.

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.]


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=word processor
Icon=abiword24.png
Categories=WordProcessor


Appendix

All Puppy packagers are encouraged to use this template for the sake of standardization. It adheres to the latest freedesktop specification.

[Desktop Entry]
Type=Application
Name=
Exec=
Comment=
Icon=
Categories=


Other optional keys are available which are seldom used:
#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]=




Categories
CategoryHowTo
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki