Re: Alternative window managers for Apple X11?
Re: Alternative window managers for Apple X11?
- Subject: Re: Alternative window managers for Apple X11?
- From: Tim Cutts <email@hidden>
- Date: Sat, 29 Mar 2003 00:02:14 +0000
- Mail-followup-to: Tim Cutts <email@hidden>, email@hidden
On Fri, Mar 28, 2003 at 12:19:01PM -0800, 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?
ssh tunnels your X connection through its own encrypted session, It
creates what you can think of as a "virtual X server" on the remote
machine which forwards data to your local X server through the X server.
That's why you get a DISPLAY variable that appears to be local to the
remote machine.
> * 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?)
You can't rely on it. The first X connection through ssh gets
localhost:10.0, the next gets localhost:11.0 and so on. The reason
for this is that all ssh is doing is tunnelling a port. Each X server
needs a separate port to accept connections on. The port X listens on
is 6000 + display number, so your connection was listening on 6010. If
someone else had started a tunnelled X connection first, you'd get a
different number. You cannot rely on it always being the same, unless
you know you're the only person logging into the remote box this way.
> * Is there a more reasonable way to do all this?
ssh is by far the most painless way to establish X connections to remote
machines. You're already using the most reasonable method!
Tim
--
Dr Tim Cutts
Informatics Systems Group
Wellcome Trust Sanger Institute, Hinxton, Cambridge, CB10 1SA, UK
_______________________________________________
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.