As mentioned in #525908, the shell variable $XAUTHORITY is not set by nodm. The bug has the rest of the details. Oddly, it's mentioned that a separate bug for Xauthority should be opened, but that never happened.. so here it is. :) Not having XAUTHORITY breaks things like gksu(do).