SHARE
TWEET

Untitled

a guest Nov 9th, 2015 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # -*- sh -*-
  2. # Xsession.d script to workaround Qt4 icon themes in MATE and Xfce.
  3. # This file is sourced by Xsession(5), not executed.
  4.  
  5. if [ "$DESKTOP_SESSION" = 'mate' ]; then
  6.     DE='mate'
  7. elif [ "$DESKTOP_SESSION" = 'xfce' ]; then
  8.     DE='xfce'
  9. elif ( echo "$DESKTOP_SESSION" | grep -q 'xsession' ); then
  10.     SESSION=$(readlink $(readlink $(which 'x-session-manager')))
  11.     case "$SESSION" in
  12.         *mate*)
  13.           DE='mate'
  14.         ;;
  15.         *xfce*)
  16.           DE='xfce'
  17.         ;;
  18.     esac
  19. fi
  20.  
  21. if [ "$DE" = 'mate' ]; then
  22.     export DESKTOP_SESSION='gnome'
  23.     ICON_THEME=$(gsettings get 'org.mate.interface' 'icon-theme' | sed -e "s/^'//;s/'$//")
  24. elif [ "$DE" = 'xfce' ]; then
  25.     ICON_THEME=$(xfconf-query -c xsettings -p '/Net/IconThemeName')
  26. fi
  27. if [ ! -z "$ICON_THEME" ]; then
  28.     gconftool-2 --set --type string '/desktop/gnome/interface/icon_theme' "$ICON_THEME"
  29. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top