Flatpak: Difference between revisions
(reword permission group error) |
(some small formatting changes, content unchanged) |
||
Line 4: | Line 4: | ||
= Setup / Installation = | == Setup / Installation == | ||
''From: https://flatpak.org/setup/Alpine/'' | ''From: https://flatpak.org/setup/Alpine/'' | ||
Line 12: | Line 12: | ||
To install Flatpak run: | To install Flatpak run: | ||
{{cmd|# apk add flatpak}} | {{cmd|# apk add {{Pkg|flatpak}}}} | ||
Next you need to add a repository, for this guide we will use the recommended repository, [https://flathub.org Flathub]. | Next you need to add a repository, for this guide we will use the recommended repository, [https://flathub.org Flathub]. | ||
{{cmd|flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo}} | {{cmd|$ flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo}} | ||
Now reboot to complete setup | Now reboot to complete setup | ||
Line 22: | Line 22: | ||
{{Note|graphical installation of Flatpak apps may not be possible with Alpine.}} | {{Note|graphical installation of Flatpak apps may not be possible with Alpine.}} | ||
= Usage = | == Usage == | ||
To get all of the available options to use with the '''flatpak''' command run: '''flatpak --help''' or '''flatpak -h''', | To get all of the available options to use with the '''flatpak''' command run: '''flatpak --help''' or '''flatpak -h''', | ||
=== Search === | |||
To search for applications run '''flatpak search <appplicationname>''' | To search for applications run '''flatpak search <appplicationname>''' | ||
Example: | Example: | ||
{{cat|flatpak search chromium|Name Description Application ID Version Branch Remotes | |||
{{cat|$ flatpak search chromium|Name Description Application ID Version Branch Remotes | |||
Chromium Web Browser The web browser from Chromium project org.chromium.Chromium 96.0.4664.93 stable flathub | Chromium Web Browser The web browser from Chromium project org.chromium.Chromium 96.0.4664.93 stable flathub | ||
Chromium B.S.U. Fast paced, arcade-style, top-scrolling space shooter net.sourceforge.chromium-bsu 0.9.16.1 stable flathub | Chromium B.S.U. Fast paced, arcade-style, top-scrolling space shooter net.sourceforge.chromium-bsu 0.9.16.1 stable flathub | ||
Line 42: | Line 41: | ||
<br> | <br> | ||
=== Install === | |||
To install a package run '''flatpak install <applicationname>''' | To install a package run '''flatpak install <applicationname>''' | ||
Line 78: | Line 77: | ||
Which do you want to use (0 to abort)? [0-5]:}} | Which do you want to use (0 to abort)? [0-5]:}} | ||
=== Remove === | |||
To remove a package run: '''flatpak remove <applicationname>''' | To remove a package run: '''flatpak remove <applicationname>''' | ||
Line 103: | Line 101: | ||
Which do you want to use (0 to abort)? [0-3]:}} | Which do you want to use (0 to abort)? [0-3]:}} | ||
= Developers = | == Developers == | ||
* [https://docs.flatpak.org/en/latest/available-runtimes.html Flatpak - available runtimes] | * [https://docs.flatpak.org/en/latest/available-runtimes.html Flatpak - available runtimes] | ||
Line 111: | Line 108: | ||
These are all hosted on [https://flathub.org/ Flathub.org]. | These are all hosted on [https://flathub.org/ Flathub.org]. | ||
==== Permission errors | == Troubleshooting == | ||
=== Permission errors === | |||
If you receive errors about permissions then you may need to add your user to the '''flatpak''' group. | If you receive errors about permissions then you may need to add your user to the '''flatpak''' group. | ||
Line 120: | Line 118: | ||
=== 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 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 {{Path|/etc/profile.d/xdg_runtime_dir.sh}} and re-login to have it set up properly. | ||
if test -z "${XDG_RUNTIME_DIR}"; then | if test -z "${XDG_RUNTIME_DIR}"; then | ||
Line 131: | Line 127: | ||
When you launch a Flatpak you will need to start pulseaudio as well: | When you launch a Flatpak you will need to start pulseaudio as well: | ||
{{Cmd|$ pulseaudio --start && flatpak run com.example.Example}} | |||
= Links = | == Links == | ||
* [https://flatpak.org/ Flatpak] | * [https://flatpak.org/ Flatpak] | ||
* [https://flathub.org/ Flathub] | * [https://flathub.org/ Flathub] | ||
* [https://winepak.github.io/ Winepak] | * [https://winepak.github.io/ Winepak] | ||
[[Category:Package Manager]] | [[Category:Package Manager]] | ||
[[Category: Desktop]] | [[Category: Desktop]] |
Revision as of 08:31, 1 June 2023
This material is work-in-progress ... More documentation and testing is needed, but everything currently here should be safe to follow. |
Flatpak is a technology for building and distributing applications with the goal of having a universal package format for all Linux distributons, it is similar to Snap,
Setup / Installation
From: https://flatpak.org/setup/Alpine/
To install Flatpak run:
# apk add flatpak
Next you need to add a repository, for this guide we will use the recommended repository, Flathub.
$ flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Now reboot to complete setup
Usage
To get all of the available options to use with the flatpak command run: flatpak --help or flatpak -h,
Search
To search for applications run flatpak search <appplicationname>
Example:
Contents of $ flatpak search chromium
Install
To install a package run flatpak install <applicationname>
Contents of $ flatpak install com.github.Eloston.UngoogledChromium
or if you dont know or dont want to type the exact package name:
Contents of $ flatpak install chromium
Remove
To remove a package run: flatpak remove <applicationname>
Contents of $ flatpak remove com.github.Eloston.UngoogledChromium
or if you dont know or dont want to type the exact package name:
Contents of $ flatpak remove chromium
Developers
These are all hosted on Flathub.org.
Troubleshooting
Permission errors
If you receive errors about permissions then you may need to add your user to the flatpak group.
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) fi
When you launch a Flatpak you will need to start pulseaudio as well:
$ pulseaudio --start && flatpak run com.example.Example