Re: Eliminating the xterm
Re: Eliminating the xterm
- Subject: Re: Eliminating the xterm
- From: Martin Costabel <email@hidden>
- Date: Tue, 20 Nov 2007 11:41:19 +0100
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)
This email sent to email@hidden