XQuartz is crashing constantly and going in an infinite loop on macOS Mojave.

On doing a xinit in the terminal I get:

xinit: giving up
xinit: unable to connect to Xserver : connection refused
xinit: server error

However, if I use it as root with sudo xinit it works.

How do I resolve this?

You must log in to answer this question.

Browse other questions tagged .