blob: 73f3df14e8e270e3df0ecc0151bd753a4a881158 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# This file is sourced by Xsession(5), not executed.
# Add additional xdg paths depending on selected desktop session
DEFAULT_XDG_CONFIG_DIRS='/etc/xdg'
DEFAULT_XDG_DATA_DIRS='/usr/local/share/:/usr/share/'
if [ -n "$DESKTOP_SESSION" ]; then
# readd default if was empty
if [ -z "$XDG_CONFIG_DIRS" ]; then
XDG_CONFIG_DIRS="$DEFAULT_XDG_CONFIG_DIRS"/xdg-"$DESKTOP_SESSION":"$DEFAULT_XDG_CONFIG_DIRS"
elif [ -n "${XDG_CONFIG_DIRS##*$DEFAULT_XDG_CONFIG_DIRS/xdg-$DESKTOP_SESSION*}" ]; then
XDG_CONFIG_DIRS="$DEFAULT_XDG_CONFIG_DIRS"/xdg-"$DESKTOP_SESSION":"$XDG_CONFIG_DIRS"
fi
export XDG_CONFIG_DIRS
# gnome is already added if gnome-session installed
if [ "$DESKTOP_SESSION" != "gnome" ]; then
if [ -z "$XDG_DATA_DIRS" ]; then
XDG_DATA_DIRS="$DEFAULT_XDG_DATA_DIRS"
fi
if [ -n "${XDG_DATA_DIRS##*/usr/share/$DESKTOP_SESSION*}" ]; then
XDG_DATA_DIRS=/usr/share/"$DESKTOP_SESSION":"$XDG_DATA_DIRS"
fi
export XDG_DATA_DIRS
fi
if [ -n "$DBUS_SESSION_BUS_ADDRESS" ] && \
command -v dbus-update-activation-environment >/dev/null; then
dbus-update-activation-environment --verbose --systemd XDG_CONFIG_DIRS XDG_DATA_DIRS
fi
fi
|