Please study /etc/X11/Xsession.d/50x11-common_determine-startup
If I understand it correctly, ~/.xsession may be used as a fall back script, and does normally not apply if you start the session from e.g. lightdm or GDM. The $STARTUP variable gets set in /etc/X11/Xsession.d/20x11-common_process-args
Please study /etc/X11/ Xsession. d/50x11- common_ determine- startup
If I understand it correctly, ~/.xsession may be used as a fall back script, and does normally not apply if you start the session from e.g. lightdm or GDM. The $STARTUP variable gets set in /etc/X11/ Xsession. d/20x11- common_ process- args