Flatpak: Difference between revisions
Eddsalkield (talk | contribs) |
Eddsalkield (talk | contribs) (→Setup / Installation: Fix instructions for local user accounts) |
||
Line 7: | Line 7: | ||
''From: https://flatpak.org/setup/Alpine/'' | ''From: https://flatpak.org/setup/Alpine/'' | ||
To install Flatpak you will need to enable the Community repository, See: [https://wiki.alpinelinux.org/wiki/Post_installation#Repositories Post Installation - Repositories] | To install Flatpak you will need to enable the Community repository, See: [https://wiki.alpinelinux.org/wiki/Post_installation#Repositories Post Installation - Repositories] | ||
To install Flatpak run: | To install Flatpak run: | ||
Line 18: | Line 14: | ||
{{cmd|# apk add flatpak}} | {{cmd|# apk add flatpak}} | ||
It's recommended to run flatpak as your user, rather than as root. Therefore, add your user to the flatpak group: | |||
{{cmd|# adduser <YourUsername> flatpak}} | |||
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}} | |||
Now reboot to complete setup | Now reboot to complete setup | ||
{{Note|graphical installation of Flatpak apps may not be possible with Alpine.}} | {{Note|graphical installation of Flatpak apps may not be possible with Alpine.}} |
Revision as of 12:51, 23 December 2021
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 you will need to enable the Community repository, See: Post Installation - Repositories
To install Flatpak run:
# apk add flatpak
It's recommended to run flatpak as your user, rather than as root. Therefore, add your user to the flatpak group:
# adduser <YourUsername> 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:
adduser <YourUsername> flatpak
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
Links