elementary / os-patches

Patched packages for elementary OS and the tools that keep them up-to-date
GNU General Public License v3.0
18 stars 11 forks source link

Include Flatpak's `/exports/bin` Directories in PATH #229

Open Marukesu opened 2 years ago

Marukesu commented 2 years ago

Problem

Right now if an user want to open an flatpak application via terminal, they need to use the flatpak run/flatpak --user run command, however, Flatpak have an exports/bin directory in every installation folder that include scripts to launch the apps using the application id.

Since the elementary position is to prefer flatpak applications, we should include theses directories in the PATH variable, for covenience of users and applications targeted to be used via CLI.

Proposal

We should add $XDG_DATA_HOME/flatpak/exports/bin and /var/lib/flatpak/exports/bin to the PATH environment with the user installation first, so that it's preferred over the system one (similar to how apps in /usr/local/bin is preferred over the ones in /usr/bin).

Something to consider is if we should prepend, append, or put them in specifics places in the PATH.

Prior Art (Optional)

Canonical appends the /snap/bin directory in the /etc/environment file.