Jump to content

Tutorials/Flatpak: Difference between revisions

From KDE Wiki Sandbox
Claus chr (talk | contribs)
Use templates for console text
Dduca (talk | contribs)
mNo edit summary
 
(12 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Flatpak is a solution for creating sandboxed software builds for GNU/Linux systems. You can find more information [http://flatpak.org/ here]. To learn about creating flatpaks, see our [https://develop.kde.org/docs/build/flatpak/ flatpak tutorial].
<languages />
<translate>


== Applications ==
<!--T:1-->
Flatpak is a solution for creating sandboxed software builds for GNU/Linux systems. You can find more information [https://flatpak.org/ here]. To learn about creating flatpaks, see our [https://develop.kde.org/docs/build/flatpak/ flatpak tutorial].


We are building release versions of most KDE applications and distributing them on flathub, https://flathub.org.
== KDE apps on Flathub == <!--T:2-->
We are also building "nightly" versions of most KDE applications and distributing them from the kdeapps remote at https://distribute.kde.org. The latter builds the latest source code of the application, so expect some unstable development quirks; on the bright side, if you find one, you get to tell the developers so they can fix it!


The "app store" or software center in many distributions is able to install Flatpaks.
<!--T:3-->
You can simply open the flatpakrepo files with Discover or your otherwise favorite software center:
We are building release versions of most KDE applications and distributing them on [https://flathub.org Flathub].
* https://flathub.org/repo/flathub.flatpakrepo
* https://distribute.kde.org/kdeapps.flatpakrepo
and then when you search for a KDE application it should offer to install the flatpak version.


<!--T:4-->
The "app store" or software center in many distributions (usually Discover on KDE Plasma) is able to install Flatpaks. You can follow the [https://flatpak.org/setup/ Flathub guide] to setup Flatpak and Flathub on your system.
<!--T:5-->
You can then search for a KDE application and it should offer to install the Flatpak version.
<!--T:6-->
You may also directly open the [https://flathub.org/repo/flathub.flatpakrepo flatpakrepo] file with Discover or your otherwise favorite software center.
<!--T:7-->
Here's how to install a Flatpak application from the terminal:
Here's how to install a Flatpak application from the terminal:
</translate>
{{Input|
{{Input|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists kdeapps https://distribute.kde.org/kdeapps.flatpakrepo
flatpak install flathub org.kde.okular
flatpak install kdeapps org.kde.okular
}}
}}


If you added both the Flathub and kdeapps repos, the <code>flatpak</code> command-line tool will prompt you which one you want, something like:
<translate>
{{Output|
<!--T:8-->
flatpak install okular
== Using Flatpak applications ==
Looking for matches…
After you install a Flatpak application, you can start it from the Plasma application launcher the same as other applications.
Remotes found with refs similar to ‘okular’:
 
 
<!--T:9-->
1) ‘flathub’ (system)
From the terminal, you can run an installed Flatpak application:
2) ‘kdeapps’ (system)
{{Input|
 
flatpak run org.kde.okular
Which do you want to use (0 to abort)? [0-2]: 2
Found ref ‘app/org.kde.okular/x86_64/master’ in remote ‘kdeapps’ (system).
Use this ref? [Y/n]: y
}}
}}


=== Using Flatpak Applications ===
<!--T:10-->
and update it to the latest version:


Once a flatpak package is installed, it can be run with
</translate>
{{Input|
{{Input|
flatpak run org.kde.okular
flatpak update org.kde.okular
}}
}}


and be updated to the latest version with
<translate>
== Nightly KDE apps == <!--T:12-->
 
<!--T:13-->
We are also building "nightly" versions of most KDE applications and distributing them at [https://cdn.kde.org/flatpak cdn.kde.org/flatpak]. Nightly versions build the latest source code of the application, so expect some unstable development quirks; on the bright side, if you find one, you get to tell the developers so they can fix it!
 
<!--T:14-->
Every app has its own flatpak repository usually named {{Path |<appname>-nightly}}. For every app there is a flatpakref file ({{Path |<appid>.flatpakref}}) inside the repository which you can easily download and open with your software center for installation.


<!--T:15-->
It is also possible to install the app from the terminal, for example:
</translate>
{{Input|
{{Input|
flatpak update org.kde.okular
flatpak install --user --or-update https://cdn.kde.org/flatpak/kde-runtime-nightly/org.kde.Platform.flatpakref
flatpak uninstall --user -y org.kde.kalzium
flatpak install --user --or-update https://cdn.kde.org/flatpak/kalzium-nightly/org.kde.kalzium.flatpakref
}}
}}


<translate>
<!--T:16-->
[[Category:System]]
[[Category:System]]
</translate>
[[Category:Needs work]]
[[Category:Needs work]]

Latest revision as of 18:29, 25 February 2024

Flatpak is a solution for creating sandboxed software builds for GNU/Linux systems. You can find more information here. To learn about creating flatpaks, see our flatpak tutorial.

KDE apps on Flathub

We are building release versions of most KDE applications and distributing them on Flathub.

The "app store" or software center in many distributions (usually Discover on KDE Plasma) is able to install Flatpaks. You can follow the Flathub guide to setup Flatpak and Flathub on your system.

You can then search for a KDE application and it should offer to install the Flatpak version.

You may also directly open the flatpakrepo file with Discover or your otherwise favorite software center.

Here's how to install a Flatpak application from the terminal:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.kde.okular

Using Flatpak applications

After you install a Flatpak application, you can start it from the Plasma application launcher the same as other applications.

From the terminal, you can run an installed Flatpak application:

flatpak run org.kde.okular

and update it to the latest version:

flatpak update org.kde.okular

Nightly KDE apps

We are also building "nightly" versions of most KDE applications and distributing them at cdn.kde.org/flatpak. Nightly versions build the latest source code of the application, so expect some unstable development quirks; on the bright side, if you find one, you get to tell the developers so they can fix it!

Every app has its own flatpak repository usually named <appname>-nightly. For every app there is a flatpakref file (<appid>.flatpakref) inside the repository which you can easily download and open with your software center for installation.

It is also possible to install the app from the terminal, for example:

flatpak install --user --or-update https://cdn.kde.org/flatpak/kde-runtime-nightly/org.kde.Platform.flatpakref
flatpak uninstall --user -y org.kde.kalzium
flatpak install --user --or-update https://cdn.kde.org/flatpak/kalzium-nightly/org.kde.kalzium.flatpakref