Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: 2.1.1 and xterm
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2.1.1 and xterm




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


References: 
 >Re: 2.1.1 and xterm (From: "John Koren" <email@hidden>)
 >Re: 2.1.1 and 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 © 2011 Apple Inc. All rights reserved.