diff options
Diffstat (limited to 'x/xsessionrc')
-rw-r--r-- | x/xsessionrc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/x/xsessionrc b/x/xsessionrc index 48f2a725..8d46ed0b 100644 --- a/x/xsessionrc +++ b/x/xsessionrc @@ -1,5 +1,16 @@ # X startup commands go in here if they should run on every X session, whether -# classic `startx` or a modern DE like LightDM +# classic `startx` or a modern DE like LightDM. xsessionrc is a dpkg-specific +# file. +# + +# If $ENV isn't set, then this X startup process wasn't started from somewhere +# beneath a login shell that sources ~/.profile to set up environment variables +# yet, most likely because it's being opened by a display manager, so we'll do +# it here. +# +if [ -z "$ENV" ] ; then + . "$HOME"/.profile +fi # Update BROWSER, since .profile has already set this to a curses browser # shellcheck disable=SC2034 |