Determine $DISPLAY socket name on OS X 10.6?

Posted by Nate on Super User See other posts from Super User or by Nate
Published on 2010-12-22T21:54:01Z Indexed on 2010/12/22 21:56 UTC
Read the original article Hit count: 194

Filed under:
|
|
|

I'm looking to do something that's a little odd. I'm SSH'ing from a server to a Snow Leopard client to start an X11 data display process. In other words, SSH's X11 forwarding isn't what I want.

I can do:

client$ echo $DISPLAY
/tmp/launch-SOMETHING/org.x:0
client$ ls -l $DISPLAY
srwx------  1 myuser  wheel  0 Dec  9 15:47 /tmp/launch-SOMETHING/org.x:0

And, when I do:

server$ ssh myuser@client
client$ export DISPLAY=/tmp/launch-SOMETHING/org.x:0
client$ xterm

I happily get my xterm.

What I need, then, is some way to find out the correct value for $DISPLAY in my ssh session. From what I've read, $DISPLAY is set by launchd, but I haven't found any way to see that value.

If it matters, I know that when my process connects from $server to $client, $client will logged in to the terminal as the same user.

© Super User or respective owner

Related posts about osx

Related posts about display