Flatpak: Difference between revisions

From Alpine Linux
mNo edit summary
(added a section for audio issues and their fixes (WIP))
Line 1: Line 1:
{{Draft|More documentation and testing required.}}
Flatpak is a technology for building and distributing desktop applications on GNU/Linux.
Flatpak is a technology for building and distributing desktop applications on GNU/Linux.


Line 6: Line 8:
** [[KDE]] (based on the Freedesktop runtime)
** [[KDE]] (based on the Freedesktop runtime)
These are all hosted on [https://flathub.org/ Flathub.org].
These are all hosted on [https://flathub.org/ Flathub.org].
== Fixing Audio Issues ==
If you have a minimal setup and don't have access to audio devices you will need to set the XDG_RUNTIME_DIR variable. Save the following script in /etc/profile.d/xdg_runtime_dir.sh and re-login to have it set up properly.
if test -z "${XDG_RUNTIME_DIR}"; then
  export XDG_RUNTIME_DIR=/tmp/$(id -u)
  if ! test -d "${XDG_RUNTIME_DIR}"; then
    mkdir -p "${XDG_RUNTIME_DIR}"
    chmod 0700 "${XDG_RUNTIME_DIR}"
  fi
fi
When you launch a Flatpak you will need to start pulseaudio as well:
{{Cmd|pulseaudio --start && flatpak run com.example.Example}}
Note: many Flatpaks require dbus and pulseaudio, using apulse or pipewire will need testing.


= =
= =

Revision as of 21:16, 21 September 2020

This material is work-in-progress ...

More documentation and testing required.
(Last edited by Atka on 21 Sep 2020.)

Flatpak is a technology for building and distributing desktop applications on GNU/Linux.

There are currently 3 main runtimes available:

These are all hosted on Flathub.org.

Fixing Audio Issues

If you have a minimal setup and don't have access to audio devices you will need to set the XDG_RUNTIME_DIR variable. Save the following script in /etc/profile.d/xdg_runtime_dir.sh and re-login to have it set up properly.

if test -z "${XDG_RUNTIME_DIR}"; then
  export XDG_RUNTIME_DIR=/tmp/$(id -u)
  if ! test -d "${XDG_RUNTIME_DIR}"; then
    mkdir -p "${XDG_RUNTIME_DIR}"
    chmod 0700 "${XDG_RUNTIME_DIR}"
  fi
fi

When you launch a Flatpak you will need to start pulseaudio as well:

pulseaudio --start && flatpak run com.example.Example

Note: many Flatpaks require dbus and pulseaudio, using apulse or pipewire will need testing.