Disable
gdm
at boot:sudo dpkg-divert --rename --add /etc/init/gdm.conf
Authorize users to start
X
:echo "allowed_users=console" | sudo tee -a /etc/X11/Xwrapper.config
Automatically start
X
after login ontty1
:In your
.profile
or.bash_profile
, add:if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then startx fi
Logging in other
tty
will not startgdm
orX
.
See also this question on serverfaultthis question on serverfault.