GetAppmenus: ensure right app directories
The script depends on XDG_DATA_DIRS environment variable being set up correctly, which is not the case when it is running under sudo. As a result, a post-install trigger for apt could remove application entries from other sources (Snap, Flatpak). Fixes QubesOS/qubes-issues#5477.
This commit is contained in:
父節點
b20373213d
當前提交
552b6de862
@ -6,6 +6,15 @@
|
|||||||
# - directories stored on /rw in case of "rw-only" persistence
|
# - directories stored on /rw in case of "rw-only" persistence
|
||||||
# - nothing, otherwise
|
# - nothing, otherwise
|
||||||
|
|
||||||
|
# Reload scripts in /etc/profile.d/, in case they register additional
|
||||||
|
# directories in XDG_DATA_DIRS and we forgot them
|
||||||
|
# (e.g. because we are running under sudo).
|
||||||
|
for i in /etc/profile.d/*.sh ; do
|
||||||
|
if [ -r "$i" ]; then
|
||||||
|
. "$i" >/dev/null
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if [ -z "$XDG_DATA_HOME" ]; then
|
if [ -z "$XDG_DATA_HOME" ]; then
|
||||||
XDG_DATA_HOME="$HOME/.local/share"
|
XDG_DATA_HOME="$HOME/.local/share"
|
||||||
fi
|
fi
|
||||||
|
載入中…
新增問題並參考
Block a user