Ubuntu without graphical interface

marc a. -  
mamiemando Posted messages 33173 Registration date   Status Moderator Last intervention   -
Hello,

I installed an edubuntu server (for the benefits related to this distribution).

The X server starts automatically on boot. Now I would like the server to start only in command line mode, like we can do on other distributions by stopping at init 2 for example...

1 answer

  1. mamiemando Posted messages 33173 Registration date   Status Moderator Last intervention   7 945
     
    I'm not convinced of the usefulness of the maneuver, but why not :-)

    If it's like under Debian, runlevel 2 is the default runlevel. It starts everything including the graphical mode (via the gdm, kdm, or xdm services depending on what you have installed). You should therefore remove the service in question with the update-rc.d command. You can start by looking at how it works by checking the help:

    man update-rc.d


    Look among kdm, gdm, and xdm which one you are using:

    ls /etc/init.d/*dm


    Let's assume it's gdm:

    sudo update-rc.d gdm disable


    Then think about stopping gdm:

    sudo service gdm stop


    Now to start your graphical session, you should just need to type:

    startx


    To restore gdm:

    sudo update-rc.d gdm enable sudo service gdm start


    Good luck
    0