Difference between revisions of "Flatpak"

From Funtoo
Jump to navigation Jump to search
(Added a slash in front of etc/portage/package.use)
m (Removed redundant use flag changes as the flatpak flag is set by default.)
(3 intermediate revisions by 2 users not shown)
Line 37: Line 37:
$ ##i##flatpak install flathub com.valvesoftware.Steam
$ ##i##flatpak install flathub com.valvesoftware.Steam
}}
}}
*install steam udev rules:
{{console|body=
###i## wget https://raw.githubusercontent.com/ValveSoftware/steam-devices/master/60-steam-input.rules -O /etc/udev/rules.d/60-steam-input.rules
###i## wget https://raw.githubusercontent.com/ValveSoftware/steam-devices/master/60-steam-vr.rules -O /etc/udev/rules.d/60-steam-vr.rules
###i## udevadm control --reload-rules
###i## udevadm trigger
}}
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.
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.
{{console|body=
{{console|body=
# ##i##emerge -av gnome-extra/gnome-software
# ##i##emerge -av gnome-extra/gnome-software
}}
}}
Then add the following line to {{c|/etc/portage/package.use}}:


{{file|name=/etc/portage/package.use|body=
<h2> Updating Flatpak Software </h2>
gnome-extra/gnome-software flatpak
While Flatpak does a good job of installing the latest version of required packages when you manually install them, existing package updates must be triggered manually.
{{console|body=
$ ##i##flatpak update
}}
}}



Revision as of 20:45, May 21, 2023

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.

Prepping the Kernel

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

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

You will also need to ensure that the fuse module is loaded by default. This does not happen automatically using the official debian-sources kernel. To do this, type:

root # modprobe fuse

To make this permanent, add the following line to /etc/conf.d/modules:

   /etc/conf.d/modules
modules="fuse"

Installing Flatpak

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 run the following command, an important note is most Flatpak commands DO NOT need root and can be run as a standard user. To run the commands as a standard user, supply the --user option.

user $ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo --user

Installing Flatpak Software

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

user $ flatpak install flathub com.valvesoftware.Steam
  • install steam udev rules:
root # wget https://raw.githubusercontent.com/ValveSoftware/steam-devices/master/60-steam-input.rules -O /etc/udev/rules.d/60-steam-input.rules
root # wget https://raw.githubusercontent.com/ValveSoftware/steam-devices/master/60-steam-vr.rules -O /etc/udev/rules.d/60-steam-vr.rules
root # udevadm control --reload-rules
root # udevadm trigger

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

Updating Flatpak Software

While Flatpak does a good job of installing the latest version of required packages when you manually install them, existing package updates must be triggered manually.

user $ flatpak update

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.