I ssh-ed from another computer to the problem computer
to execute the suggested commands.
If on a home network you can login to your router with a
web browser to get the IP address for your problem computer.
Mine was 192.168.1.3
The following fixed the problem for me.
First I did (without the comment).
sudo apt-get install lightdm # This showed lightdm was installed
Second I did uname -r and found the completion for
the linux-headers-$(uname -r) command.
I don't know why I didn't use the suggested:
sudo apt install linux-headers-$(uname -r)
Then I did the suggested commands, one after the other:
sudo apt purge gdm3
sudo apt purge nvidia*
sudo apt install linux-headers-4.13.0-16-generic # ADJUST THIS
sudo apt install nvidia-384
sudo dpkg-reconfigure lightdm # Suggested when 1st command ran
sudo shutdown -r now # Restart
Went to the problem computer, the login screen came up.
The Desktop Environment that was selected was:
Ubuntu on Xorg(Default)
I had the blank screen, no login screen problem.
The computer was otherwise running though.
I ssh-ed from another computer to the problem computer
to execute the suggested commands.
If on a home network you can login to your router with a
web browser to get the IP address for your problem computer.
Mine was 192.168.1.3
The following fixed the problem for me.
First I did (without the comment).
sudo apt-get install lightdm # This showed lightdm was installed
Second I did uname -r and found the completion for $(uname -r) command.
the linux-headers-
I don't know why I didn't use the suggested: $(uname -r)
sudo apt install linux-headers-
Then I did the suggested commands, one after the other: 4.13.0- 16-generic # ADJUST THIS
sudo apt purge gdm3
sudo apt purge nvidia*
sudo apt install linux-headers-
sudo apt install nvidia-384
sudo dpkg-reconfigure lightdm # Suggested when 1st command ran
sudo shutdown -r now # Restart
Went to the problem computer, the login screen came up.
The Desktop Environment that was selected was:
Ubuntu on Xorg(Default)
I was able to login.
My problem computer is at least 10 years old.