Fix: Setzt xdg Data dirs.
This commit is contained in:
parent
dc4448a98b
commit
ea45fb6b26
@ -14,13 +14,37 @@ sudo apt update && sudo apt install -y flatpak neovim
|
|||||||
# Flatpak Flathub-Repo hinzufügen
|
# Flatpak Flathub-Repo hinzufügen
|
||||||
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
|
|
||||||
# XDG_DATA_DIRS für Flatpak dauerhaft setzen
|
# XDG_DATA_DIRS für Flatpak setzen in /etc/profile.d/flatpak_env.sh
|
||||||
XDG_CONFIG_FILE="$HOME/.profile"
|
sudo cat << 'EOF' > /etc/profile.d/flatpak.sh
|
||||||
XDG_EXPORT="export XDG_DATA_DIRS=\"/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share:$XDG_DATA_DIRS\""
|
if command -v flatpak > /dev/null; then
|
||||||
if ! grep -Fxq "$XDG_EXPORT" "$XDG_CONFIG_FILE"; then
|
new_dirs=$(
|
||||||
echo "$XDG_EXPORT" >> "$XDG_CONFIG_FILE"
|
(
|
||||||
echo "✅ XDG_DATA_DIRS dauerhaft in .profile gesetzt."
|
unset G_MESSAGES_DEBUG
|
||||||
|
echo "${XDG_DATA_HOME:-"$HOME/.local/share"}/flatpak"
|
||||||
|
GIO_USE_VFS=local flatpak --installations
|
||||||
|
) | (
|
||||||
|
new_dirs=
|
||||||
|
while read -r install_path
|
||||||
|
do
|
||||||
|
share_path=$install_path/exports/share
|
||||||
|
case ":$XDG_DATA_DIRS:" in
|
||||||
|
(*":$share_path:"*) :;;
|
||||||
|
(*":$share_path/:"*) :;;
|
||||||
|
(*) new_dirs=${new_dirs:+${new_dirs}:}$share_path;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo "$new_dirs"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
export XDG_DATA_DIRS
|
||||||
|
XDG_DATA_DIRS="${new_dirs:+${new_dirs}:}${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
|
||||||
|
|
||||||
|
unset new_dirs
|
||||||
fi
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sudo chmod +x /etc/profile.d/flatpak_env.sh
|
||||||
|
|
||||||
# Firefox-Installation
|
# Firefox-Installation
|
||||||
echo "🌍 Firefox wird installiert..."
|
echo "🌍 Firefox wird installiert..."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user