Jump to content Jump to page navigation: previous page [access key p]/next page [access key n]
AppStream
AppStream › Upstream Metadata › Desktop Applications
AppStream › Upstream Metadata › Desktop Applications
Top
←→

## 2.3 Desktop Applications #

### 2.3.1 Introduction #

A desktop application is interactive software that presents a graphical interface to the user. To appear in menus, the desktop application must include a Freedesktop `.desktop` (https://specifications.freedesktop.org/desktop-entry-spec/latest/) file.

AppStream generators may pull data from the preexisting `.desktop` files to represent an application in the AppStream metadata pool. Upstream projects should ship a metainfo file containing additional metadata to describe their application though, to enhance the available metadata. This data includes things like screenshots, long descriptions, icon information and various other things needed to present the application properly to the user. For some distributions, the presence of this metadata is a prerequisite for the application showing up in the metadata pool and being presented in software centers.

The file described in this document is built upon the generic component metadata with fields specific for desktop applications (see Section 2.1, “Generic Component”).

The metainfo files override any values which are automatically fetched from other sources by the AppStream data generator, which means that its data will always take precedence over data which has already been defined in a `.desktop` file. Applications can ship one or more files in `/usr/share/metainfo/%{id}.metainfo.xml`.

Data will only be fetched from a desktop file if one <launchable/> tag is present to define a .desktop file ID. If multiple `launchable` tags are defined, no data will be merged in from .desktop files.

###### Note

If you are looking for some quickstart guide to just get your application to ship AppStream metadata quickly, this document might not be for you. You might want to take a look at Section 5.1, “For GUI application upstream maintainers” instead.

###### Note

While `desktop-application` metadata is commonly stored in `/usr/share/metainfo/%{id}.metainfo.xml` (with a `.metainfo.xml` extension), using a `.appdata.xml` extension is also permitted for this component type for legacy compatibility. AppStream implementations will recognize either file type, as long as it ends up in the right location on the filesystem.

###### Note

If you want to hide a desktop-entry file from AppStream metadata generators which synthesize components from desktop-entry data, you may want to add `X-AppStream-Ignore=True` to the `Desktop Entry` section of the .desktop file. Keep in mind that if your .desktop file already has a `NoDisplay=True` key or is not of `Type=Application`, it will always be ignored, unless metainfo file exists that references it (in which case its data may be merged with the metainfo data).

### 2.3.2 File specification #

The basic structure for a generic component as described at Section 2.1.3, “XML Specification” applies. Note that the XML root must have the `type` property set to `desktop-application`, while in a generic component this property can be omitted. This clearly identifies this metainfo document as describing an application.

###### Note

All tags defined in the `generic` component specification are valid for `desktop-application` components as well. An application is just a specialized component, allowing tools like software centers to filter out the component types they want to display.

###### Note

The `desktop-application` component type is the same as the `desktop` component type - `desktop` is the older type identifier for desktop-applications and should not be used for new metainfo files, unless compatibility with very old AppStream tools (pre 2016) is still wanted.

The following list describes the special tags for application upstream metadata and provides some additional information about the values the tags are expected to have. If no information is given about a tag, refer to the respective tag in Section 2.1, “Generic Component”.

<id/> #

  For desktop applications, the `<id/>` tag value must follow the reverse-DNS scheme as described in <id/>.

  ###### Note

  In previous AppStream releases, the `<id/>` was used to associate metainfo files with their .desktop files to merge in data from .desktop files into the AppStream generator's final output. In modern metainfo files, the component-ID for `desktop-application` components can be an arbitrary reverse-DNS string (matching the naming rules applying to all AppStream metadata), while the <launchable/> tag is used to associate .desktop files with their metainfo files.

  Note that even though the component-ID can now be any rDNS name, when updating existing applications, do not change their `<id/>` to drop the .desktop suffix. The rules are relaxed when picking a new component-ID for new applications, but when updating older applications they still need to keep their original `<id/>` (when it's otherwise compliant). The ID is used to uniquely identify applications across distributions and releases and should always remain the same for the same application.

<metadata_license/>

  The `<metadata_license/>` tag as described in <metadata_license/> must be present.

<name/> #

  The human-readable name of the application. This is the name you want users to see prior to installing the application.

<summary/> #

  A short summary on what this application does, roughly equivalent to the `Comment` field of the accompanying `.desktop` file of the application.

<launchable/> #

  It is required that a `<launchable/>` tag is present in `desktop-application` MetaInfo files, unless the MetaInfo data itself contains all required information that a desktop-entry file would have (categories, icon data, ...) and the application can not be launched standalone. This makes the launchable tag a required tag for pretty much all `desktop-application` components, with only very rare exceptions. The tag is described in detail at <launchable/>.

  If only one `launchable` entry of type `desktop-id` is present, AppStream metadata generators might decide to merge metadata from .desktop files referenced by the tag into their final output.

  The `launchable` tag is optional, but if omitted software centers will not be able to launch the application directly after it was installed.

<screenshots/> #

  A screenshot presents your application to the outside world, and could be seen by hundreds or thousands of people.

  The `<screenshots/>` tag should look like it is described at <screenshots/>.

  Screenshot size, shape and format recommendations for applications:

  - All screenshots should have a 16:9 aspect ratio, and should have a width that is no smaller than 620px (software center applications will be able to fill in the screenshots in the space they provide for that more easily then).

    Ideally the window will be resized to a 16:9 aspect ratio, but screenshots can also be cropped if only a small area of the window needs to be shown.

  - Screenshots should ideally be in the PNG format, but JPEG and WebP images are also fine. Keep in mind though that the images are converted into PNG when catalog metadata is generated for a software distribution.

  - Do not scale screenshots below their original size.

  You can find a lot more information on how to create good screenshots in the quickstart guide on applications.

<project_group/>

  This tag is described for generic components at Section 2.1.3, “XML Specification”. You should use it for your application if appropriate.

<provides/> #

  This tag is described in detail for generic components at <provides/>.

  If your application ships a binary in a location in the default `PATH`, you should add at least a child of type `<binary/>` to make that new executable known to the distribution.

<releases/>

  The application metainfo should at least provide one `<releases/>` tag, which has one or more `<release/>` children to define the version and release date of this application. For details, see <releases/> .

For a component of type `desktop-application`, the following tags are required and must always be present: <id/>, <name/>, <summary/>, <description/>, <metadata_license/>, <launchable/>.