Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5719 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I cannot make FileMaker Server 9 execute system-level scripts (Mac OS X).  The scripts run fine from terminal.

For example, I create a file called "test1.sh" with the contents:

#! /bin/sh

osascript -e 'tell application "Safari"' -e 'activate' -e 'end tell'

When I run the above from  the FileMaker Server Scheduler - nothing happens. When I check logs -

I see in the console log the following error:

osascript: kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only

In the FileMaker Server log, file "stderr"

INIT_Processeses(), could not establish the default connection to the WindowServer./Library/FileMaker Server/Data/Scripts/test1.sh: line 2: 15412 Abort trap              osascript -e 'tell application "Safari"' -e 'activate' -e 'end tell'

Any ideas?

Thanks

Posted (edited)

First of all, you've got a space on line #1 after the exclamation point. But that probably won't stop your script from executing.

There are some limitations to using the osascript command from the Terminal. You might want to take a look at this to get some insight:

http://macscripter.net/viewtopic.php?id=26334

But I think the main problem is that the script will be running as the "user" fmserver, which is a non-GUI account. You could probably use something like the sudo command to "switch" the terminal session to the logged in user account and execute your script from there.

Simon.

Edited by Guest

This topic is 5719 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.