After locking Ubuntu 14.04 and invoking login screen sometimes I get the page with disabled password field. How can I restart login screen in command line without restarting whole X server?
2 Answers
On the terminal type:
sudo service lightdm restart
-
2
service restart
restarts whole graphical environment so all previous activities (like terminal or text redactor states) are wiped. Jan 23, 2015 at 7:38 -
1@YehorNemov This is true, but there is no other way. The login screen is shown by lightdm, the display manager. It runs as root and provides the login. After login it spawns an instance of the graphical environment with the proper rights for the user as a child. If you restart the login screen, you will have to restart the children as well.– Klaus D.Jan 23, 2015 at 9:55
-
1
Klaus' answer is basically correct. lightdm isn't the only xdm option in Ubuntu though. My machine (Kubuntu 22.04.4) is using sddm.
The more general form is
sudo service <?dm> restart
Where I'd need to replace <?dm> with sddm...
Courtesy of this answer, this command will tell you which dm your system is currently using (sudo unnecessary here):
cat /etc/X11/default-display-manager