mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-10 18:08:07 -04:00
Append flatpak data dirs if XDG_DATA_DIRS is already set (#611)
* Append flatpak data dirs if XDG_DATA_DIRS is already set
Otherwise it will be impossible to run flatpak apps from desktop menus.
This issue can happen if another app (e.g. snapd) wants to add custom
folders to XDG_DATA_DIRS through /etc/profile.d
If XDG_DATA_DIRS is empty or unset, define it as before.
Fixes #606
(cherry picked from commit a9acdc0532)
This commit is contained in:
committed by
Alexander Larsson
parent
870ee12a74
commit
e536497d3f
@@ -1,4 +1,11 @@
|
||||
# @sysconfdir@/profile.d/flatpak.sh - set XDG_DATA_DIRS
|
||||
|
||||
XDG_DATA_DIRS="${XDG_DATA_DIRS:-$HOME/.local/share/flatpak/exports/share:@localstatedir@/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/}"
|
||||
flatpak_dirs=$HOME/.local/share/flatpak/exports/share/:@localstatedir@/lib/flatpak/exports/share/
|
||||
|
||||
if [ -z "${XDG_DATA_DIRS}" ]; then
|
||||
XDG_DATA_DIRS="$flatpak_dirs:/usr/local/share/:/usr/share/"
|
||||
else
|
||||
XDG_DATA_DIRS="$XDG_DATA_DIRS:$flatpak_dirs"
|
||||
fi
|
||||
|
||||
export XDG_DATA_DIRS
|
||||
|
||||
Reference in New Issue
Block a user