Skip to content

Commit

Permalink
Consolidate freedesktop-quick-reference and conventions page
Browse files Browse the repository at this point in the history
Delete the former as most of the content is now in conventions page.

Also add more info about Flatpak icon/desktopfile exports
  • Loading branch information
bbhtt authored and TingPing committed Feb 2, 2024
1 parent 4ef5faa commit ced51bd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 118 deletions.
29 changes: 28 additions & 1 deletion docs/conventions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ icons are of size ``scalable``::

/app/share/icons/hicolor/scalable/apps/org.gnome.Dictionary.svg

Flatpak will export the following icon name patterns:
``$FLATPAK_ID, $FLATPAK_ID.foo, $FLATPAK_ID-foo``. They may end with an
extension suffix like ``.png, .svg``. Exported icons can be found in the
``icons`` subfolder of ``$HOME/.local/share/flatpak/exports/share`` or
``/var/lib/flatpak/exports/share`` depending on system or user install.

The distribution usually appends those paths to ``$XDG_DATA_DIRS`` on
host when installing the ``flatpak`` package. Unless an icon is exported
by Flatpak, host applications cannot access it.

Desktop files
`````````````

Expand All @@ -137,14 +147,31 @@ A minimal desktop file should contain at least the application's *name*,

[Desktop Entry]
Name=Gnome Dictionary
Exec=org.gnome.Dictionary
Exec=gnome-dictionary
Type=Application
Icon=org.gnome.Dictionary
Categories=Office;Dictionary;

The ``desktop-file-validate`` command can be used to check for errors in
desktop files.

The ``Exec`` key of the desktop files is rewritten by Flatpak when installing
an app. The original value of the key becomes the value of the ``--command``
argument like so::

Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=gnome-dictionary org.gnome.Dictionary

Flatpak will export the following desktop filename patterns:
``$FLATPAK_ID.desktop, $FLATPAK_ID.foo.desktop, $FLATPAK_ID-foo.desktop``.
Exported desktop files can be found in the ``applications`` subfolder of
``$HOME/.local/share/flatpak/exports/share`` or
``/var/lib/flatpak/exports/share`` depending on system or
user install.

The distribution usually appends those paths to ``$XDG_DATA_DIRS`` on
host when installing the ``flatpak`` package. Unless a desktop file is
exported by Flatpak, host applications cannot access it.

Exporting through extra-data
----------------------------

Expand Down
116 changes: 0 additions & 116 deletions docs/freedesktop-quick-reference.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Reference documentation for flatpak, flatpak-builder and libflatpak.
flatpak-builder-command-reference
available-runtimes
sandbox-permissions-reference
freedesktop-quick-reference
under-the-hood
libflatpak-api-reference
portal-api-reference

0 comments on commit ced51bd

Please sign in to comment.