File: zlogin-snippet

package info (click to toggle)
desktop-profiles 1.4.30
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 712 kB
  • sloc: sh: 787; perl: 58; makefile: 23; csh: 8
file content (23 lines) | stat: -rwxr-xr-x 1,018 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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;