2

When starting up by machine, I am prompted with a terminal asking me to login, rather than the nice GUI that I am use to. When I login in, I am able to run startx and everything works smoothly.

I added the following to my ~/zprofile but it only ran once I was logged in.

if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
  startx
fi

How can I get the login screen that I am use to, to appear again?

  • What Ubuntu version? What is the output of systemctl get-default and cat /etc/X11/default-display-manager? – steeldriver May 20 '19 at 22:22
  • @steeldriver Version: Ubuntu 18.04.2 LTS x86_64 and systemctl output: graphical.target – APorter1031 May 20 '19 at 22:24
2

The Gui is loaded by systemd, when the init system is systemd, this is the case of Ubuntu

Here is a nice answer about the subject

systemctl get-default permit to see what target is set for the startup either multi-user.target or graphical.target

To enable x at startup time you can use:

sudo systemctl enable graphical.target --force
sudo systemctl set-default graphical.target

And to disable it

sudo systemctl enable multi-user.target --force
sudo systemctl set-default multi-user.target

Note that /etc/X11/default-display-manager contain the default used display manager (this file is not required tho)

Also find here how to setup the default display manager, this is required as well

For a detailed answer more information about the setup are required (what desktop are you using kde/gnome what dm are using lightdm/sddm etc)

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.