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:
parent
b20373213d
commit
552b6de862
@ -6,6 +6,15 @@
|
||||
# - directories stored on /rw in case of "rw-only" persistence
|
||||
# - 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
|
||||
XDG_DATA_HOME="$HOME/.local/share"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user