I'm using nodm with automatic login and an .xinitrc file which just runs cgminer inside a screen session. I'm not running a window manager at all. To set up automatic login with nodm, see
/etc/default/nodm. My
.xinitrc looks something like this:
#!/bin/bash
$HOME/bin/screen-cgm.sh &
exec xterm
The
exec xterm is just there to keep the X session running. The script
screen-cgm.sh starts a (detached) screen session running cgminer.