Skip to content

Commit a89ecb8

Browse files
authored
Merge pull request #3160 from anupras-mohapatra-arm/install-guides
Documentation review of Flatpak install guide
2 parents 9605b72 + 845117b commit a89ecb8

1 file changed

Lines changed: 65 additions & 47 deletions

File tree

content/install-guides/flatpak.md

Lines changed: 65 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: "Flatpak"
33
minutes_to_complete: 10
4-
official_docs: "https://flatpak.org"
4+
official_docs: "https://docs.flatpak.org/en/latest/"
55
author: "Jason Andrews"
6-
description: "Install Flatpak on Arm Linux, add the Flathub remote, and verify the setup by running a native aarch64 application."
6+
description: "Install Flatpak on Arm Linux, add the Flathub remote, and verify the setup by installing and running a native aarch64 application."
77
weight: 1
88
draft: true
99
tool_install: true
@@ -12,29 +12,29 @@ multi_install: false
1212
multitool_install_part: false
1313
---
1414

15-
Flatpak is a framework for distributing Linux applications. It provides distribution-agnostic packaging and a sandboxed runtime, so the same application bundle runs on Ubuntu, Fedora, Arch, and openSUSE without repackaging. [Flathub](https://flathub.org/) is the primary community-maintained repository of Flatpak applications, many of which publish native Arm builds.
15+
[Flatpak](https://flatpak.org/) is a framework for distributing Linux applications. It provides distribution-agnostic packaging and a sandboxed runtime, so the same application bundle runs on Ubuntu, Fedora, Arch, and openSUSE without repackaging. [Flathub](https://flathub.org/) is the primary community-maintained repository of Flatpak applications, many of which publish native Arm builds.
1616

17-
## How does Flatpak sandboxing work?
17+
## How Flatpak sandboxing works
1818

19-
Each Flatpak application runs inside an isolated environment built on three Linux kernel features: namespaces, seccomp, and cgroups. Namespaces give the application its own view of the filesystem, network, and process tree. Seccomp filters restrict the system calls the application can make. Together, these mechanisms prevent an application from reading files outside its sandbox or interfering with other processes on the host.
19+
Each Flatpak application runs inside an isolated environment built on three Linux kernel features: namespaces, secure computing mode (seccomp), and control groups (cgroups). Namespaces give the application its own view of the filesystem, network, and process tree. Seccomp filters restrict the system calls the application can make. Together, these mechanisms prevent an application from reading files outside its sandbox or interfering with other processes on the host.
2020

2121
The sandbox is implemented by [bubblewrap](https://github.com/containers/bubblewrap), a low-level sandboxing tool that Flatpak calls at launch time. Applications declare the permissions they need, such as access to the home directory, the network, or audio devices, in a manifest. You can inspect and override these permissions using `flatpak override`.
2222

23-
## How are Flatpak applications packaged?
23+
## How Flatpak applications are packaged
2424

25-
A Flatpak application is distributed as an OSTree commit, a content-addressed filesystem tree stored in a local repository. When you install an application, Flatpak fetches only the changed objects from the remote, similar to how Git fetches commits. This makes updates efficient even for large applications.
25+
A Flatpak application is distributed as an [OSTree](https://ostreedev.github.io/ostree/introduction/) commit, a content-addressed filesystem tree stored in a local repository. When you install an application, Flatpak fetches only the changed objects from the remote, similar to how Git fetches commits. This makes updates efficient even for large applications.
2626

27-
Applications either bundle their own libraries directly or declare runtime dependencies, such as `org.freedesktop.Platform` or `org.gnome.Platform`. The runtime provides a consistent base set of libraries, such as libc and GTK, that multiple applications can share on disk, reducing total storage. The application and its runtime are kept separate from the host system libraries, which means you don't need to resolve conflicts.
27+
Applications either bundle their own libraries directly or declare runtime dependencies, such as `org.freedesktop.Platform` or `org.gnome.Platform`. The runtime provides a consistent base set of libraries, such as libc and GTK. Multiple applications can share these libraries on disk, reducing total storage. The application and its runtime are kept separate from the host system libraries, which means you don't need to resolve conflicts.
2828

2929
For Arm developers, the key advantage is that Flatpak applications can publish separate builds for `x86_64` and `aarch64` under the same application ID. Flatpak selects the correct architecture automatically at install time.
3030

31-
## How does Flatpak compare to Linux package managers?
31+
## How Flatpak compares to Linux package managers
3232

33-
Linux package managers like `apt`, `dnf`, and `pacman` are tightly coupled to the distribution release cycle. An application packaged for Ubuntu 24.04 may lag the upstream version, and some applications aren't packaged for every Linux distribution. Flatpak addresses this by letting upstream developers publish and maintain their own builds directly on Flathub. This allows you to get the current release of an application on any supported Linux distribution.
33+
Linux package managers such as `apt`, `dnf`, and `pacman` are tightly coupled to the distribution release cycle. An application packaged for Ubuntu 24.04 may lag the upstream version, and some applications aren't packaged for every Linux distribution. Flatpak addresses this by letting upstream developers publish and maintain their own builds directly on Flathub. This allows you to get the current release of an application on any supported Linux distribution.
3434

35-
Because a Flatpak application bundles its own libraries or pins a specific runtime version, installing or updating it can't conflict with host system libraries or break other packages. A distro upgrade won't silently change the libraries an application links against. This also means you can run two different applications that require incompatible versions of the same library side by side without issues.
35+
A Flatpak application bundles its own libraries or pins a specific runtime version. As a result, installing or updating a Flatpak application can't conflict with host system libraries or break other packages. A distro upgrade won't silently change the libraries an application links against. This also means you can run two different applications that require incompatible versions of the same library side by side without issues.
3636

37-
The instructions below cover installing Flatpak on Arm Linux (aarch64), adding the Flathub remote, and verifying the installation by installing VSCodium.
37+
The following instructions cover installing Flatpak on Arm Linux (aarch64), adding the Flathub remote, and verifying the installation by installing and running VSCodium.
3838

3939
## Before you begin
4040

@@ -44,13 +44,15 @@ Confirm your system is running a 64-bit Arm Linux distribution:
4444
uname -m
4545
```
4646

47-
The output should be:
47+
The output is similar to:
4848

4949
```output
5050
aarch64
5151
```
5252

53-
## How do I install Flatpak?
53+
## Install Flatpak
54+
55+
The installation steps depend on your Linux distribution.
5456

5557
### Ubuntu or Debian
5658

@@ -86,23 +88,23 @@ sudo zypper refresh
8688
sudo zypper install -y flatpak
8789
```
8890

89-
After installing, log out and back in to ensure desktop integration works correctly.
91+
After installing, log out and log back in to ensure that the desktop integration works correctly.
9092

91-
## Verify Flatpak is installed
93+
## Confirm Flatpak is available
9294

9395
Confirm Flatpak is available and check the version:
9496

9597
```bash
9698
flatpak --version
9799
```
98100

99-
The output will look similar to:
101+
The output is similar to:
100102

101103
```output
102104
Flatpak 1.16.1
103105
```
104106

105-
## How do I add the Flathub remote?
107+
## Add Flathub as a remote source
106108

107109
Add the Flathub repository as a remote source:
108110

@@ -123,17 +125,17 @@ Name Options
123125
flathub system
124126
```
125127

126-
## How do I install the VSCodium Flatpak?
128+
## Verify Flatpak installation by installing and running VSCodium
127129

128-
[VSCodium](https://vscodium.com/) is the telemetry-free build of VS Code, available on Flathub with a native Arm build, making it a useful application to test.
130+
[VSCodium](https://vscodium.com/) is the telemetry-free build of VS Code that's available on Flathub with a native Arm build. This makes it a useful application to test Flatpak with.
129131

130-
Install it with the `--assumeyes` flag, which automatically answers yes to any prompts during installation:
132+
Install VSCodium with the `--assumeyes` flag, which automatically answers yes to any prompts during installation:
131133

132134
```bash
133135
flatpak install --assumeyes flathub com.vscodium.codium
134136
```
135137

136-
Confirm the installation and check the architecture:
138+
Confirm the VSCodium installation and check the architecture:
137139

138140
```bash
139141
flatpak info com.vscodium.codium
@@ -163,55 +165,80 @@ Installation: system
163165
Date: 2026-03-30 05:03:53 +0000
164166
```
165167

166-
The `Arch: aarch64` line confirms a native Arm build is installed.
168+
The `Arch: aarch64` line in the output confirms that you installed a native Arm build.
167169

168-
To start VSCodium on the project in your current directory, run:
170+
To run VSCodium on a project in your current directory, run:
169171

170172
```bash
171173
flatpak run com.vscodium.codium . &
172174
```
175+
{{% notice Tip %}}
173176

174-
You can also create an alias to make it easier:
177+
You can create an alias to make starting a project easier:
175178

176179
```bash
177180
alias codium='flatpak run com.vscodium.codium'
178181
```
179182

180-
Now, run using the alias:
183+
To run VSCodium using the alias, run:
181184

182185
```bash
183186
codium . &
187+
```
188+
{{% /notice %}}
189+
190+
By using Flatpak to install and run VSCodium successfully, you've verified that the Flatpak installation was a success.
191+
192+
## Find Arm-native applications on Flathub
193+
194+
You can now use Flatpak to install Arm-native applications. Flatpak makes it straightforward to discover which applications support aarch64. Visit the [Flathub app browser](https://flathub.org/apps) and filter by architecture to find applications with native Arm builds. You can also search from the command line after adding the Flathub remote:
195+
196+
```bash
197+
flatpak remote-ls --app --arch=aarch64 flathub
184198
```
185199

186-
## What are some other useful Flatpak commands?
200+
The command lists every application on Flathub that publishes a native aarch64 build. Use `grep` to narrow results by name or category.
201+
202+
## Troubleshoot Flatpak issues
203+
204+
You can use the following commands to troubleshoot issues with Flatpak.
205+
206+
### Fix a corrupted, incomplete, or outdated installation
187207

188-
If an installation becomes corrupted or incomplete, run `flatpak repair` to check your local Flatpak installation and fix any inconsistencies:
208+
If a Flatpak installation becomes corrupted or incomplete, run the following command to check your local Flatpak installation and fix any inconsistencies:
189209

190210
```bash
191211
flatpak repair
192212
```
193-
194-
To update all installed Flatpak applications and runtimes to their latest versions, run:
213+
To keep all installed Flatpak applications and runtimes up-to-date, run:
195214

196215
```bash
197216
flatpak update
198217
```
199218

200-
To inspect the sandbox permissions granted to an application, run:
219+
### Debug application permission or runtime issues
220+
221+
If you need to inspect the sandbox permissions granted to a Flatpak application, run:
201222

202223
```bash
203224
flatpak info --show-permissions com.vscodium.codium
204225
```
226+
The example command returns the sandbox permissions granted to VSCodium installed in the previous step. To adapt the command for your use case, replace `com.vscodium.codium` with your application's identifier.
205227

206-
To open an interactive shell inside an application's sandbox, which is useful for debugging permission or runtime issues, run:
228+
Opening an interactive shell inside a Flatpak application's sandbox is useful for debugging permission or runtime issues. To do so, run:
207229

208230
```bash
209231
flatpak run --command=bash com.vscodium.codium
210232
```
233+
The example command opens a shell in VSCodium's sandbox. To adapt the command for your use case, replace `com.vscodium.codium` with your application's identifier.
234+
235+
{{% notice Note %}}
236+
Not all applications include `bash` in their sandbox, so this command may not work for every Flatpak application. In such cases, your shell prompt may not look any different, but you are in the sandbox.
237+
{{% /notice %}}
211238

212-
Note that not all applications include `bash` in their sandbox, so this command may not work for every Flatpak. Your shell prompt may not look any different, but you are in the sandbox. To confirm run:
239+
To confirm that the shell is open, run:
213240

214-
```bash
241+
```bash
215242
ls /app
216243
cat /etc/os-release
217244
```
@@ -228,21 +255,11 @@ PRETTY_NAME="Freedesktop SDK 25.08 (Flatpak runtime)"
228255
BUG_REPORT_URL=https://gitlab.com/freedesktop-sdk/freedesktop-sdk/issues
229256
```
230257

231-
The `/app` directory contains the application runtime files, and the `os-release` file shows the Flatpak runtime rather than the host OS.
232-
233-
## How can I find Arm-native applications on Flathub?
234-
235-
Flatpak makes it straightforward to discover which applications support aarch64. Visit the [Flathub app browser](https://flathub.org/apps) and filter by architecture to find applications with native Arm builds. You can also search from the command line after adding the Flathub remote:
236-
237-
```bash
238-
flatpak remote-ls --app --arch=aarch64 flathub
239-
```
240-
241-
This lists every application on Flathub that publishes a native aarch64 build. Use `grep` to narrow results by name or category.
258+
The `/app` directory contains the application runtime files. The `os-release` file shows the Flatpak runtime rather than the host OS.
242259

243-
## Uninstall
260+
## Clean up
244261

245-
To remove VSCodium, run:
262+
To uninstall VSCodium, run:
246263

247264
```bash
248265
flatpak uninstall --assumeyes com.vscodium.codium
@@ -253,3 +270,4 @@ To remove the Flathub remote, run:
253270
```bash
254271
sudo flatpak remote-delete flathub
255272
```
273+

0 commit comments

Comments
 (0)