2

Actually, in the initial case, my ctrl and shift button were not working properly, so I followed the answers posted in this link: Shift keys not working properly, I run the following commands:

sudo dpkg-reconfigure keyboard-configuration
sudo apt-get install console-common
sudo dpkg-reconfigure console-data

But when I restarted, a different kind of login screen is getting displayed, and when I tried logging in with password, I am getting this message: "unable to get the valid context for (user)" and jumping back to same screen again.

singrium
  • 6,532
  • 7
  • 38
  • 68
Ghansham
  • 123
  • 4

1 Answers1

2

In Ubuntu 16.04 login to a virtual console by pressing the keyboard combination Ctrl+Alt+F1 To login from a virtual console:

  1. At the login: prompt type your username and press Enter.

  2. At the Password: prompt type your user password and press Enter.

After logging in run the following commands:

sudo apt update   
sudo apt upgrade   
sudo apt purge lightdm  
sudo apt install lightdm  
sudo reboot 

Reconfigure the LightDM login display manager:

sudo dpkg-reconfigure lightdm 
sudo reboot  

sudo dpkg-reconfigure lightdm will open up a new window allowing you to select lightdm as the default login display manager. Use the arrow keys to select lightdm, press the Tab key to put the focus on <OK> and press Enter. Then reboot by running sudo reboot

karel
  • 110,292
  • 102
  • 269
  • 299
  • as I am not able to login, I loggedin through recover mode and tried the command you mentioned, it says "lightdm is broken or not fully installed". I tried installing it using "apt-get install lightdm", but getting error says "unable to fetch archives", then I tried updating it with "apt-get update --fix-missing", but still not working – Ghansham Jul 22 '18 at 03:18
  • it worked now, from the current login screen, i moved to console login screen using ctrl_alt-f1. In recovery mode, the network connection was not working properly. Thanks karel. – Ghansham Jul 22 '18 at 03:49