Re: 2.1.1 and xterm
Re: 2.1.1 and xterm
- Subject: Re: 2.1.1 and xterm
- From: Allen Bennettt <email@hidden>
- Date: Mon, 17 Dec 2007 00:49:19 -0500
On Dec 16, 2007, at 3:32 PM, Jeremy Huddleston wrote:
if [ -z $DISPLAY ] ; then
DISPLAY=:0
/usr/bin/osascript -e 'tell application "/Applications/Utilities/
X11.app" to activate'
fi
cd `/usr/bin/osascript /Users/john/sw/src/Xterm/getPath.app 2>/dev/
null | sed 's|[^/]*$||'`
/opt/local/bin/rxvt -tcw &
You shouldn't set the display, you should let it inherit $DISPLAY
from the environment.
The original script had '-display :0' in the rxvt call. The script
works correctly when I leave '-display :0' out. With '-display :0'
in it also works well except during the first launch of X11 it
pops up two windows, the one that I selected and the xterm from
the launchd.
launchd doesn't start an xterm. Launchd just starts the server.
Starting an X client (like xterm or X11.app) triggers launchd to
start the server.
You shouldn't be seeing an extra xterm. xterm is not started in
this case. Do you have xterm starting in your ~/.xinitrc? I don't
know osascript. What does that 'to activate' command do? Launch
X11.app if it's not running or bring it to the foreground? If it
launches it if not running, then it might just be a race where
X11.app runs (starting xterm) before rxvt runs. Try adding a
'sleep 1' after your rxvt &. Also, X11 now starts in the
foreground as of 2.1.1.
Activate: (unless you call a specific window) will bring the
application to the front, take focus with the window that was
frontmost last time the application had focus or if it hasn't been
launched open the application in its default state and bring it the
front.
-Allen Bennett
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden