Search code examples
homebrewmacos-mojavexmgrace

How can I fix the error in installing xmgrace in Mac Mojave?


I tried to install xmgrace via brew with the command brew install grace, but then following error occurs:

Can't open display Failed initializing GUI, exiting

I operate in the bash shell on a macOS Mojave10.14.6.

How can I fix the error?


Solution

  • You can try below command to solve your issue:

    $ DISPLAY=:0.0 xmgrace
    

    if it doesn’t solve the problem, you need to open XQuartz and then enter the following command:

    $ DISPLAY=:0.0 xmgrace