Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]

5.2 URI Handler

5.2.1 Introduction

In order to allow installation of AppStream components from websites, software-centers implementing AppStream may choose to also support the appstream: URIs.

This allows upstream projects to trigger an installation of their application from their homepage on any supporting distribution. It also is helpful for web-based software-centers.

5.2.2 URI schema

Software centers handling appstream: URIs should provide a handler for the x-scheme-handler/appstream mimetype. An AppStream URI follows the schema appstream:%{component-id}.

If a component is known by multiple alternative IDs, more component IDs may be defined in a comma-separated list in the query component of the URI using the alt key. This may be necessary if an application has switched its ID, but the same URI may be called on systems which still only know the old ID. Software centers must try to find the initial ID first and, failing to find it in their catalog, may try the alternative IDs in order of appearance in the query.

Example HTML code:

<a href="appstream:org.kde.discover.desktop">Install KDE Discover</a>
<a href="appstream:org.gnome.Software.desktop">Install GNOME-Software</a>
<a href="appstream:org.freedesktop.appstream.cli">Install AppStreamCLI</a>
<a href="appstream:org.example.foo?alt=com.github.darthvader.foo,net.launchpad.vader.foo">Install Foo</a>

5.2.3 AppStream Buttons

If you want to allow users to open your software in their local software center from your website, you might want to use one of the easily recognizable AppStream buttons for your appstream: link.