Re: Alternative window managers for Apple X11?
Re: Alternative window managers for Apple X11?
- Subject: Re: Alternative window managers for Apple X11?
- From: Jim Elliott <email@hidden>
- Date: Fri, 28 Mar 2003 15:15:12 -0600
I didn't see the start of this thread, so forgive me if I'm slightly
off the mark, but I think I can help explain what's happening. Let me
step back a bit and try to explain how ssh X forwarding works.
In the default configuration, your X server does not allow any remote
machines to connect to it, for security reasons. There are all kinds of
nasty things people can do when they can interact with your X server.
It's best to leave it this way.
Among its many other talents, ssh has the ability to tunnel X sessions
over a hostile Internet and through firewalls.
When you say "ssh -X some.host", several things happen. First, a secure
encrypted session is established from your Mac to that remote host, so
you can type things into a shell on the remote host and view the
results, without anyone in between being able to tell what you're doing.
But secondly, ssh sets up a virtual X server on the remote host. Any
programs that try to communicate with that virtual X server actually
interact with your ssh process. Their X commands get "tunneled" back
through your ssh session to the X server that's running on your Mac.
Since the Mac sees these requests as coming from your (local) ssh
process, it allows them. So you can run X programs on the remote host,
see their results on your Mac, and once again, this traffic is all
encrypted so no observers in between can see what you're doing.
Now, because the virtual X server is set up at the time you establish
the ssh session, you're right that the display number might change
depending on who else is using ssh X forwarding at the same time time.
The "localhost:10.0" is variable, and depends on the environment that
the ssh daemon running on the remote host encounters when it tries to
set up your proxy X server.
For the duration of your ssh -X session, though, you can use that
DISPLAY value to communicate with your proxy X server, and thereby your
Mac. (Note that other people can't, because another thing that ssh
takes care of for you is setting up some private X security credentials
in your home directory on the remote host so that processes owned by
you are able to communicate with the X server).
There are other kinds of network traffic that can be tunneled over your
ssh session as well (look in the man page or ask someone about port
forwarding sometime). It's incredibly cool and powerful.
Does this help explain what's happening?
Now, as far as I can tell, your goal is to be able to run remote X
programs from within Apple's Terminal application, not just xterms. The
problem there is that your shell running under Terminal doesn't know
that you're running an X server on your Mac, because it wasn't launched
from within the X environment. If you look at the value of $DISPLAY
from within an xterm (local to your Mac), and setenv DISPLAY to the
same value within your Terminal.app session before running ssh -X, it
should be able to pick up your local X environment and forward it to
the remote server as I described above.
-Jim
On Friday, Mar 28, 2003, at 14:19 America/Chicago, Rich Morin wrote:
If I could run the app in a regular ssh session, I could use
Terminal's
scrollbars, etc. When I try this, however, the app complains:
couldn't connect to display ":0" at .../Tk/MainWindow.pm line 55.
Maybe I just need a way to tell the app how to reach my X11 server.
Help?
I got a bit experimental, with some success. If I start up X11 on OSX
and tell its default terminal window to "ssh -X cfcl", I am then able
to print out the DISPLAY variable on cfcl:
rdm@cfcl [~] 1: echo $DISPLAY
localhost:10.0
If I then ssh to cfcl from a Terminal window and run "setenv DISPLAY
localhost:10.0", I am able to run my app successfully. There is a bit
too much black magic here to make me entirely comfortable, but it
works!
Could someone please tell me:
* What "localhost:10.0" is telling the X11 client?
* Whether DISPLAY is likely to change the next time I ssh in from
the
X11 terminal on my OSX box? (That is, am I safe in putting a line
into a .login file?)
* Is there a more reasonable way to do all this?
-r
--
email: email@hidden; phone: +1 650-873-7841
http://www.cfcl.com/rdm - my home page, resume, etc.
http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
http://www.ptf.com/tdc - Prime Time Freeware's Darwin Collection
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback:
http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.