Skip to main content
replaced http://serverfault.com/ with https://serverfault.com/
Source Link
  1. Disable gdm at boot:

     sudo dpkg-divert --rename --add /etc/init/gdm.conf
    
  2. Authorize users to start X:

     echo "allowed_users=console" | sudo tee -a /etc/X11/Xwrapper.config 
    
  3. Automatically start X after login on tty1:

    In your .profile or .bash_profile, add:

     if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then 
         startx
     fi
    

    Logging in other tty will not start gdm or X.

See also this question on serverfaultthis question on serverfault.

  1. Disable gdm at boot:

     sudo dpkg-divert --rename --add /etc/init/gdm.conf
    
  2. Authorize users to start X:

     echo "allowed_users=console" | sudo tee -a /etc/X11/Xwrapper.config 
    
  3. Automatically start X after login on tty1:

    In your .profile or .bash_profile, add:

     if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then 
         startx
     fi
    

    Logging in other tty will not start gdm or X.

See also this question on serverfault.

  1. Disable gdm at boot:

     sudo dpkg-divert --rename --add /etc/init/gdm.conf
    
  2. Authorize users to start X:

     echo "allowed_users=console" | sudo tee -a /etc/X11/Xwrapper.config 
    
  3. Automatically start X after login on tty1:

    In your .profile or .bash_profile, add:

     if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then 
         startx
     fi
    

    Logging in other tty will not start gdm or X.

See also this question on serverfault.

Source Link
mrucci
  • 10.1k
  • 3
  • 32
  • 31

  1. Disable gdm at boot:

     sudo dpkg-divert --rename --add /etc/init/gdm.conf
    
  2. Authorize users to start X:

     echo "allowed_users=console" | sudo tee -a /etc/X11/Xwrapper.config 
    
  3. Automatically start X after login on tty1:

    In your .profile or .bash_profile, add:

     if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then 
         startx
     fi
    

    Logging in other tty will not start gdm or X.

See also this question on serverfault.