Re: inherited issue -- script referring to X11 in Jaguar vs. Panther
Re: inherited issue -- script referring to X11 in Jaguar vs. Panther
- Subject: Re: inherited issue -- script referring to X11 in Jaguar vs. Panther
- From: Ronnie Misra <email@hidden>
- Date: Mon, 9 Feb 2004 15:25:20 -0800
On Feb 9, 2004, at 1:39 PM, Jennifer Landefeld wrote:
I've inherited an issue that I can't readily solve or test as I'm
running Jaguar and the person needs a solution for why a program won't
launch in Panther.
Background: academic lab, students wrote a program and one student, no
longer here (or even in the States anymore) wrote the script to make
it function in OS X -- under Jaguar. Near as I can tell the problem is
in the script to launch the program. It isn't looking the correct
place for X11 under Panther?? I'm not very familiar with X11 or
AppleScript but it appears that it tries to launch the "old" X11 and
fails when someone tries to run this in Panther (does that make
sense?).
Might there be a hardy soul out there that could take a look at the
script for me and tell me what needs to change to have it launch in
Panther? I think I can find someone to test its functionality if I can
just determine where to point it in the script.
Here is the script that functions perfectly well in Jaguar:
My guess is that the existing script only works on Jaguar systems that
already have XDarwin installed. On my Panther system, the script fails
at the line:
open application file id "org.xfree86.xdarwin"
because I don't have XDarwin installed, and I imagine you'd see the
same failure on Jaguar systems without XDarwin. Try the following
script, and let me know if it works for you:
set rs to 0
try
tell application "Finder" to open application file id "com.apple.x11"
set rs to 1
end try
if rs = 0 then try
tell application "Finder" to open application file id
"org.xfree86.xdarwin"
set rs to 1
end try
if rs = 0 then
display dialog "No X server found"
else
tell application "Finder"
get container of (path to me) as string
end tell
set mypath to POSIX path of result
do shell script "cd " & mypath & "; ./hhsim.sh"
end if
It should also work on your Jaguar systems. I've changed the logic to
prefer Apple X11 to XDarwin, I hope you don't mind! :) Let me know if
this doesn't work for you...
Ronnie
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.