Jump to content

Auto-open database with or without password - Command line?


AndyCan

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

Recommended Posts

Hi,

Having recently purchased a Filemaker Pro 11 license, I would like to setup a copy on our office server that opens a single database without any user interaction. I can easily manage launchctl on Mac to make sure the program is always running or started on boot, but I'm unsure as to how I should manage users and passwords.

I want each user to still have to put in the username and password when connecting to the remote server, but I want the database to open on the server without any interaction needed. If I create a password-less account for loading the database, I wouldn't want anyone else to be able to login using that account.

What are my options? Can I load a database from the command line with the username and password included there?

Thanks for your help.

Andy.

Link to comment
Share on other sites

After searching for quite a while, I can't for the life of me find a simple way to open a database from the command line. This must be so simple to do, but I can't find the solution anywhere. It's important the the database re-open after a power cut, nightly reboot or anything like that and pluggin in a monitor (or using VNC) and manually opening the file is just not an option.

Can anyone point me in the right direction?

Thanks

Link to comment
Share on other sites

It doesn't sound like you are using FileMaker Server. FMS takes care of all that for you.

To open a FM file for peer-to-peer hosting you can use a VBScript and embed the account & pw in there. Check out the FM help file for "activeX". Since this would only work if a user is logged into the server you'll always have a security risk.

Link to comment
Share on other sites

Thanks for the reply.

As we are only about three people in the office, Filemaker Pro Server would be overkill. The server is running OS X, so I guess Applescript would be the way to go. I was hoping that a basic shell script would cover it, but I guess that would just be too easy! ;)

Link to comment
Share on other sites

starter.fp7.zip

You need to create a Filemaker file whose sole purpose is to open the main file.

This starter.fp7 has the account and password for the main file installed and set as default in the file options. Additionally a start script that simply opens the main file.

This starter script can be launched via /usr/bin/open.

Since this starter script is used to open the main database, you have to secure it somehow.

Attached is a minimal starter file where you need to fill in the account, external file reference and openWithAccount attributes.

Link to comment
Share on other sites

Thanks Karsten.

The starter file seems simple enough. Could you expand on the part where I have to place the starter script in /usr/bin/open?

I am able to start the Filemaker app with Launchctl on Mac, but can't pass the file as a parameter (or don't know how)

I am also able to open a database directly by placing the .fp7 file in the login items. OS X knows which application to use to open the file, But when it opens, Filemaker just bounces up and down in the dock and doesn't do anything else until I click on the icon, at which point it continues to load the database correctly... not much use on a server.

So basically, how do I open the starter.fp7 file on a Mac when rebooting without needing any user interaction?

Hopefully someone has come across this before and knows the answer.

Thanks again!

Link to comment
Share on other sites

You'll have to experiment.

FileMaker is a picky WRT how it's getting launched. Remember: insisting on having a open dialog on launch; only opening files when it's frontmost app etc.

If putting the starter into the users startupitems works for you, you're fine.

Otherwise the options are:

An AppleScript like this

tell application "FileMaker Pro Advanced"

activate

open ("Volume:folder:starter.fp7" as alias)

end tell

Or writing a launchdaemon. See Apple docs for that.

Things that work on one machine might not on another. Try and error.

Link to comment
Share on other sites

As we are only about three people in the office, Filemaker Pro Server would be overkill.

Depends what your data is worth to you. Especially if you are concerned with power outages etc. as you mentioned. I don't think FMS for a 2 or 3 person office is overkill at all.

Link to comment
Share on other sites

Thanks for the reply.

As we are only about three people in the office, Filemaker Pro Server would be overkill.

Emphatically not, particularly if the system is mission critical to the business. You are trying to make the database behave in a way it's really not designed to operate. FileMaker Server provides all the needed functionality for safe and robust hosting to multiple users.

Steven

Link to comment
Share on other sites

This topic is 4486 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.