Experienced this with Ubuntu 16.04 after using my work desktop station as a temporary server with vagrant servers and using gnome-shell as my DE for about a month. Nautilus started to crash with the error:
cannot open display: :0.0
Maximum number of clients reached
Restarting gdm3 didn't work either. Killed all users, and run startx as root launched the gnome-shell and nautilus worked, but I could not make gdm3 start as gdm3 user again.
Experienced this with Ubuntu 16.04 after using my work desktop station as a temporary server with vagrant servers and using gnome-shell as my DE for about a month. Nautilus started to crash with the error:
cannot open display: :0.0
Maximum number of clients reached
Restarting gdm3 didn't work either. Killed all users, and run startx as root launched the gnome-shell and nautilus worked, but I could not make gdm3 start as gdm3 user again.