How can I disable all display managers?

16,259

Solution 1

Assuming your distribution uses systemd, systemd's default target is graphical.target.

You can check the default with:

systemctl get-default

You can change the default to multi-user.target with:

systemctl set-default multi-user.target

Solution 2

Run these steps:

Edit your grub

$ sudo gedit /etc/default/grub

Change from:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change to:

GRUB_CMDLINE_LINUX_DEFAULT="text"

Update Grub with

$ sudo update-grub

Disable the Lightdm manager:

$ sudo systemctl disable lightdm.

Now when you reboot it'll stop at the text login prompt.

Note:

While the command startx will give you an X session, it will not give you the expecited environment you are familiar with. To get a normal Ubuntu Desktop session you will have to start Lightdm. You can do this with:

$ sudo systemctl start lightdm
Share:
16,259

Related videos on Youtube

tjespe
Author by

tjespe

Updated on September 18, 2022

Comments

  • tjespe
    tjespe almost 2 years

    When I boot my computer, I want to be greeted by a text terminal, like TTY. This way I want to be able to log in and type startx to start the GUI.

    If I could get TTY to start on boot instead of a display manager, that would be enough.

  • Startec
    Startec about 4 years
    When you say "not expected environment" - what do you mean? What does it look like and how is it different?