Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eliminating the xterm



Jeremy Huddleston wrote:
Honestly, I think that's not a good idea. For one thing, X11.app (which has the preferences you are talking about) doesn't launch xterm at start. The /A/U/X11.app executes the command 'xterm' then quits. xterm then connects to the $DISPLAY socket. launchd starts /u/X/X11.app (the one with the preferences) which launches Xquartz, etc...

Reasonably, there should be a PreferencePane that you can open with System Preferences, without having to run X11.app. And instead of (or in addition to) the Dock item, there should be a menu bar item, similar to what you have for Bluetooth, Airport or Spaces. Then you could run the entries from the X11 Applications menu from that menu bar drop-down menu, also without having to start X11.app first. This would solve a lot of the usability problems.

As for the so-called race condition, I don't think there really is one. When you start xterm in order to launch X11, xterm has already "won" the race, because it starts before the X server gets a chance to read any Xresources file. What can be done is to run a short script along the lines of the traditional xinit/xinitrc script, only without starting a window manager, and *then* run xterm (or not if the user does not want one); something like the following (note that the first 'xrdb' already wakes up launchd and starts the X server):

  PATH=${PATH}:/usr/X11/bin
  if [ -f "$HOME/.Xresources" ]; then
    xrdb -merge "$HOME/.Xresources"
  fi
  if [ -f "$HOME/.Xmodmap" ]; then
    xmodmap "$HOME/.Xmodmap"
  fi
  xterm -ls &


A minimal version (tested inside your Xterm.app) would be

  /usr/X11/bin/xrdb -merge "$HOME/.Xresources"
  /usr/X11/bin/xterm -ls &

If this does not work, then you can speak of a race condition, but for me it worked all the time.

--
Martin




_______________________________________________ Do not post admin requests to the list. They will be ignored. X11-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/x11-users/email@hidden

This email sent to email@hidden
References: 
 >Fwd: Eliminating the xterm (From: "Nathaniel Gray" <email@hidden>)
 >Re: Eliminating the xterm (From: "Nathaniel Gray" <email@hidden>)
 >Re: Eliminating the xterm (From: Peter Collinson <email@hidden>)
 >Re: Eliminating the xterm (From: Ben Byer <email@hidden>)
 >Re: Eliminating the xterm (From: Francisco De La Cruz <email@hidden>)
 >Re: Eliminating the xterm (From: Bill Campbell <email@hidden>)
 >Re: Eliminating the xterm (From: Merton Campbell Crockett <email@hidden>)
 >Re: Eliminating the xterm (From: Bill Campbell <email@hidden>)
 >Re: Eliminating the xterm (From: "Mark E. Perkins" <email@hidden>)
 >Re: Eliminating the xterm (From: Martin Costabel <email@hidden>)
 >Re: Eliminating the xterm (From: Ben Byer <email@hidden>)
 >Re: Eliminating the xterm (From: Jeremy Huddleston <email@hidden>)
 >Re: Eliminating the xterm (From: Ben Byer <email@hidden>)
 >Re: Eliminating the xterm (From: Ralph Martin <email@hidden>)
 >Re: Eliminating the xterm (From: Jeremy Huddleston <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.