If I run CDM (Console Display Manager) as root, it works fine. If I run it as any other user, CDM loads, requests a choice for WM, and then exits. There is no readable output to stdout or stderr.
How can I debug this?
I turned on logging of startx output. It says this:
X: user not authorized to run the X server, aborting.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
BTW, I am running Debian Jessie, if that helps.
setsid startx "$@" > /dev/null 2>&1 &
. Is it possible to add a sudo to the beginning of that line, so that I can run CDM as normal user and only elevate when starting X.