Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

setting up DISPLAY for X11 for the localhost

Can anyone let me know how to set my DISPLAY for a program that I am running from my laptop from Terminal.app?

It says the following:
Last login: Sun Jul 30 18:21:05 on ttyp1
Welcome to Darwin!
sang-lees-computer:~ sanglee$ fsl
DISPLAY is not set. Please set your DISPLAY environment variable!
sang-lees-computer:~ sanglee$

Can anyone help me? I also get the following message:
sang-lees-computer:~ sanglee$ export DISPLAY=sang-lees-computer:0.0
sang-lees-computer:~ sanglee$ xeyes
_X11TransSocketINETConnect() can't get address for sang-lees-computer:6000: No address associated with nodename
Error: Can't open display: sang-lees-computer:0.0
sang-lees-computer:~ sanglee$


Please help!

MacBook, Mac OS X (10.4.7)

Posted on Jul 30, 2006 3:33 PM

Reply
Question marked as Best reply

Posted on Jul 30, 2006 4:38 PM

You need to two things:

1) get X11 server running
- my way to do this is to start the X11 app (/Applications/Utilities/X11.app) - if you want to you can get rid of the Xterm window that also appears, but it does not hurt to nkeep it running

2) set the DISPLAY environment value
-in the terminal window you want to run the program from enter the following (or some variant of it)
$ export DISPLAY=:0
(there are other forms of the DISPLAY value such as 😮.0 etc, but this works)

You should then be able to run your program and have X11 do the displaying.

Susan
10 replies
Question marked as Best reply

Jul 30, 2006 4:38 PM in response to Rugby God

You need to two things:

1) get X11 server running
- my way to do this is to start the X11 app (/Applications/Utilities/X11.app) - if you want to you can get rid of the Xterm window that also appears, but it does not hurt to nkeep it running

2) set the DISPLAY environment value
-in the terminal window you want to run the program from enter the following (or some variant of it)
$ export DISPLAY=:0
(there are other forms of the DISPLAY value such as 😮.0 etc, but this works)

You should then be able to run your program and have X11 do the displaying.

Susan

Aug 16, 2006 8:07 AM in response to Aussie Susan

Hello
I have been having a simular problem. I am trying to connect to the desktop of my sgi origin (unix server) using x11, but it will not let me open the "display"

I use this program to get to "toolchest"
I have trouble shooted, it is not the server, because I can connect from my older I mac, and all of the other macs. I tried deleting the reciet and the echo display command worked it told me the correct ip address, but the other commands were not found.
Any help anybody can give would be apprciated.
Laura

Aug 22, 2006 10:33 AM in response to ljmsmith

Usually, "servers" are thought of as systems in some other room that you access as a "client" from the machine in front of you; for X11, the machine in front of you is the server, and remote machines are clients. Because of this unusual situation, it's easy to get confused, either as the author of a question or as a reader.

Laura, when you say you're "trying to connect to the desktop of my sgi origin ... using x11", do you mean that you want to run a program on your Mac and have the window appear on the SGI origin's display? Or that you want to remotely log in to the SGI origin, and have X commands executing on the SGI origin display on your Mac?

If you want to remotely log in to the SGI origin and have applications started from there display on your Mac, the easiest thing is to start a Term (xterm) from the X11 "Applications" menu on your Mac, then use "ssh -X <yourSGIsName>" within the xterm window to log on to the SGI origin. SSH will ensure that the DISPLAY value on the SGI is set to use your Mac's X11 server. If you can't log in to the SGI origin using "ssh", post back...

If you want to use the SGI origin's display to show windows for applications running on your Mac, and you have Remote Login enabled on your Mac, just reverse the process -- from an xterm running on the SGI origin, run "ssh -X <yourMacsNameOrIPaddress>". SSH will ensure that the DISPLAY value on your Mac is set to use the SGI's X11 server. If the SGI doesn't have the "ssh" client program, post back...

Aug 22, 2006 2:17 PM in response to cminder

Hi cminder,
Based on my experience, I think you'd be better off leaving off the `uname -n` part. If you specify a hostname, I believe that the XWindows client tries to make TCP connection to the server. However, TCP connections are disabled by default on Tiger. However, if you leave off the hostname, the client will attempt a UNIX socket connection, which I think is more efficient locally. Thus, I recommend setting the display to "😮.0". It's not as fancy but it's more reliable.
--
Gary
~~~~
For courage mounteth with occasion.
-- William Shakespeare, "King John"

setting up DISPLAY for X11 for the localhost

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.