I just installed Kali Linux MATE 2019.2 into VMware, and it boots in console mode.

Q: Is this the standard behavior of Kali or has something gone wrong in my setup?

I can start the GUI by typing startx and it works perfectly, but I'd prefer to boot directly into GUI.

Q: How can I reconfigure Kali Linux to start with the GUI before the logon?

This is not a duplicate of the various "why my distribution suddenly stopped to boot to GUI" questions:

  • This is a fresh install: even at the first boot it didn't boot to GUI (apart from the graphical installer).
  • I certainly don't want to just add startx to a user script. I want the GUI to start before the login, and get the graphical logon screen (i.e. the "display manager").
  • 3
    Possible duplicate of How to force "startx" at startup? – Sparhawk Sep 1 at 22:07
  • Or here or here. – Sparhawk Sep 1 at 22:08
  • @Sparhawk it doesn't seem a duplicate of those questions. This is a fresh install of Kali (a Debian bases distribution) and this behavior has been present since the first boot. – Wizard79 Sep 1 at 22:17
  • The solution should be the same, i.e. put startx in a startup script. – Sparhawk Sep 1 at 23:05
  • No, because that would happen after the login. I want to get the graphical login screen. – Wizard79 Sep 2 at 5:06

Whether or not graphical mode is started upon boot is determined by the run level / default target set by init / systemd. Also, without a graphical display manager present you will not have a login screen. Since you have installed a Mate-based distro I assume, however, that the former is the problem.

Please check the output of the command (as root):

# systemctl get-default

If it is not


Then you can set the default by entering:

# systemctl set-default graphical.target

Also you need to enable a display manager, or else boot will fail. Try:

# systemctl enable gdm
# systemctl start gdm

If there were no errors reboot and let us know.

If the systemctl enable gdm fails you may have a different dm like lightdm; try this:

# systemctl enable lightdm
# systemctl start lightdm

Upon errors let us know. Don't reboot until one of the display managers works!

  • 1
    If you want to test graphical.target as one-time only (e.g. to see if it works before fully committing to it) you can use systemctl isolate graphical.target. If something goes wrong, you'll only need to reboot and you'll be back in console mode. Once you see the GUI mode works correctly, then you can do systemctl set-default graphical.target with confidence. – telcoM Sep 9 at 16:42
  • @telcoM Good idea! – Ned64 Sep 9 at 17:58

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.