Jump to content

  •  

Photo

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

sharing network password user

  • Please log in to reply
9 replies to this topic

#1 AndyCan  enthusiast

AndyCan
  • Members
  • 71 posts
  • FM Application:9
  • Time Online: 1h 39m 29s

Posted 14 December 2011 - 04:02 PM

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.
  • 0

#2 AndyCan  enthusiast

AndyCan
  • Members
  • 71 posts
  • FM Application:9
  • Time Online: 1h 39m 29s

Posted 14 December 2011 - 04:56 PM

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
  • 0

#3 Wim Decorte  Carpal Tunnel

Wim Decorte
  • Moderators
  • 3,294 posts
  • LocationPhiladelphia
  • FM Application:13 Advance
  • FMGo:iPhone / iPod Touch, iPad
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:7, 8, 9, 10, 11, 12
  • Membership:TechNet
  • Time Online: 23d 19h 23m 26s

Posted 14 December 2011 - 05:01 PM

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.
  • 0

#4 AndyCan  enthusiast

AndyCan
  • Members
  • 71 posts
  • FM Application:9
  • Time Online: 1h 39m 29s

Posted 14 December 2011 - 05:37 PM

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! ;)
  • 0

#5 Karsten Wolf  novice

Karsten Wolf
  • Members
  • 68 posts
  • LocationGermany
  • FM Application:10 Advance
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Intermediate
  • Time Online: 2d 20h 31m 46s

Posted 14 December 2011 - 07:12 PM

Attached File  starter.fp7.zip   6.04KB   155 downloads

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.
  • 0

#6 AndyCan  enthusiast

AndyCan
  • Members
  • 71 posts
  • FM Application:9
  • Time Online: 1h 39m 29s

Posted 15 December 2011 - 09:59 AM

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!
  • 0

#7 doughemi  lifetime learner

doughemi
  • Members
  • 704 posts
  • FM Application:12 Advance
  • Platform:Cross Platform
  • Skill Level:Intermediate
  • Time Online: 88d 17h 21m 28s

Posted 15 December 2011 - 01:07 PM

Put it in Apple menu->System Preferences...->Accounts->Login Items
  • 0

Give the gift of life. Register as an organ donor today!
http://www.organdonor.gov/become.asp


#8 Karsten Wolf  novice

Karsten Wolf
  • Members
  • 68 posts
  • LocationGermany
  • FM Application:10 Advance
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Intermediate
  • Time Online: 2d 20h 31m 46s

Posted 15 December 2011 - 02:43 PM

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.
  • 0

#9 Fitch  Imaginary friend

Fitch
  • Moderators
  • 3,968 posts
  • LocationPortland, Oregon
  • FM Application:13 Advance
  • FMGo:iPhone / iPod Touch, iPad
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:7, 8, 9, 10, 12
  • Membership:TechNet
  • Time Online: 15d 9h 36m

Posted 15 December 2011 - 04:18 PM

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.
  • 0
Tom Fitch :: Portland, Oregon :: Fitch & Fitch: FileMaker consulting

#10 Steven H. Blackwell  Humble Servant

Steven H. Blackwell
  • Moderators
  • 4,694 posts
  • FM Application:13 Advance
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:7, 8, 9, 10, 11, 12
  • Membership:FileMaker Business Alliance, FIleMaker Platinum Member
  • Time Online: 8d 9h 51m 49s

Posted 16 December 2011 - 04:48 AM

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
  • 0

Steven H. Blackwell
Platinum Member Emeritus, FileMaker Business Alliance
Platinum Member, FileMaker Business Alliance (2007-2011)
Partner Member, FileMaker Solutions Alliance (1998-2007)
Partner Member, Claris Solutions Alliance (1997)
FileMaker Certified Developer 7|8|9|10|11|12
FileMaker Authorized Trainer 9|10|11|12
_ _ ____________________________ _ _
http://www.fmp-power.com
http://www.filemakersecurity.com





FMForum Advertisers