# -*- sh -*- # Xsession.d script to workaround Qt4 icon themes in MATE and Xfce. # This file is sourced by Xsession(5), not executed. if [ "$DESKTOP_SESSION" = 'mate' ]; then DE='mate' elif [ "$DESKTOP_SESSION" = 'xfce' ]; then DE='xfce' elif ( echo "$DESKTOP_SESSION" | grep -q 'xsession' ); then SESSION=$(readlink $(readlink $(which 'x-session-manager'))) case "$SESSION" in *mate*) DE='mate' ;; *xfce*) DE='xfce' ;; esac fi if [ "$DE" = 'mate' ]; then export DESKTOP_SESSION='gnome' ICON_THEME=$(gsettings get 'org.mate.interface' 'icon-theme' | sed -e "s/^'//;s/'$//") elif [ "$DE" = 'xfce' ]; then ICON_THEME=$(xfconf-query -c xsettings -p '/Net/IconThemeName') fi if [ ! -z "$ICON_THEME" ]; then gconftool-2 --set --type string '/desktop/gnome/interface/icon_theme' "$ICON_THEME" fi