注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Flatpak

From Funtoo
Revision as of 10:23, April 17, 2020 by Fenixfeniks (talk | contribs) (added missing category)
Jump to navigation Jump to search

Flatpak is a container based method of using software. Flatpak software once installed works on any linux distribution as long as you have the Flatpak framework installed.

Installing

This guide is based off of the one created by Sakaki on github found here. Their guide is meant for an RPi install of Gentoo.

Prepping the Kernel

Run the following command and reboot the machine to enable kernel to generate namespaces for non-root users.

root # echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/unprivileged_userns_clone.conf

Setting up the Overlay

Run the following command and add the following info before saving.

root # nano -w /etc/portage/repos.conf/flatpak-overlay.conf
   /etc/portage/repos.conf/flatpak-overlay.conf - An example flatpak-overlay file
[flatpak-overlay]
priority = 50
location = /usr/local/portage/flatpak-overlay
sync-type = git
sync-uri = https://github.com/fosero/flatpak-overlay.git
auto-sync = Yes


You will also need to edit the categories file and add the following.

root # nano -w /etc/portage/categories
   /etc/portage/categories - An example categories file
acct-group
acct-user

Without this change to the /etc/portage/categories Flatpak will not install correctly and can cause compatibility issues with any flatpak software.


You do need to update the /etc/portage/package.accept_keywords file with the following information.

root # nano -w /etc/portage/package.accept_keywords
   /etc/portage/package.accept_keywords - An example package.accept_keywords file
# required by flatpak
sys-apps/flatpak * ~*
# dependencies of flatpak
acct-group/flatpak * ~*
acct-user/flatpak * ~*
dev-util/flatpak-builder * ~*
sys-apps/xdg-desktop-portal-gtk * ~*
sys-fs/libostree * ~*


At this point you will want to update your repos with ego sync

root # ego sync


You can now install Flatpak with the following command.

root # emerge -v sys-apps/flatpak

Setting up the Flathub Repos

To add the Flathub repo to Flatpak you just need to tun the following command, an important note is most Flatpak commands DO NOT need root and can be run as a standard user.

FenixFeniks # flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Installing Flatpak Software

For funtoo most of the time you would install the Flatpak software through the terminal like so:

FenixFeniks # flatpak install flathub com.valvesoftware.Steam

All of the software from the Flathub repo has the terminal commands listed on their individual pages on the Flatpak website. If you install gnome-extra/gnome-software you can have a graphical interface for installing the software locally.

root # emerge -av gnome-extra/gnome-software

Important Notes for Nvidia Driver Users

During the installation of applications like Steam through the terminal after first install of Flatpak, Flatpak should detect that you are using the Nvidia drivers and have you select the correct one for it to use from the list. Make sure you select the driver that matches your system's driver. This has not been tested if you are installing software for the first time with gnome-software.