# Desktop Applications

## Introduction

A desktop application is an application which has a graphical user interface and is commonly used with mouse and keyboard. It also ships a Freedesktop `.desktop` file to be visible in application menus.

AppStream generators may pull data from the preexisting `.desktop` files to represent an application in the AppStream metadata pool. Upstream projects should ship a small XML 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 ).

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}.appdata.xml`.

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

## File specification

The basic structure for a generic component as described at 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.

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.

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 .

<id/>

  For applications, the `<id/>` tag value must be the same name as the installed `.desktop` file for the application, the `.desktop` suffix of the filename may be omitted.

  Usually, modern `.desktop` files follow the reverse-DNS scheme name already. If they do not follow the scheme, it is strongly recommended to change the `.desktop` filename. Refer to the desktop entry specification for more information.

  Example: If your application's `.desktop` file is named `org.example.FooBar.desktop` the component-id must be `org.example.FooBar` (or `org.example.FooBar.desktop`). If your application's `.desktop` file is named `frobnicator.desktop` the component-id must be `frobnicator` (or `frobnicator.desktop`) - it is highly recommended to modernize the .desktop filename to follow the Desktop Entry specification in these cases though.

<metadata_license/>

  The `<metadata_license/>` tag as described in 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.

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

  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 be in PNG or JPEG format. PNG is the preferred format; JPEG should only be used when screenshots include large photographs or other images where a lossy format like JPEG may compress better.

  - 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 . You should use it for your application if appropriate.

<provides/>

  This tag is described in detail for generic components at .

  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/>` childs to define the version and release date of this application. For details, see .

For a component of type `desktop-application`, the following tags are required and must always be present: , , , , .