- Prev
- Next

## 2.2. AppData XML files

### 2.2.1. Introduction

Every software center that exists allows the user to look at screenshots and a long description of the application before it is installed. For most users it allows them to answer the question “Do I want to install this application?”. Traditionally in Linux distributions, we have none of this data for the vast majority of our desktop user-installable applications. The packages-descriptions are describing all contents of a package, and not just a single application. They are also often written in a technical language and refer to other packages, which makes it hard for beginners to understand what the application they want to install really does. Additionally, if you are not using Debian or Ubuntu, the package descriptions are often untranslated. Also, packages do not provide some metadata users might be interested in before installing an application.
To solve this, we have defined a new data file, which the upstream project can optionally translate using the same technique as Desktop files or GSetting schemas. The AppData specification is a subset of the AppStream metadata (see Section 2.1, “AppStream XML files”).
The AppData files override any values which are automatically fetched by the AppStream data generator. Applications can ship one or more files in `/usr/share/appdata/%{id}.appdata.xml`.

### 2.2.2. File specification

The file should contain something like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <application>
     <id type="desktop">gnome-power-statistics.desktop</id>
     <licence>GPL-2+</licence>
     <name>Power Statistics</name>
     <summary>Observe power management</summary>
     <description>
      <p>
       Power Statistics is a program used to view historical and current battery
       information and will show programs running on your computer using power.
      </p>
      <p>Example list:</p>
      <ul>
       <li>First item</li>
       <li>Second item</li>
      </ul>
      <p>
      You probably only need to install this application if you are having problems
      with your laptop battery, or are trying to work out what programs are using
      significant amounts of power.
      </p>
     </description>
     <screenshots>
      <screenshot type="default" width="800" height="600">http://www.hughsie.com/en_US/main.png</screenshot>
      <screenshot width="800" height="600">http://www.hughsie.com/en_US/preferences.png</screenshot>
     </screenshots>
     <url type="homepage">http://www.gnome.org/projects/en_US/gnome-power-manager</url>
     <project_group>GNOME</project_group>
    </application>

## Warning

This draft is not finished yet and might change in future. If you want to ship AppData files right now, please also take a look at the AppData draft which is currently being implemented by GNOME.

- PrevChapter 2. Application Metadata
- Up
- Home
- NextChapter 3. Services