18 lines
601 B
Bash
18 lines
601 B
Bash
|
if test -z "$XDG_DATA_DIRS"; then
|
||
|
XDG_DATA_DIRS="/usr/share:/usr/local/share"
|
||
|
[ -e /usr/bin/kde4-config ] && KDE4_PREFIX=`/usr/bin/kde4-config --prefix`
|
||
|
if [ "$KDE4_PREFIX" ]; then
|
||
|
if [ "${DESKTOP_SESSION:0:3}" = "kde" ]; then
|
||
|
XDG_DATA_DIRS="$KDE4_PREFIX/share:$XDG_DATA_DIRS"
|
||
|
else
|
||
|
XDG_DATA_DIRS="$XDG_DATA_DIRS:$KDE4_PREFIX/share"
|
||
|
fi
|
||
|
fi
|
||
|
[ -e /opt/kde3/share/applications ] && XDG_DATA_DIRS="$XDG_DATA_DIRS:/opt/kde3/share"
|
||
|
export XDG_DATA_DIRS
|
||
|
fi
|
||
|
if [ "$DESKTOP_SESSION" = "gnome" ]; then
|
||
|
XDG_MENU_PREFIX="gnome-"
|
||
|
export XDG_MENU_PREFIX
|
||
|
fi
|