#!/bin/zsh # # This fixes the desktop-profiles corner-case where a graphical client is # started through an ssh -X session (in which the Xsession.d scripts aren't # run, so we need to make sure the profiles are activated according to the # specified settings at login). ############################################################################# # testing SSH_CLIENT as the woody ssh doesn't set SSH_CONNECTION # also testing SSH_CONNECTION as the current ssh manpage no longer mentions # SSH_CLIENT, so it appears that variable is being phased out. if ( (test -n "${SSH_CLIENT}") || (test -n "${SSH_CONNECTION}") ) && \ (test -n "${DISPLAY}"); then # zsh needs the shwordsplit option set otherwise activateDesktopProfiles # script wil error out if (setopt | grep shwordsplit); then source /etc/X11/Xsession.d/20desktop-profiles_activateDesktopProfiles; else setopt shwordsplit; source /etc/X11/Xsession.d/20desktop-profiles_activateDesktopProfiles; unsetopt shwordsplit; fi; fi;