--- xdm/config/Xsession.in.orig	2018-06-18 14:25:14.113681055 +0000
+++ xdm/config/Xsession.in	2018-06-18 14:26:10.313832406 +0000
@@ -51,6 +51,7 @@
 
 startup=$HOME/.xsession
 resources=$HOME/.Xresources
+xinitrc=$HOME/.xinitrc
 
 if [ -s "$startup" ]; then
 	exec /bin/sh -ls -c "$startup"
@@ -58,5 +59,9 @@
 	if [ -r "$resources" ]; then
 		BINDIR/xrdb -load "$resources"
 	fi
-	exec BINDIR/xsm
+	if [ -r "$xinitrc" ]; then
+		exec /bin/sh -ls -c "$xinitrc"
+	else
+		exec /bin/sh -l /etc/X11/xinit/xinitrc
+        fi
 fi
