Re: X11 article, for review (take 2)
Re: X11 article, for review (take 2)
- Subject: Re: X11 article, for review (take 2)
- From: Randy Ford <email@hidden>
- Date: Thu, 3 Apr 2003 20:42:24 -0600
On Tuesday, April 1, 2003, at 11:30 AM, Rich Morin wrote:
Thanks for the information. The critical question for me, however,
is whether the strategy I'm laying out in my article is likely to
cause problems (for me, or worse, for a reader). Specifically, in
what way(s) is this code likely to fail:
* in ~/.login, on the local machine:
if (! $?DISPLAY) setenv DISPLAY ':0.0'
* in ~/.cshrc, on the local machine:
alias cfcl 'ssh -X cfcl'
* in ~/.login, on the remote machine:
if ($?DISPLAY) xdpyinfo > /dev/null # sanity check
I know that some apps (e.g., GNU emacs) will take the presence of
$DISPLAY as indicating that they should use X11-style interaction.
I have also been told that, if no X11 server is actually present
on the local machine, things can get (silently and mysteriously)
confused. That's the purpose of the "sanity check".
Are there any other pitfalls I should know about? Please be as
specific as possible.
If you log into this account from another box, even using ssh -X, your
DISPLAY will be set to :0. When you try to launch an X11 program, it
will not display on the machine you are using (the "other" box); it
will attempt to be displayed on the machine that you are remotely
connected to. If it is successful, it appears on the shell session to
fail without any error message. If it fails, it gives an "Unable to
connect" message instead of a "DISPLAY not set" one.
I've seen many cases where a user is throwing shells up on some machine
at which they are not sitting because of code like this. I especially
like sitting at some machine and having root-equivalent shells pop up
from nowhere.
You can read below for the likely results of a user trying to
troubleshoot this.
From my earlier message:
Through the years, I've seen many, many problems because people
setting their DISPLAY like you suggest. If a user never remotely logs
in, they may never have a problem. However, in today's environment,
many people will have some need to remotely log in. People will
reinstall X11.app, and even OS X to try to fix the problem before they
get to a person, if they ever do, who understands what is going on.
randy.
_______________________________________________
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.