Re: Running Nedit from the terminal



On Fri, 18 May 2007 09:44:44 -0700, c a l a n d e wrote:

Some time after installing Panther I can no longer run Nedit from the
terminal. When I invoke it I get the following.

mercury 1> ned
NEdit: Can't open display

I am guessing you left out a colon in the message and it actually says

NEdit: Can't open display:

The colon following "display" is significant; it means that some
important information follows, namely the DISPLAY that NEdit was
attempting to open.

The fact that there is nothing following the colon in this case is the
key to the problem. It means your DISPLAY is unset, which explains why
it couldn't be opened.

You can confirm that your DISPLAY is unset by typing

echo $DISPLAY

in a Terminal window. If it's blank, then you need to set it to ":0.0",
using one of the following commands, depending on your shell:

(bash:)
export DISPLAY=:0.0

(tcsh:)
setenv DISPLAY :0.0

You can then use NEdit from that window, but this fix lasts only as long
as that particular Terminal window is open. You can also set DISPLAY in
your ~/.login or ~/.profile (depending on your shell), but the method I
prefer is to create a directory ~/.MacOSX and place in it an
environment.plist file containing the desired environment settings.

Your ~/.MacOSX/environment.plist could look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
<key>DISPLAY</key>
<string>:0.0</string>
</dict>
</plist>

Note that the line containing DOCTYPE is wider than 80 columns. You can
set additional environment variables by adding more key/value pairs in
the <dict> section. For example, you might set your PATH here.

If you have Xcode installed, you can use "Property List Editor" in
/Developer/Applications/Utilities/ to maintain ".plist" files like this.

The advantage of setting your environment this way is that your settings
apply to all apps and not just Terminal.app.



--
Dave Seaman
Oral Arguments in Mumia Abu-Jamal Case to be heard May 17
U.S. Court of Appeals, Third Circuit
<http://www.abu-jamal-news.com/>
.



Relevant Pages

  • Re: remote Xing problem
    ... > something like 'nedit' to edit files from the remote system. ... > remote server to our xhosts, told the remote server to talk to the network ... > and launched 'nedit' with DISPLAY and always the same error. ... If you are using ssh to connect between the machines, then you should edit ...
    (comp.os.linux.x)
  • Re: Running Nedit from the terminal
    ... tcsh: xhost: Command not found. ... tcsh: DISPLAY: Undefined variable. ... You probably should also install the ... I tried installing nedit via fink and it ...
    (comp.sys.mac.system)
  • Re: konsole display charset (solved)
    ... Ed Hurst wrote: ... When I went to display a document including accented characters, ... though it works well in Nedit ...
    (alt.os.linux.suse)
  • Re: Running Nedit from the terminal
    ... NEdit: Can't open display ... I am guessing you left out a colon in the message and it actually says ...
    (comp.sys.mac.system)
  • Re: X server wont serve any clients
    ... all other systems can't connect to the display. ... jgs# setenv DISPLAY jgs.arlut.utexas.edu:0.0 ... Error: Can't open display: jgs.arlut.utexas.edu:0.0 ... What sort of a network are you connected to? ...
    (comp.unix.solaris)