How to install lightdm in ubuntu 18.04 (lightdm, gdm)
1. sudo apt-get update
2. sudo apt-get install lightdm
3. sudo dpkg-reconfigure lightdm
4. reboot
5. sudo systemctl status lightdm (check the status, the device will boot into lightdm)
6. sudo systemctl stop lightdm
For default gdm mode,
disable desktop:
$ sudo systemctl stop gdm
$ sudo loginctl terminate-seat seat0
enable desktop:
$ sudo systemctl start gdm