Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Filemaker Server Scheduler System-level scripts

Featured Replies

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

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.