Re: Running Nedit from the terminal
- From: Dave Seaman <dseaman@xxxxxxxxxxxx>
- Date: Fri, 18 May 2007 17:37:48 +0000 (UTC)
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/>
.
- Follow-Ups:
- Re: Running Nedit from the terminal
- From: c a l a n d e
- Re: Running Nedit from the terminal
- From: Hans Aberg
- Re: Running Nedit from the terminal
- References:
- Running Nedit from the terminal
- From: c a l a n d e
- Running Nedit from the terminal
- Prev by Date: Re: Running Nedit from the terminal
- Next by Date: Re: When in doubt, drown 'em in lawyers
- Previous by thread: Re: Running Nedit from the terminal
- Next by thread: Re: Running Nedit from the terminal
- Index(es):
Relevant Pages
|