How to restart MATE's graphical environment via SSH?

How would I go about restarting MATE’s graphical environment via SSH?

I use my home computer at school via VNC and every now and then it completely hangs and won’t respond and I’m SOL from where I am to restart the computer.

I know I can restart the computer by a sudo reboot from SSH, but I was wondering if there was a way to restart the graphical environment so I can re-VNC in again without a reboot.

@RJMcKenzie I followed the directions at askubuntu - See

The first command used was this - cat /etc/X11/default-display-manager. It allowed me to determine the display manager used by my “home computer” which was /usr/sbin/lightdm. I then issued the following command - sudo systemctl restart lightdm.service.

I was using X2Go instead of VNC but this sequence appeared to work quite well. I had to re-login again using X2Go but avoided having to reboot.
HTH RJMcKenzie.

2 Likes

Thanks, I’ll give it a try next time I have an issue. Hopefully I won’t have to use it :slight_smile: