Re: osascript: application isn't running. huh?
Re: osascript: application isn't running. huh?
- Subject: Re: osascript: application isn't running. huh?
- From: Paul Scott <email@hidden>
- Date: Wed, 27 Feb 2008 19:19:03 -0800
Try this:
1. Log onto console.
2. Log on via ssh (from another machine) as same user.
3. Run script reed (which accepts loop count as argument):
#!/bin/bash
osascript - $1 <<'EOF'
on run argv
set foo to {}
repeat with i from 1 to item 1 of argv
set end of foo to i
end repeat
return foo
end run
EOF
~ 7:03pm %./reed 999999999
4. While script is running, log out of console.
5. Script dies with this output:
osascript[469] <Warning>: CGSShutdownServerConnections: Detaching
application from window server
osascript[469] <Warning>: CGSDisplayServerShutdown: Detaching display
subsystem from window server
osascript[469] <Error>: kCGErrorRangeCheck : On-demand launch of the
Window Server is allowed for root user only.
osascript[469] <Error>: kCGErrorRangeCheck : Set a breakpoint at
CGErrorBreakpoint() to catch errors as they are returned
osascript[469:10b] HIToolbox: received notification of WindowServer
event port death.
osascript[469:10b] port matched the WindowServer port created in
BindCGSToRunLoop
26:99: execution error: Application isn't running. (-600)
Maybe not timeout as such, but surely timing. "Application isn't
running" is obviously associated with inability to communicate with
window server, and script ends when notification is received;
obviously some work is done before the error is propagated.
But is there a way to get osascript to work correctly without
attaching to the window server? Dunno. But I'd like to.
Paul
On Feb 27, 2008, at 5:33 PM, Paul Scott wrote:
Mark J. Reed wrote:
And it only happens when I'm ssh'ed in; in Terminal on console, I can
build arbitrarily long lists, to the point where it takes a long time
for the script to run, and osascript patiently waits for it to
complete...
Even if you're ssh'd in, the script will work if you're also logged
in on the console.
It fails after what appears to be a connection timeout period if
you're not logged
in to the console. I've tried it on different machines, and the
timeout sometimes
happens at 22, or 23, or 24. I'm pretty sure it's a timeout
especially considering
the error says "execution error: Application isn't
running." [anymore!]
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden