红联Linux门户
Linux帮助

Explore Flatpak in Fedora 24(英文)

发布时间:2016-06-25 11:41:26来源:linux网站作者:linux人

Explore Flatpak in Fedora 24(英文)

One of the main features of Fedora 24 Workstation is better support for Flatpak — a new, distribution agnostic format for packaging and distributing Linux desktop apps. The two main goals of Flatpak are the creation of a single installation file that can distributed to users across distributions, and running apps as isolated from the rest of the system as possible. The probably biggest practical benefit for users is that you can run any app no matter what version of Fedora you’re using.

We covered the Flatpak release announcement a few days ago here on the Fedora Magazine, but if you’ve never heard of Flatpak before that, you may have heard of xdg-app which was a development name for this technology. It was recently renamed to Flatpak to reflect the fact that it’s finally ready for broader usage. Besides Fedora Flatpak is already available in Arch, Debian (Experimental), Mageia, openSUSE (still as xdg-app). There are also personal repositories with Flatpak for Debian Stable and Ubuntu.


How does it work?

A application runs in a sandbox and it has all their dependencies present within the sandbox. The app can use a so-called runtime which is a well-defined environment that provides the app with the most common components of the platform the app is built on. There are currently three distinguished runtimes (GNOME, KDE, FreeDesktop). Dependencies that are missing in the runtime need to be bundled with the app. This way, the app can run pretty much independently on the underlying system.

The sandbox is currently not completely encapsulated. Most apps need to communicate with the rest of the system (load/save files, send notifications, sound/video server,…) and currently there need to be holes in the sandbox to make this possible. But the Flatpak developers are already working on an API that will allow controlled access outside the sandbox and put the user in charge of it. So in the future, the app won’t be able to access your data or hardware without you allowing it.


What apps are available for Flatpak?

GNOME has backed the project from the beginning, so it also provides the longest list of applications available in the form of Flatpak. You can install 17 GNOME apps in stable versions, which means 3.20. These are not very useful for users of Fedora 24 because GNOME 3.20 is included in the release, but it may come handy to Fedora 23 users who are on GNOME 3.18. But GNOME offers even longer list (23) of nightly versions which are going to become GNOME 3.22. So if you’d like to try what’s being brewed for Fedora 25 the GNOME nightly repository for Flatpak offers an easy way to do it.

The other major desktop project – KDE – also offers apps packaged for Flatpak. It’s currently 13 apps. These are also nightly builds.

The Document Foundation provides LibreOffice for Flatpak. It’s 5.2, so again a newer version that you can find in Fedora 24 (5.1).

The official Flatpak website lists other applications that are available in nightly versions: Darktable, GIMP, GTK+3 GIMP, Inkscape, MyPaint. An app, that is not listed on the Flatpak website, but is available for it, is Pitivi.


How to install and run apps?

In Fedora 24, Flatpak is only partly supported in GNOME Software. It will update already installed apps or runtimes or remove them if you’d like to. But to set a repository and install an app, you need to go to the command line and use flatpak command. If you don’t have it installed, just do sudo dnf install flatpak.

To install a Flatpak app it requires a couple of commands, but the respective websites give you step-by-step instructions, so it’s fairly easy even for those who are not very familiar with the command line.

Here is an example how to install a nightly version of a GNOME app:

Download a signing key and set a repository:

$ wget https://sdk.gnome.org/nightly/keys/nightly.gpg
$ flatpak remote-add --gpg-import=nightly.gpg gnome-nightly-apps https://sdk.gnome.org/nightly/repo-apps/

List available apps in the repository:

$ flatpak remote-ls gnome-nightly-apps --app

Install e.g. gedit:

$ flatpak install gnome-nightly-apps org.gnome.gedit master

It should create a standard launcher of the app, but you can also start it from the command line:

$ flatpak run org.gnome.gedit

Note that Flatpak allows to install apps without being a privileged user, just add –user to the commands. Then everything is located in your home directory.

Installing apps in the command line is quite easy, but it’s not the best user experience. In Fedora 25, Flatpak will be fully integrated in GNOME Software and you will just download a .flatpak file, double-click it and Software will take care of the rest.


最适合Linux技术人员使用的操作系统:Fedora 24正式发布下载:http://www.linuxdiyf.com/linux/21756.html


本文永久更新地址:http://www.linuxdiyf.com/linux/21829.html