2

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").
Wizard79
  • 245
  • 2
  • 3
  • 10
  • 3
    Possible duplicate of [How to force "startx" at startup?](https://unix.stackexchange.com/questions/401884/how-to-force-startx-at-startup) – Sparhawk Sep 01 '19 at 22:07
  • Or [here](https://unix.stackexchange.com/questions/193163/i-have-to-run-startx-on-boot-to-have-a-window-manager-how-can-i-fix-this) or [here](https://unix.stackexchange.com/questions/62722/start-x-after-automatic-login). – Sparhawk Sep 01 '19 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 01 '19 at 22:17
  • The solution should be the same, i.e. put `startx` in a startup script. – Sparhawk Sep 01 '19 at 23:05
  • No, because that would happen after the login. I want to get the graphical login screen. – Wizard79 Sep 02 '19 at 05:06
  • Ah right. That's called the "display manager". [This](https://unix.stackexchange.com/questions/450835/how-to-execute-command-before-user-login-on-linux) is possibly the right dupe then? – Sparhawk Sep 02 '19 at 05:12
  • But why it is missing in a fresh install of Kali MATE 2019.2? Is that the intended behavior? – Wizard79 Sep 02 '19 at 05:14
  • I'm not sure. However, I'm not surprised… you know that Kali [is not a general purpose distro](https://unix.meta.stackexchange.com/a/5361/18887) right? It's missing a lot of things, and has some defaults that are intentionally insufficient for everyday use (e.g. root user). – Sparhawk Sep 02 '19 at 05:17
  • Of course but from the tutorials and the guides this doesn't seem the default behavior of a standard Kali setup – Wizard79 Sep 02 '19 at 05:22
  • Possible duplicate of [How to execute command before user login on linux](https://unix.stackexchange.com/questions/450835/how-to-execute-command-before-user-login-on-linux) – Fabby Sep 03 '19 at 22:19

2 Answers2

4

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

graphical.target

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!

Ned64
  • 8,486
  • 9
  • 48
  • 86
  • 2
    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 09 '19 at 16:42
  • @telcoM Good idea! – Ned64 Sep 09 '19 at 17:58
2

Login to tty1

apt-get update
apt-get upgrade -y
apt-get install -f gdm3
AdminBee
  • 21,637
  • 21
  • 47
  • 71