https://wiki.archlinux.org/api.php?action=feedcontributions&user=G+Syme&feedformat=atomArchWiki - User contributions [en]2024-03-19T02:12:48ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Bug_Day/2010&diff=64776Bug Day/20102009-03-10T16:17:47Z<p>G Syme: /* Website */ Added FS #12237</p>
<hr />
<div>This is a categorized list of some old reports.<br />
<br />
'''Please use the bug title for the links' names. That way we don't need to click on the link to know what a bug is about'''<br />
<br />
'''If you have fixed some bug - enclosure it with <nowiki><s></s></nowiki> tags.'''<br />
<br />
= Installer =<br />
* <s>[http://bugs.archlinux.org/task/10754 BR #10754]</s><br />
* [http://bugs.archlinux.org/task/10831 FR #10831 - 2008.06-USB boot parameter to specify root directory ]<br />
<br />
= System =<br />
[http://bugs.archlinux.org/task/13106?.# FS 13106] This bug still persists.<br />
<br />
= Packages =<br />
* [http://bugs.archlinux.org/task/9971 BR #9971] - licenses missing in many packages! There are plans to fix them regardless of bug day: http://www.archlinux.org/pipermail/arch-dev-public/2009-February/010403.html<br />
<br />
==== decision? ====<br />
* [http://bugs.archlinux.org/task/4957 FR #4957 - Improve autofs default config ]<br />
* [http://bugs.archlinux.org/task/5078 BR #5078 - mcedit broken ]<br />
* [http://bugs.archlinux.org/task/7001 FR #7001 - Move amrnb and amrwb packages to [extra] ]<br />
* [http://bugs.archlinux.org/task/12314 FR #12314 - Change distribution logging system to rsyslog ]<br />
* [http://bugs.archlinux.org/task/12764 FR #12764 - Deluge should depends on libtorrent-rasterbar ]<br />
<br />
==== status? ====<br />
* [http://bugs.archlinux.org/task/6047 FR #6047 - provide more aspell-* packages ]<br />
* [http://bugs.archlinux.org/task/7549 FR #7549 - Default mount option for vfat media disk ]<br />
* [http://bugs.archlinux.org/task/7764 BR #7764 - namcap wrongly complains about missing dependencies ]<br />
<br />
==== trivial fixes ====<br />
* [http://bugs.archlinux.org/task/4812 BR #4812 - mailx should require an smtp-forwarder or server ]<br />
* <s>[http://bugs.archlinux.org/task/8334 BR #8334] - fix provided</s><br />
* [http://bugs.archlinux.org/task/8660 BR #8660 - ypbind-mt daemon script fails to set default domain name ] - fix provided<br />
* [http://bugs.archlinux.org/task/10208 FR #10208 - bash_completion for subversion ]<br />
* [http://bugs.archlinux.org/task/10383 FR #10383 - id3v2 has no documentation! ]<br />
* [http://bugs.archlinux.org/task/11250 FR #11250 - avahi need dbus-python as dependency ]<br />
* [http://bugs.archlinux.org/task/11436 FS #11436 - eclipse 3.4-3 no icon in menu ] - (description how to) fix provided<br />
* [http://bugs.archlinux.org/task/13376 FR #13376 - Logitech QuickCam E2500 does not work in 2.6.28 ] - fix provided<br />
* [http://bugs.archlinux.org/task/13675 FR #13675 - optional dependencies for avahi miss pygtk and python-dbus ] - duplicate of bug 11250<br />
<br />
= Website =<br />
* [http://bugs.archlinux.org/task/7006 FR #7006 - Supported protocols on mirrors page ]<br />
* [http://bugs.archlinux.org/task/12237 FS #12237 - Adding Cite extension to Arch Wiki ] - straight forward installation<br />
<br />
= Community =<br />
* IIRC, several packages still needs to be rebuilt against ffmpeg or openal.<br />
<br />
= Pacman =<br />
No promises on fixing these on bug day, but if any of the pacman devs or ML readers are around these would be good candidates to look at, especially if you like C and shell script coding more than fixing the above bugs. :)<br />
<br />
* (anything in the low priority section of the bug tracker...)<br />
<br />
<br />
[[Category: Package development (English)]]</div>G Symehttps://wiki.archlinux.org/index.php?title=Bug_Day/2010&diff=64775Bug Day/20102009-03-10T16:10:28Z<p>G Syme: /* trivial fixes */ order restored</p>
<hr />
<div>This is a categorized list of some old reports.<br />
<br />
'''Please use the bug title for the links' names. That way we don't need to click on the link to know what a bug is about'''<br />
<br />
'''If you have fixed some bug - enclosure it with <nowiki><s></s></nowiki> tags.'''<br />
<br />
= Installer =<br />
* <s>[http://bugs.archlinux.org/task/10754 BR #10754]</s><br />
* [http://bugs.archlinux.org/task/10831 FR #10831 - 2008.06-USB boot parameter to specify root directory ]<br />
<br />
= System =<br />
[http://bugs.archlinux.org/task/13106?.# FS 13106] This bug still persists.<br />
<br />
= Packages =<br />
* [http://bugs.archlinux.org/task/9971 BR #9971] - licenses missing in many packages! There are plans to fix them regardless of bug day: http://www.archlinux.org/pipermail/arch-dev-public/2009-February/010403.html<br />
<br />
==== decision? ====<br />
* [http://bugs.archlinux.org/task/4957 FR #4957 - Improve autofs default config ]<br />
* [http://bugs.archlinux.org/task/5078 BR #5078 - mcedit broken ]<br />
* [http://bugs.archlinux.org/task/7001 FR #7001 - Move amrnb and amrwb packages to [extra] ]<br />
* [http://bugs.archlinux.org/task/12314 FR #12314 - Change distribution logging system to rsyslog ]<br />
* [http://bugs.archlinux.org/task/12764 FR #12764 - Deluge should depends on libtorrent-rasterbar ]<br />
<br />
==== status? ====<br />
* [http://bugs.archlinux.org/task/6047 FR #6047 - provide more aspell-* packages ]<br />
* [http://bugs.archlinux.org/task/7549 FR #7549 - Default mount option for vfat media disk ]<br />
* [http://bugs.archlinux.org/task/7764 BR #7764 - namcap wrongly complains about missing dependencies ]<br />
<br />
==== trivial fixes ====<br />
* [http://bugs.archlinux.org/task/4812 BR #4812 - mailx should require an smtp-forwarder or server ]<br />
* <s>[http://bugs.archlinux.org/task/8334 BR #8334] - fix provided</s><br />
* [http://bugs.archlinux.org/task/8660 BR #8660 - ypbind-mt daemon script fails to set default domain name ] - fix provided<br />
* [http://bugs.archlinux.org/task/10208 FR #10208 - bash_completion for subversion ]<br />
* [http://bugs.archlinux.org/task/10383 FR #10383 - id3v2 has no documentation! ]<br />
* [http://bugs.archlinux.org/task/11250 FR #11250 - avahi need dbus-python as dependency ]<br />
* [http://bugs.archlinux.org/task/11436 FS #11436 - eclipse 3.4-3 no icon in menu ] - (description how to) fix provided<br />
* [http://bugs.archlinux.org/task/13376 FR #13376 - Logitech QuickCam E2500 does not work in 2.6.28 ] - fix provided<br />
* [http://bugs.archlinux.org/task/13675 FR #13675 - optional dependencies for avahi miss pygtk and python-dbus ] - duplicate of bug 11250<br />
<br />
= Website =<br />
* [http://bugs.archlinux.org/task/7006 FR #7006 - Supported protocols on mirrors page ]<br />
<br />
= Community =<br />
* IIRC, several packages still needs to be rebuilt against ffmpeg or openal.<br />
<br />
= Pacman =<br />
No promises on fixing these on bug day, but if any of the pacman devs or ML readers are around these would be good candidates to look at, especially if you like C and shell script coding more than fixing the above bugs. :)<br />
<br />
* (anything in the low priority section of the bug tracker...)<br />
<br />
<br />
[[Category: Package development (English)]]</div>G Symehttps://wiki.archlinux.org/index.php?title=Bug_Day/2010&diff=64774Bug Day/20102009-03-10T16:08:01Z<p>G Syme: /* trivial fixes */ FS #11436 added</p>
<hr />
<div>This is a categorized list of some old reports.<br />
<br />
'''Please use the bug title for the links' names. That way we don't need to click on the link to know what a bug is about'''<br />
<br />
'''If you have fixed some bug - enclosure it with <nowiki><s></s></nowiki> tags.'''<br />
<br />
= Installer =<br />
* <s>[http://bugs.archlinux.org/task/10754 BR #10754]</s><br />
* [http://bugs.archlinux.org/task/10831 FR #10831 - 2008.06-USB boot parameter to specify root directory ]<br />
<br />
= System =<br />
[http://bugs.archlinux.org/task/13106?.# FS 13106] This bug still persists.<br />
<br />
= Packages =<br />
* [http://bugs.archlinux.org/task/9971 BR #9971] - licenses missing in many packages! There are plans to fix them regardless of bug day: http://www.archlinux.org/pipermail/arch-dev-public/2009-February/010403.html<br />
<br />
==== decision? ====<br />
* [http://bugs.archlinux.org/task/4957 FR #4957 - Improve autofs default config ]<br />
* [http://bugs.archlinux.org/task/5078 BR #5078 - mcedit broken ]<br />
* [http://bugs.archlinux.org/task/7001 FR #7001 - Move amrnb and amrwb packages to [extra] ]<br />
* [http://bugs.archlinux.org/task/12314 FR #12314 - Change distribution logging system to rsyslog ]<br />
* [http://bugs.archlinux.org/task/12764 FR #12764 - Deluge should depends on libtorrent-rasterbar ]<br />
<br />
==== status? ====<br />
* [http://bugs.archlinux.org/task/6047 FR #6047 - provide more aspell-* packages ]<br />
* [http://bugs.archlinux.org/task/7549 FR #7549 - Default mount option for vfat media disk ]<br />
* [http://bugs.archlinux.org/task/7764 BR #7764 - namcap wrongly complains about missing dependencies ]<br />
<br />
==== trivial fixes ====<br />
* [http://bugs.archlinux.org/task/4812 BR #4812 - mailx should require an smtp-forwarder or server ]<br />
* <s>[http://bugs.archlinux.org/task/8334 BR #8334] - fix provided</s><br />
* [http://bugs.archlinux.org/task/8660 BR #8660 - ypbind-mt daemon script fails to set default domain name ] - fix provided<br />
* [http://bugs.archlinux.org/task/10208 FR #10208 - bash_completion for subversion ]<br />
* [http://bugs.archlinux.org/task/10383 FR #10383 - id3v2 has no documentation! ]<br />
* [http://bugs.archlinux.org/task/11250 FR #11250 - avahi need dbus-python as dependency ]<br />
* [http://bugs.archlinux.org/task/13376 FR #13376 - Logitech QuickCam E2500 does not work in 2.6.28 ] - fix provided<br />
* [http://bugs.archlinux.org/task/13675 FR #13675 - optional dependencies for avahi miss pygtk and python-dbus ] - duplicate of bug 11250<br />
* [http://bugs.archlinux.org/task/11436 FS #11436 - eclipse 3.4-3 no icon in menu ] - (description how to) fix provided<br />
<br />
= Website =<br />
* [http://bugs.archlinux.org/task/7006 FR #7006 - Supported protocols on mirrors page ]<br />
<br />
= Community =<br />
* IIRC, several packages still needs to be rebuilt against ffmpeg or openal.<br />
<br />
= Pacman =<br />
No promises on fixing these on bug day, but if any of the pacman devs or ML readers are around these would be good candidates to look at, especially if you like C and shell script coding more than fixing the above bugs. :)<br />
<br />
* (anything in the low priority section of the bug tracker...)<br />
<br />
<br />
[[Category: Package development (English)]]</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=60219Desktop entries2009-02-05T20:17:23Z<p>G Syme: /* Converting icons */ Added info about closed bug. AKA a success story.</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" align="center"<br />
|+ Support for image formats for icons as specified by the [http://standards.freedesktop.org/icon-theme-spec/latest/ar01s02.html freedesktop.org standard].<br />
! Extension<br />
! Full Name and/or Description<br />
! Graphics Type<br />
! Container Format<br />
! Supported<br />
|-<br />
!align="left" | .[[wikipedia:Portable Network Graphics|png]]<br />
| Portable Network Graphics<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="#00cc00"| yes<br />
|-<br />
!align="left" | .[[wikipedia:Scalable Vector Graphics|svg(z)]]<br />
| Scalable Vector Graphics<br />
| [[wikipedia:Vector graphics|Vector]]<br />
|bgcolor="red" | no<br />
|bgcolor="#66cc00"| yes (optional)<br />
|-<br />
!align="left" | .[[wikipedia:X PixMap|xpm]]<br />
| X PixMap<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="yellow"| yes (deprecated)<br />
|-<br />
!align="left" | .[[wikipedia:Graphics Interchange Format|gif]]<br />
| Graphics Interchange Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="red"| no<br />
|-<br />
!align="left" | .[[wikipedia:ICO (icon image file format)|ico]]<br />
| MS Windows Icon Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="#00cc00" | yes<br />
|bgcolor="red"| no<br />
|-<br />
!align="left" | .[[wikipedia:Apple Icon Image|icns]]<br />
| Apple Icon Image<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="#00cc00"| yes<br />
|bgcolor="red"| no<br />
|-<br />
|}<br />
<br />
==Converting icons==<br />
If you stumble across an icon which is in a format that is not supported by the freedesktop.org standard (like ''gif'' or ''ico''), you can '''convert''' (which is part of the '''imagemagick''' package) it to a supported/recommended format, e.g.:<br />
$ convert <icon name>.gif <icon name>.png /* Converts from ''gif'' to ''png'' */<br />
If you convert from a container format like ''ico'', you'll get all images that were encapsulated in the ''ico'' file in the form ''<icon name>-<number>.png''.<br />
If you want to know the size of the image, or the number of images in a container file like ''ico'' you can use '''identify''' (also part of the '''imagemagick''' package)<br />
$ identify /usr/share/vlc/vlc48x48.ico<br />
/usr/share/vlc/vlc48x48.ico[0] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[1] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[2] ICO 128x128 128x128+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[3] ICO 48x48 48x48+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[4] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[5] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
As you can see, the example ''ico'' file, although its name might suggest a single image of size 48x48, contains no less than 6 different sizes, of which one is even greater than 48x48, namely 128x128. And to give a bit of motivation on this subject, at the point of writing this section (2008-10-27), the 128x128 size was missing in the ''vlc'' package (0.9.4-2). So the next step would be to look at the vlc PKGBUILD and check whether this icon format was not in the source package to begin with (in that case we'd inform the vlc developers), or whether this icon was somehow omitted from the Arch-specific package (in that case we can file a bug report at http://bugs.archlinux.org).<br />
(''Update:'' this bug has now been [http://bugs.archlinux.org/task/11923 fixed], so as you can see, your work won't be in vain.)<br />
<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with '''find''' and then use '''grep''' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
If the developers of an application don't include icons in their source packages, the next step would be to search on their web sites.<br />
Some projects, like i.e. ''tvbrowser'' have an [http://enwiki.tvbrowser.org/index.php/Banners,_Logos_and_other_Promotion_Material artwork/logo page] where additional icons may be found. If a project is multi-platform, there may be the case that even if the linux/unix package doesn't come with an icon, the Windows package might provide one. If the project uses a [[wikipedia:Version control system|Version control system]] like CVS/SVN/etc. and you have some experience with it, you also might consider browsing it for icons.<br />
If everything fails, the project might simple have no icon/logo yet.<br />
<br />
==Where to place icons==<br />
<br />
=More Resources=<br />
<br />
*[http://freedesktop.org/wiki/Specifications/desktop-entry-spec freedesktop.org desktop entry specification]<br />
*[http://freedesktop.org/wiki/Specifications/icon-theme-spec freedesktop.org icon theme specification]<br />
*[http://freedesktop.org/wiki/Specifications/menu-spec freedesktop.org menu specification]<br />
*[http://freedesktop.org/wiki/Specifications/basedir-spec freedesktop.org basedir specification]</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=54090Desktop entries2008-11-23T22:19:15Z<p>G Syme: /* More Resources */ added an additional resource</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" align="center"<br />
|+ Support for image formats for icons as specified by the [http://standards.freedesktop.org/icon-theme-spec/latest/ar01s02.html freedesktop.org standard].<br />
! Extension<br />
! Full Name and/or Description<br />
! Graphics Type<br />
! Container Format<br />
! Supported<br />
|-<br />
!align="left" | .[[wikipedia:Portable Network Graphics|png]]<br />
| Portable Network Graphics<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="#00cc00"| yes<br />
|-<br />
!align="left" | .[[wikipedia:Scalable Vector Graphics|svg(z)]]<br />
| Scalable Vector Graphics<br />
| [[wikipedia:Vector graphics|Vector]]<br />
|bgcolor="red" | no<br />
|bgcolor="#66cc00"| yes (optional)<br />
|-<br />
!align="left" | .[[wikipedia:X PixMap|xpm]]<br />
| X PixMap<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="yellow"| yes (deprecated)<br />
|-<br />
!align="left" | .[[wikipedia:Graphics Interchange Format|gif]]<br />
| Graphics Interchange Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="red"| no<br />
|-<br />
!align="left" | .[[wikipedia:ICO (icon image file format)|ico]]<br />
| MS Windows Icon Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="#00cc00" | yes<br />
|bgcolor="red"| no<br />
|-<br />
!align="left" | .[[wikipedia:Apple Icon Image|icns]]<br />
| Apple Icon Image<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="#00cc00"| yes<br />
|bgcolor="red"| no<br />
|-<br />
|}<br />
<br />
==Converting icons==<br />
If you stumble across an icon which is in a format that is not supported by the freedesktop.org standard (like ''gif'' or ''ico''), you can '''convert''' (which is part of the '''imagemagick''' package) it to a supported/recommended format, e.g.:<br />
$ convert <icon name>.gif <icon name>.png /* Converts from ''gif'' to ''png'' */<br />
If you convert from a container format like ''ico'', you'll get all images that were encapsulated in the ''ico'' file in the form ''<icon name>-<number>.png''.<br />
If you want to know the size of the image, or the number of images in a container file like ''ico'' you can use '''identify''' (also part of the '''imagemagick''' package)<br />
$ identify /usr/share/vlc/vlc48x48.ico<br />
/usr/share/vlc/vlc48x48.ico[0] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[1] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[2] ICO 128x128 128x128+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[3] ICO 48x48 48x48+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[4] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[5] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
As you can see, the example ''ico'' file, although its name might suggest a single image of size 48x48, contains no less than 6 different sizes, of which one is even greater than 48x48, namely 128x128. And to give a bit of motivation on this subject, at the point of writing this section (2008-10-27), the 128x128 size was missing in the ''vlc'' package (0.9.4-2). So the next step would be to look at the vlc PKGBUILD and check whether this icon format was not in the source package to begin with (in that case we'd inform the vlc developers), or whether this icon was somehow omitted from the Arch-specific package (in that case we can file a bug report at http://bugs.archlinux.org).<br />
<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with '''find''' and then use '''grep''' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
If the developers of an application don't include icons in their source packages, the next step would be to search on their web sites.<br />
Some projects, like i.e. ''tvbrowser'' have an [http://enwiki.tvbrowser.org/index.php/Banners,_Logos_and_other_Promotion_Material artwork/logo page] where additional icons may be found. If a project is multi-platform, there may be the case that even if the linux/unix package doesn't come with an icon, the Windows package might provide one. If the project uses a [[wikipedia:Version control system|Version control system]] like CVS/SVN/etc. and you have some experience with it, you also might consider browsing it for icons.<br />
If everything fails, the project might simple have no icon/logo yet.<br />
<br />
==Where to place icons==<br />
<br />
=More Resources=<br />
<br />
*[http://freedesktop.org/wiki/Specifications/desktop-entry-spec freedesktop.org desktop entry specification]<br />
*[http://freedesktop.org/wiki/Specifications/icon-theme-spec freedesktop.org icon theme specification]<br />
*[http://freedesktop.org/wiki/Specifications/menu-spec freedesktop.org menu specification]<br />
*[http://freedesktop.org/wiki/Specifications/basedir-spec freedesktop.org basedir specification]</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=52442Desktop entries2008-10-31T15:53:16Z<p>G Syme: /* Quick overview of common image formats */ PNG description corrected</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" align="center"<br />
|+ Support for image formats for icons as specified by the [http://standards.freedesktop.org/icon-theme-spec/latest/ar01s02.html freedesktop.org standard].<br />
! Extension<br />
! Full Name and/or Description<br />
! Graphics Type<br />
! Container Format<br />
! Supported<br />
|-<br />
!align="left" | .[[wikipedia:Portable Network Graphics|png]]<br />
| Portable Network Graphics<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="#00cc00"| yes<br />
|-<br />
!align="left" | .[[wikipedia:Scalable Vector Graphics|svg(z)]]<br />
| Scalable Vector Graphics<br />
| [[wikipedia:Vector graphics|Vector]]<br />
|bgcolor="red" | no<br />
|bgcolor="#66cc00"| yes (optional)<br />
|-<br />
!align="left" | .[[wikipedia:X PixMap|xpm]]<br />
| X PixMap<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="yellow"| yes (deprecated)<br />
|-<br />
!align="left" | .[[wikipedia:Graphics Interchange Format|gif]]<br />
| Graphics Interchange Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="red"| no<br />
|-<br />
!align="left" | .[[wikipedia:ICO (icon image file format)|ico]]<br />
| MS Windows Icon Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="#00cc00" | yes<br />
|bgcolor="red"| no<br />
|-<br />
!align="left" | .[[wikipedia:Apple Icon Image|icns]]<br />
| Apple Icon Image<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="#00cc00"| yes<br />
|bgcolor="red"| no<br />
|-<br />
|}<br />
<br />
==Converting icons==<br />
If you stumble across an icon which is in a format that is not supported by the freedesktop.org standard (like ''gif'' or ''ico''), you can '''convert''' (which is part of the '''imagemagick''' package) it to a supported/recommended format, e.g.:<br />
$ convert <icon name>.gif <icon name>.png /* Converts from ''gif'' to ''png'' */<br />
If you convert from a container format like ''ico'', you'll get all images that were encapsulated in the ''ico'' file in the form ''<icon name>-<number>.png''.<br />
If you want to know the size of the image, or the number of images in a container file like ''ico'' you can use '''identify''' (also part of the '''imagemagick''' package)<br />
$ identify /usr/share/vlc/vlc48x48.ico<br />
/usr/share/vlc/vlc48x48.ico[0] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[1] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[2] ICO 128x128 128x128+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[3] ICO 48x48 48x48+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[4] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[5] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
As you can see, the example ''ico'' file, although its name might suggest a single image of size 48x48, contains no less than 6 different sizes, of which one is even greater than 48x48, namely 128x128. And to give a bit of motivation on this subject, at the point of writing this section (2008-10-27), the 128x128 size was missing in the ''vlc'' package (0.9.4-2). So the next step would be to look at the vlc PKGBUILD and check whether this icon format was not in the source package to begin with (in that case we'd inform the vlc developers), or whether this icon was somehow omitted from the Arch-specific package (in that case we can file a bug report at http://bugs.archlinux.org).<br />
<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with '''find''' and then use '''grep''' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
If the developers of an application don't include icons in their source packages, the next step would be to search on their web sites.<br />
Some projects, like i.e. ''tvbrowser'' have an [http://enwiki.tvbrowser.org/index.php/Banners,_Logos_and_other_Promotion_Material artwork/logo page] where additional icons may be found. If a project is multi-platform, there may be the case that even if the linux/unix package doesn't come with an icon, the Windows package might provide one. If the project uses a [[wikipedia:Version control system|Version control system]] like CVS/SVN/etc. and you have some experience with it, you also might consider browsing it for icons.<br />
If everything fails, the project might simple have no icon/logo yet.<br />
<br />
==Where to place icons==<br />
<br />
=More Resources=<br />
<br />
*[http://freedesktop.org/wiki/Specifications/desktop-entry-spec freedesktop.org desktop entry specification]<br />
*[http://freedesktop.org/wiki/Specifications/icon-theme-spec freedesktop.org icon theme specification]<br />
*[http://freedesktop.org/wiki/Specifications/menu-spec freedesktop.org menu specification]</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=52441Desktop entries2008-10-31T15:51:34Z<p>G Syme: /* Quick overview of common image formats */ extended table</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" align="center"<br />
|+ Support for image formats for icons as specified by the [http://standards.freedesktop.org/icon-theme-spec/latest/ar01s02.html freedesktop.org standard].<br />
! Extension<br />
! Full Name and/or Description<br />
! Graphics Type<br />
! Container Format<br />
! Supported<br />
|-<br />
!align="left" | .[[wikipedia:Portable Network Graphics|png]]<br />
| Graphics Interchange Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="#00cc00"| yes<br />
|-<br />
!align="left" | .[[wikipedia:Scalable Vector Graphics|svg(z)]]<br />
| Scalable Vector Graphics<br />
| [[wikipedia:Vector graphics|Vector]]<br />
|bgcolor="red" | no<br />
|bgcolor="#66cc00"| yes (optional)<br />
|-<br />
!align="left" | .[[wikipedia:X PixMap|xpm]]<br />
| X PixMap<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="yellow"| yes (deprecated)<br />
|-<br />
!align="left" | .[[wikipedia:Graphics Interchange Format|gif]]<br />
| Graphics Interchange Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red" | no<br />
|bgcolor="red"| no<br />
|-<br />
!align="left" | .[[wikipedia:ICO (icon image file format)|ico]]<br />
| MS Windows Icon Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="#00cc00" | yes<br />
|bgcolor="red"| no<br />
|-<br />
!align="left" | .[[wikipedia:Apple Icon Image|icns]]<br />
| Apple Icon Image<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="#00cc00"| yes<br />
|bgcolor="red"| no<br />
|-<br />
|}<br />
<br />
==Converting icons==<br />
If you stumble across an icon which is in a format that is not supported by the freedesktop.org standard (like ''gif'' or ''ico''), you can '''convert''' (which is part of the '''imagemagick''' package) it to a supported/recommended format, e.g.:<br />
$ convert <icon name>.gif <icon name>.png /* Converts from ''gif'' to ''png'' */<br />
If you convert from a container format like ''ico'', you'll get all images that were encapsulated in the ''ico'' file in the form ''<icon name>-<number>.png''.<br />
If you want to know the size of the image, or the number of images in a container file like ''ico'' you can use '''identify''' (also part of the '''imagemagick''' package)<br />
$ identify /usr/share/vlc/vlc48x48.ico<br />
/usr/share/vlc/vlc48x48.ico[0] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[1] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[2] ICO 128x128 128x128+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[3] ICO 48x48 48x48+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[4] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[5] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
As you can see, the example ''ico'' file, although its name might suggest a single image of size 48x48, contains no less than 6 different sizes, of which one is even greater than 48x48, namely 128x128. And to give a bit of motivation on this subject, at the point of writing this section (2008-10-27), the 128x128 size was missing in the ''vlc'' package (0.9.4-2). So the next step would be to look at the vlc PKGBUILD and check whether this icon format was not in the source package to begin with (in that case we'd inform the vlc developers), or whether this icon was somehow omitted from the Arch-specific package (in that case we can file a bug report at http://bugs.archlinux.org).<br />
<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with '''find''' and then use '''grep''' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
If the developers of an application don't include icons in their source packages, the next step would be to search on their web sites.<br />
Some projects, like i.e. ''tvbrowser'' have an [http://enwiki.tvbrowser.org/index.php/Banners,_Logos_and_other_Promotion_Material artwork/logo page] where additional icons may be found. If a project is multi-platform, there may be the case that even if the linux/unix package doesn't come with an icon, the Windows package might provide one. If the project uses a [[wikipedia:Version control system|Version control system]] like CVS/SVN/etc. and you have some experience with it, you also might consider browsing it for icons.<br />
If everything fails, the project might simple have no icon/logo yet.<br />
<br />
==Where to place icons==<br />
<br />
=More Resources=<br />
<br />
*[http://freedesktop.org/wiki/Specifications/desktop-entry-spec freedesktop.org desktop entry specification]<br />
*[http://freedesktop.org/wiki/Specifications/icon-theme-spec freedesktop.org icon theme specification]<br />
*[http://freedesktop.org/wiki/Specifications/menu-spec freedesktop.org menu specification]</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=51842Desktop entries2008-10-27T21:16:45Z<p>G Syme: /* Icons */ Changed order of sequence</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" align="center"<br />
|+ Support for image formats for icons as specified by the [http://standards.freedesktop.org/icon-theme-spec/latest/ar01s02.html freedesktop.org standard].<br />
! Extension<br />
! Full Name<br />
! Type<br />
! Supported<br />
|-<br />
!align="left" | .[[wikipedia:Portable Network Graphics|png]]<br />
| Graphics Interchange Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="#00cc00"| yes<br />
|-<br />
!align="left" | .[[wikipedia:Scalable Vector Graphics|svg(z)]]<br />
| Scalable Vector Graphics<br />
| [[wikipedia:Vector graphics|Vector]]<br />
|bgcolor="#66cc00"| yes (optional)<br />
|-<br />
!align="left" | .[[wikipedia:X PixMap|xpm]]<br />
| X PixMap<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="yellow"| yes (deprecated)<br />
|-<br />
!align="left" | .[[wikipedia:Graphics Interchange Format|gif]]<br />
| Graphics Interchange Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red"| no<br />
|-<br />
!align="left" | .[[wikipedia:ICO (icon image file format)|ico]]<br />
| <br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red"| no<br />
|-<br />
|}<br />
<br />
==Converting icons==<br />
If you stumble across an icon which is in a format that is not supported by the freedesktop.org standard (like ''gif'' or ''ico''), you can '''convert''' (which is part of the '''imagemagick''' package) it to a supported/recommended format, e.g.:<br />
$ convert <icon name>.gif <icon name>.png /* Converts from ''gif'' to ''png'' */<br />
If you convert from a container format like ''ico'', you'll get all images that were encapsulated in the ''ico'' file in the form ''<icon name>-<number>.png''.<br />
If you want to know the size of the image, or the number of images in a container file like ''ico'' you can use '''identify''' (also part of the '''imagemagick''' package)<br />
$ identify /usr/share/vlc/vlc48x48.ico<br />
/usr/share/vlc/vlc48x48.ico[0] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[1] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[2] ICO 128x128 128x128+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[3] ICO 48x48 48x48+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[4] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[5] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
As you can see, the example ''ico'' file, although its name might suggest a single image of size 48x48, contains no less than 6 different sizes, of which one is even greater than 48x48, namely 128x128. And to give a bit of motivation on this subject, at the point of writing this section (2008-10-27), the 128x128 size was missing in the ''vlc'' package (0.9.4-2). So the next step would be to look at the vlc PKGBUILD and check whether this icon format was not in the source package to begin with (in that case we'd inform the vlc developers), or whether this icon was somehow omitted from the Arch-specific package (in that case we can file a bug report at http://bugs.archlinux.org).<br />
<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with '''find''' and then use '''grep''' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
If the developers of an application don't include icons in their source packages, the next step would be to search on their web sites.<br />
Some projects, like i.e. ''tvbrowser'' have an [http://enwiki.tvbrowser.org/index.php/Banners,_Logos_and_other_Promotion_Material artwork/logo page] where additional icons may be found. If a project is multi-platform, there may be the case that even if the linux/unix package doesn't come with an icon, the Windows package might provide one. If the project uses a [[wikipedia:Version control system|Version control system]] like CVS/SVN/etc. and you have some experience with it, you also might consider browsing it for icons.<br />
If everything fails, the project might simple have no icon/logo yet.<br />
<br />
==Where to place icons==<br />
<br />
=More Resources=<br />
<br />
*[http://freedesktop.org/wiki/Specifications/desktop-entry-spec freedesktop.org desktop entry specification]<br />
*[http://freedesktop.org/wiki/Specifications/icon-theme-spec freedesktop.org icon theme specification]<br />
*[http://freedesktop.org/wiki/Specifications/menu-spec freedesktop.org menu specification]</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=51841Desktop entries2008-10-27T21:07:58Z<p>G Syme: /* Icons */ Added section "Converting icons"</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" align="center"<br />
|+ Support for image formats for icons as specified by the [http://standards.freedesktop.org/icon-theme-spec/latest/ar01s02.html freedesktop.org standard].<br />
! Extension<br />
! Full Name<br />
! Type<br />
! Supported<br />
|-<br />
!align="left" | .[[wikipedia:Portable Network Graphics|png]]<br />
| Graphics Interchange Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="#00cc00"| yes<br />
|-<br />
!align="left" | .[[wikipedia:Scalable Vector Graphics|svg(z)]]<br />
| Scalable Vector Graphics<br />
| [[wikipedia:Vector graphics|Vector]]<br />
|bgcolor="#66cc00"| yes (optional)<br />
|-<br />
!align="left" | .[[wikipedia:X PixMap|xpm]]<br />
| X PixMap<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="yellow"| yes (deprecated)<br />
|-<br />
!align="left" | .[[wikipedia:Graphics Interchange Format|gif]]<br />
| Graphics Interchange Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red"| no<br />
|-<br />
!align="left" | .[[wikipedia:ICO (icon image file format)|ico]]<br />
| <br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red"| no<br />
|-<br />
|}<br />
<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with ''find'' and then use ''grep'' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
If the developers of an application don't include icons in their source packages, the next step would be to search on their web sites.<br />
Some projects, like i.e. ''tvbrowser'' have an [http://enwiki.tvbrowser.org/index.php/Banners,_Logos_and_other_Promotion_Material artwork/logo page] where additional icons may be found. If a project is multi-platform, there may be the case that even if the linux/unix package doesn't come with an icon, the Windows package might provide one. If the project uses a [[wikipedia:Version control system|Version control system]] like CVS/SVN/etc. and you have some experience with it, you also might consider browsing it for icons.<br />
If everything fails, the project might simple have no icon/logo yet.<br />
<br />
==Converting icons==<br />
If you stumble across an icon which is in a format that is not supported by the freedesktop.org standard (like ''gif'' or ''ico''), you can '''convert''' (which is part of the '''imagemagick''' package) it to a supported/recommended format, e.g.:<br />
$ convert <icon name>.gif <icon name>.png /* Converts from ''gif'' to ''png'' */<br />
If you convert from a container format like ''ico'', you'll get all images that were encapsulated in the ''ico'' file in the form ''<icon name>-<number>.png''.<br />
If you want to know the size of the image, or the number of images in a container file like ''ico'' you can use '''identify''' (also part of the '''imagemagick''' package)<br />
$ identify /usr/share/vlc/vlc48x48.ico<br />
/usr/share/vlc/vlc48x48.ico[0] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[1] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[2] ICO 128x128 128x128+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[3] ICO 48x48 48x48+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[4] ICO 32x32 32x32+0+0 8-bit DirectClass 84.3kb<br />
/usr/share/vlc/vlc48x48.ico[5] ICO 16x16 16x16+0+0 8-bit DirectClass 84.3kb<br />
As you can see, the example ''ico'' file, although its name might suggest a single image of size 48x48, contains no less than 6 different sizes, of which one is even greater than 48x48, namely 128x128. And to give a bit of motivation on this subject, at the point of writing this section (2008-10-27), the 128x128 size was missing in the ''vlc'' package (0.9.4-2). So the next step would be to look at the vlc PKGBUILD and check whether this icon format was not in the source package to begin with (in that case we'd inform the vlc developers), or whether this icon was somehow omitted from the Arch-specific package (in that case we can file a bug report at http://bugs.archlinux.org).<br />
<br />
==Where to place icons==<br />
<br />
=More Resources=<br />
<br />
*[http://freedesktop.org/wiki/Specifications/desktop-entry-spec freedesktop.org desktop entry specification]<br />
*[http://freedesktop.org/wiki/Specifications/icon-theme-spec freedesktop.org icon theme specification]<br />
*[http://freedesktop.org/wiki/Specifications/menu-spec freedesktop.org menu specification]</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=51836Desktop entries2008-10-27T16:34:00Z<p>G Syme: /* Quick overview of common image formats */ Restructured section as a table</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
{| class="wikitable" border="1" cellpadding="5" align="center"<br />
|+ Support for image formats for icons as specified by the [http://standards.freedesktop.org/icon-theme-spec/latest/ar01s02.html freedesktop.org standard].<br />
! Extension<br />
! Full Name<br />
! Type<br />
! Supported<br />
|-<br />
!align="left" | .[[wikipedia:Portable Network Graphics|png]]<br />
| Graphics Interchange Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="#00cc00"| yes<br />
|-<br />
!align="left" | .[[wikipedia:Scalable Vector Graphics|svg(z)]]<br />
| Scalable Vector Graphics<br />
| [[wikipedia:Vector graphics|Vector]]<br />
|bgcolor="#66cc00"| yes (optional)<br />
|-<br />
!align="left" | .[[wikipedia:X PixMap|xpm]]<br />
| X PixMap<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="yellow"| yes (deprecated)<br />
|-<br />
!align="left" | .[[wikipedia:Graphics Interchange Format|gif]]<br />
| Graphics Interchange Format<br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red"| no<br />
|-<br />
!align="left" | .[[wikipedia:ICO (icon image file format)|ico]]<br />
| <br />
| [[wikipedia:Raster graphics|Raster]]<br />
|bgcolor="red"| no<br />
|-<br />
|}<br />
<br />
==Where to place icons==<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with ''find'' and then use ''grep'' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
If the developers of an application don't include icons in their source packages, the next step would be to search on their web sites.<br />
Some projects, like i.e. ''tvbrowser'' have an [http://enwiki.tvbrowser.org/index.php/Banners,_Logos_and_other_Promotion_Material artwork/logo page] where additional icons may be found. If a project is multi-platform, there may be the case that even if the linux/unix package doesn't come with an icon, the Windows package might provide one. If the project uses a [[wikipedia:Version control system|Version control system]] like CVS/SVN/etc. and you have some experience with it, you also might consider browsing it for icons.<br />
If everything fails, the project might simple have no icon/logo yet.<br />
<br />
=More Resources=<br />
<br />
*[http://freedesktop.org/wiki/Specifications/desktop-entry-spec freedesktop.org desktop entry specification]<br />
*[http://freedesktop.org/wiki/Specifications/icon-theme-spec freedesktop.org icon theme specification]<br />
*[http://freedesktop.org/wiki/Specifications/menu-spec freedesktop.org menu specification]</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=51835Desktop entries2008-10-27T15:09:19Z<p>G Syme: /* Icons */ corrected indentation</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
===Raster image formats===<br />
; *.[[wikipedia:Graphics Interchange Format|gif]] : <br />
; *.[[wikipedia:Portable Network Graphics|png]] :<br />
; *.[[wikipedia:X PixMap|xpm]] : <br />
; *.[[wikipedia:ICO (icon image file format)|ico]] : This format is intended primary for Windows, and can't usually be used in a Linux/Unix environment directly, but can be converted to other file formats, preferably PNG. It is a container format, and can contain a set of icons with different sizes and/or color depths. You can use the ''convert'' command from the package ''imagemagick'' to accomplish this task.<br />
<br />
===Vector image formats===<br />
; *.[[wikipedia:Scalable Vector Graphics|svg]] :<br />
==Where to place icons==<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with ''find'' and then use ''grep'' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
If the developers of an application don't include icons in their source packages, the next step would be to search on their web sites.<br />
Some projects, like i.e. ''tvbrowser'' have an [http://enwiki.tvbrowser.org/index.php/Banners,_Logos_and_other_Promotion_Material artwork/logo page] where additional icons may be found. If a project is multi-platform, there may be the case that even if the linux/unix package doesn't come with an icon, the Windows package might provide one. If the project uses a [[wikipedia:Version control system|Version control system]] like CVS/SVN/etc. and you have some experience with it, you also might consider browsing it for icons.<br />
If everything fails, the project might simple have no icon/logo yet.<br />
<br />
=More Resources=<br />
<br />
*[http://freedesktop.org/wiki/Specifications/desktop-entry-spec freedesktop.org desktop entry specification]<br />
*[http://freedesktop.org/wiki/Specifications/icon-theme-spec freedesktop.org icon theme specification]<br />
*[http://freedesktop.org/wiki/Specifications/menu-spec freedesktop.org menu specification]</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=51834Desktop entries2008-10-27T14:56:49Z<p>G Syme: /* More Resources */ extended and formatted</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
==Raster image formats==<br />
; *.[[wikipedia:Graphics Interchange Format|gif]] : <br />
; *.[[wikipedia:Portable Network Graphics|png]] :<br />
; *.[[wikipedia:X PixMap|xpm]] : <br />
; *.[[wikipedia:ICO (icon image file format)|ico]] : This format is intended primary for Windows, and can't usually be used in a Linux/Unix environment directly, but can be converted to other file formats, preferably PNG. It is a container format, and can contain a set of icons with different sizes and/or color depths. You can use the ''convert'' command from the package ''imagemagick'' to accomplish this task.<br />
<br />
==Vector image formats==<br />
; *.[[wikipedia:Scalable Vector Graphics|svg]] :<br />
==Where to place icons==<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with ''find'' and then use ''grep'' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
If the developers of an application don't include icons in their source packages, the next step would be to search on their web sites.<br />
Some projects, like i.e. ''tvbrowser'' have an [http://enwiki.tvbrowser.org/index.php/Banners,_Logos_and_other_Promotion_Material artwork/logo page] where additional icons may be found. If a project is multi-platform, there may be the case that even if the linux/unix package doesn't come with an icon, the Windows package might provide one. If the project uses a [[wikipedia:Version control system|Version control system]] like CVS/SVN/etc. and you have some experience with it, you also might consider browsing it for icons.<br />
If everything fails, the project might simple have no icon/logo yet.<br />
<br />
=More Resources=<br />
<br />
*[http://freedesktop.org/wiki/Specifications/desktop-entry-spec freedesktop.org desktop entry specification]<br />
*[http://freedesktop.org/wiki/Specifications/icon-theme-spec freedesktop.org icon theme specification]<br />
*[http://freedesktop.org/wiki/Specifications/menu-spec freedesktop.org menu specification]</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=51421Desktop entries2008-10-18T14:25:33Z<p>G Syme: /* Obtaining icons */</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
==Raster image formats==<br />
; *.[[wikipedia:Graphics Interchange Format|gif]] : <br />
; *.[[wikipedia:Portable Network Graphics|png]] :<br />
; *.[[wikipedia:X PixMap|xpm]] : <br />
; *.[[wikipedia:ICO (icon image file format)|ico]] : This format is intended primary for Windows, and can't usually be used in a Linux/Unix environment directly, but can be converted to other file formats, preferably PNG. It is a container format, and can contain a set of icons with different sizes and/or color depths. You can use the ''convert'' command from the package ''imagemagick'' to accomplish this task.<br />
<br />
==Vector image formats==<br />
; *.[[wikipedia:Scalable Vector Graphics|svg]] :<br />
==Where to place icons==<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with ''find'' and then use ''grep'' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
If the developers of an application don't include icons in their source packages, the next step would be to search on their web sites.<br />
Some projects, like i.e. ''tvbrowser'' have an [http://enwiki.tvbrowser.org/index.php/Banners,_Logos_and_other_Promotion_Material artwork/logo page] where additional icons may be found. If a project is multi-platform, there may be the case that even if the linux/unix package doesn't come with an icon, the Windows package might provide one. If the project uses a [[wikipedia:Version control system|Version control system]] like CVS/SVN/etc. and you have some experience with it, you also might consider browsing it for icons.<br />
If everything fails, the project might simple have no icon/logo yet.<br />
<br />
=More Resources=<br />
<br />
http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec<br />
<br />
http://freedesktop.org/wiki/Specifications/menu-spec</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=51420Desktop entries2008-10-18T14:23:50Z<p>G Syme: "Obtaining icons" further extended.</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
==Raster image formats==<br />
; *.[[wikipedia:Graphics Interchange Format|gif]] : <br />
; *.[[wikipedia:Portable Network Graphics|png]] :<br />
; *.[[wikipedia:X PixMap|xpm]] : <br />
; *.[[wikipedia:ICO (icon image file format)|ico]] : This format is intended primary for Windows, and can't usually be used in a Linux/Unix environment directly, but can be converted to other file formats, preferably PNG. It is a container format, and can contain a set of icons with different sizes and/or color depths. You can use the ''convert'' command from the package ''imagemagick'' to accomplish this task.<br />
<br />
==Vector image formats==<br />
; *.[[wikipedia:Scalable Vector Graphics|svg]] :<br />
==Where to place icons==<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with ''find'' and then use ''grep'' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
If the developers of an application don't include icons in their source packages, the next step would be to search on their web sites.<br />
Some projects, like i.e. ''tvbrowser'' have an [http://enwiki.tvbrowser.org/index.php/Banners,_Logos_and_other_Promotion_Material artwork/logo page] where additional icons may be found. If a project is multi-platform, there may be the case that even if the linux/unix package doesn't come with an icon, the Windows package might provide one. If the project uses a [[wikipedia:Version control system]] like CVS/SVN/etc. and you have some experience with it, you also might consider browsing it for icons.<br />
If everything fails, the project might simple have no icon/logo yet.<br />
<br />
=More Resources=<br />
<br />
http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec<br />
<br />
http://freedesktop.org/wiki/Specifications/menu-spec</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=51353Desktop entries2008-10-17T13:08:32Z<p>G Syme: /* Raster image formats */</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
==Raster image formats==<br />
; *.[[wikipedia:Graphics Interchange Format|gif]] : <br />
; *.[[wikipedia:Portable Network Graphics|png]] :<br />
; *.[[wikipedia:X PixMap|xpm]] : <br />
; *.[[wikipedia:ICO (icon image file format)|ico]] : This format is intended primary for Windows, and can't usually be used in a Linux/Unix environment directly, but can be converted to other file formats, preferably PNG. It is a container format, and can contain a set of icons with different sizes and/or color depths. You can use the ''convert'' command from the package ''imagemagick'' to accomplish this task.<br />
<br />
==Vector image formats==<br />
; *.[[wikipedia:Scalable Vector Graphics|svg]] :<br />
==Where to place icons==<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with ''find'' and then use ''grep'' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
<br />
=More Resources=<br />
<br />
http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec<br />
<br />
http://freedesktop.org/wiki/Specifications/menu-spec</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=51352Desktop entries2008-10-17T13:01:07Z<p>G Syme: /* Obtaining icons */ made comment more precise</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
==Raster image formats==<br />
; *.[[wikipedia:Graphics Interchange Format|gif]] : <br />
; *.[[wikipedia:Portable Network Graphics|png]] :<br />
; *.[[wikipedia:X PixMap|xpm]] : <br />
; *.[[wikipedia:ICO (icon image file format)|ico]]<br />
==Vector image formats==<br />
; *.[[wikipedia:Scalable Vector Graphics|svg]] :<br />
==Where to place icons==<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with ''find'' and then use ''grep'' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\|ico\)$" /* this filters for common extensions */<br />
<br />
=More Resources=<br />
<br />
http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec<br />
<br />
http://freedesktop.org/wiki/Specifications/menu-spec</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=51351Desktop entries2008-10-17T12:59:31Z<p>G Syme: /* Icons */ Wikipedia links added and "Obtaining icons" started to fill</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
<br />
Here is a short overview of image formats commonly used for icons.<br />
<br />
==Raster image formats==<br />
; *.[[wikipedia:Graphics Interchange Format|gif]] : <br />
; *.[[wikipedia:Portable Network Graphics|png]] :<br />
; *.[[wikipedia:X PixMap|xpm]] : <br />
; *.[[wikipedia:ICO (icon image file format)|ico]]<br />
==Vector image formats==<br />
; *.[[wikipedia:Scalable Vector Graphics|svg]] :<br />
==Where to place icons==<br />
==Obtaining icons==<br />
Although packages that already ship with a .desktop-file most certainly contain an icon or a set of icons, there's sometimes the case when a developer hasn't created a .desktop-file, but may ship icons, nonetheless. So a good start is to look for icons in the source package.<br />
You can i.e. first filter for the extension with ''find'' and then use ''grep'' to filter further for certain buzzwords like the package name, "icon", "logo", etc, if there are quite a lot of images in the source package.<br />
$ find /path/to/source/package -regex ".*\.\(svg\|png\|xpm\|gif\)$" /* filters for extensions */<br />
<br />
=More Resources=<br />
<br />
http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec<br />
<br />
http://freedesktop.org/wiki/Specifications/menu-spec</div>G Symehttps://wiki.archlinux.org/index.php?title=Desktop_entries&diff=51124Desktop entries2008-10-14T21:20:41Z<p>G Syme: Initial commit of the article with provisoral structure suggestion</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{stub}}<br />
<br />
=Introduction=<br />
<br />
As quite a lot of projects do either not supply desktop entries yet or supply some which could be improved,<br />
this article is meant to explain how to create usefull and standard compliant desktop entries and menus.<br />
It is mainly intended for package contributors and maintainers, but may hopefully be usefull for software developers, too,<br />
as in the long run, the goal is to share these contributions back upstream (AKA back to the official/original software developers)<br />
so that they and also other distributions can profit from the result.<br />
<br />
In the following sections, we'll take a look at how desktop entries and menus are created and validated, how to cope with icons,<br />
and where to find the official standards for further reading and details.<br />
<br />
At the moment, there are 3 types of desktop entries (descriptions are probably very inaccurate, but a good start):<br />
; Application : a shortcut to an application (this is what most of this article is about)<br />
; Link : a shortcut to a web link.<br />
; Directory : a container of meta data of a menu entry<br />
<br />
=Desktop files=<br />
<br />
Desktop entries for applications (often referred to as .desktop-files) are (in general) some kind combination<br />
of meta information resource and shortcut of a program. These files have the extention ''.desktop'' and usually reside in ''/usr/share/applications''.<br />
Here's is an example of its structure with additional comments.<br />
<br />
[Desktop Entry]<br />
Type=Application # Indicates the type as listed above<br />
Version=1.0 # The version of the desktop entry specification to which this file complies<br />
Name=jMemorize # The name of the application<br />
Comment=Flash card based learning tool # A comment which can/will be used as a tooltip<br />
Exec=jmemorize # The executable of the application.<br />
Icon=jmemorize # The name of the icon that will be used to display this entry<br />
Terminal=false # Describes whether this application needs to be run in a terminal or not<br />
Categories=Education;Languages;Java; # Describes the categories in which this entry should be shown<br />
<br />
The example above is only meant to give a quick impression, and does not utilize all possible entry keys.<br />
The complete list can be found [http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html here].<br />
I do not intend to repeat/duplicate all the information there, but I want to point at common mistakes.<br />
<br />
==Common mistakes==<br />
<br />
<ol><br />
<li>The ''Version'' key does not stand for the version of the application, but for the version of the desktop entry specification to which this file complies.</li><br />
<li>The keys ''Name'', ''GenericName'' and ''Comment'' often contain redundant values in the form of combinations of them, like: <pre>Name=Pidgin Internet Messenger<br />
GenericName=Internet Messenger</pre> or <pre>Name=NoteCase notes manager<br />
Comment=Notes Manager</pre> Please avoid something like that, as this will only confuse users. Therefore we have a standard. The ''Name'' should only contain the name, or maybe an abbreviation/acronym if available. The ''GenericName'' should state what you would generally call an application that does what this specific application offers (i.e. Firefox is a "Web Browser"). The ''Comment'' is intended to contain any usefull additional information.</li><br />
<li>There are quite some keys that have become deprecated over time as the standard has matured. The best/simplest way is to use the tool '''desktop-file-validate''' which is part of the package '''desktop-file-utils'''. Just run <pre>$ desktop-file-validate <your desktop file></pre> and it will give you very verbose and useful warnings and error messages.</li><br />
</ol><br />
<br />
<br />
=Menu files=<br />
=Icons=<br />
==Quick overview of common image formats==<br />
==raster image formats==<br />
===gif===<br />
===png===<br />
===[[wikipedia:X PixMap|xpm]]===<br />
==vector image formats==<br />
===svg===<br />
==Where to place icons==<br />
==Obtaining icons==<br />
<br />
=More Resources=<br />
<br />
http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec<br />
<br />
http://freedesktop.org/wiki/Specifications/menu-spec</div>G Syme