# /etc/lxdm/xinitrc

# ---------------------------------------------------------------
# This file should only be installed if /etc/lxdm/Xsession
# runs the login shell with 'exec -l bash -c ...' instead of
# /bin/sh -login ...
# ---------------------------------------------------------------
# Loaded by lxdm's Xsession before running /etc/X11/xinitrc.
# Here we backfill Fatdog's desktop missing dependencies that
# are provided by /etc/profile in a regular autologin session.

# $1 - '/etc/X11/xinitrc <windowmanager> <windowpanel>'

# At this stage FATDOG_STATE_DIR is empty so rc.Xstartwm would
# misplace files window{manager,panel} in /. Let's place them in
# /tmp since before login they can't be attributed to any user.
export FATDOG_STATE_DIR=/tmp

# rc.Xstartwm runs defaultpanel - lxqt-panel in Fatdog64-800.
# Load QT environment variables for lxqt-panel.
for p in /etc/profile.d/qt5*.sh; do . "$p"; done; unset p

case "$1" in
	*'lxqt-panel'*)
		for p in /etc/profile.d/qt5*.sh; do . "$p"; done
		unset p
		;;
esac

