Display error when running NEdit

I have a Mac Pro running macOS Mojave. I installed NEdit (using Homebrew). When I type nedit in the Terminal, I just get the message:

NEdit: Can't open display.

I am running bash. I check my display and I have indeed display :0

echo $DISPLAY

:0

I have no idea what's going wrong.


You'll need a display server running to run NEdit. Make sure that NEdit is installed and configured correctly. Here's a step by step guide that you can follow to do so. This should work on any recent release of macOS. I have followed the steps on a Mac running macOS Mojave 10.14.5.

  1. Install XQuartz (display server) which NEdit requires to run. Run the following command to install XQuartz via Homebrew:

    brew cask install xquartz

    Skip if you already have it installed.

  2. Install NEdit along with all of it's dependencies by running the following command:

    brew install nedit

  3. After successfully installing the two, run XQuartz.app. You can find it under Other folder in Launchpad, in /Applications/Utilities folder in Finder, or simply via Spotlight search. Here's how to identify it:

  4. In the XQuartz Menu bar, click on Applications → Customize...

  5. You will be presented with X11 Application Menu window as shown:

  6. Click on Add Item button and create an entry for NEdit as shown:

  7. Now close the X11 Application Menu window. Go the XQuartz menu, click on Applications item and you'll see an entry named NEdit (the one you just created).

  8. Click on the entry to run NEdit :)


Have a read of the home page for that package to see what other software it needs to run.

brew home nedit 

Unless it can run in the terminal, you need a program to serve up display :0

Even once you have X11 it still might not work.

:0