Re: Eliminating the xterm
Re: Eliminating the xterm
- Subject: Re: Eliminating the xterm
- From: "Nathaniel Gray" <email@hidden>
- Date: Tue, 13 Nov 2007 10:03:40 -0800
On Nov 13, 2007 1:44 AM, Martin Costabel <email@hidden> wrote:
> Jack Howarth wrote:
> []
> > suppressed. Also, X11.app is already running when the xterm appears
> > before the tkinter gui window. Shouldn't X11.app realize it is
> > already running when pymol opens its tkinter gui window and
> > suppress the attempt to open an xterm. That is, the launch mechanism
> > for x11 programs via X11.app should automatically suppress an
> > additional attempts to launch clients if X11.app is already running.
>
> Indeed, this behavior does not look right. If one runs
>
> open -a X11
>
> or double-clicks /Applications/Utilities/X11.app
> repeatedly, then the default xterm (or whatever is defined in the
> org.x.X11_launcher preferences) is launched every time.
Yes, as expected. It may help to rename /A/U/X11.app to XTerm.app.
It is an app bundle that does one thing (by default): launches xterm.
This has the side effect of causing launchd to launch the X server if
it's not already running.
> The ~/.xinitrc script is executed only the first time, as it should, but
> the default xterm appears even when X11 is already running.
>
> This looks like a bug. Shouldn't "open -a" or double-clicking the app
> icon when the app is already running be equivalent to clicking the dock
> icon or running the applescript 'tell app "X11" to activate'?
Arguably, yes. (Well, you really only ever need to *single-click*
dock icons, but I digress.) And that's what it does if you click the
*second* X11 dock icon that appears, because that's the icon
corresponding to /usr/X11/X11.app, which is the equivalent to
/A/U/X11.app in Tiger. Namely, it's the one that actually represents
the X server's process. (The *real* bug is what happens when you
launch *that* app from your dock.)
> The latter don't spawn new xterms, the former do.
>
> OTOH, pymol on Leopard shouldn't do things like
>
> os.environ['DISPLAY']=':0.0'
> or
> os.system("/usr/bin/open -a X11")
>
> as it does right now. Even on older systems this is strange, because it
> prevents pymol from working over a ssh forwarded X11 session, for example.
Yes, it shouldn't have done those things in Tiger either. Many of the
"bugs" you'll see with X programs packaged for Mac before Leopard have
to do with sloppy packaging, not the X server. In particular it used
to be quite tricky to get the DISPLAY and make sure the X server was
running before launching one's app. Now it's trivial to get DISPLAY
and unnecessary to make sure the X server is already running. This is
the beauty of launchd.
Cheers,
-n8
--
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden