4

I am using Ubuntu 19.04 (Disco Dingo). My question is the same as this old one: How to restart X Window Server from command line?

However, the much upvoted answer there does not work for me. When I run sudo systemctl restart display-manager as suggested there, the window system is restarted but then after that I cannot login, it seems like the window system is restarted again at each login attempt. So then I anyway need to reboot to make things work again. So that does not achieve what I want. What I would like is to be able to restart the window system without doing a full system reboot.

The other suggestion in the old answer was to check which display manager is used by doing cat /etc/X11/default-display-manager (in my case this gives /usr/sbin/gdm3) and then run sudo restart gdm but that gives me an error message: sudo: restart: command not found.

Is there a way to restart the X window system in Ubuntu 19.04 without doing a full reboot, and be able to login again afterwards?

Edit: I also tried systemctl restart gdm but that gives the same problem as sudo systemctl restart display-manager -- the window system is restarted but after that I cannot login, need to reboot to make things work again.

  • sudo systemctl restart gdm is the correct answer, if it does not work, then you have found a bug. What do the logs in /var/log/gdm/say ? – thecarpy May 20 at 6:54
  • 1
    @thecarpy I have no /var/log/gdm/ directory. There is a /var/log/gdm3/ directory but that one is empty. – Elias May 20 at 9:41
  • My bad, I forgot the 3 and systemd: what does journalctl --since=today|grep gdm report ? – thecarpy May 20 at 17:42
4

You can try:

systemctl restart gdm
  • Thanks, I tried that now but it did not help, I have just added it as an edit to the question. – Elias May 10 at 8:27
1
+25

This old Q&A: How to restart GNOME Shell from command line? may have the answers for you.

Initially these used to work for people:

  • The easiest way is to Alt+F2 and type r then .
  • The command to replace the gnome-shell would be gnome-shell --replace.

Now days this seems to be the only solution:

  • You can also do a killall -3 gnome-shell.

Note: This Q&A focuses on restarting gnome display manager without loosing all work and going back to Login screen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.