|
|
A shell script to share Address Book data between users
Interesting, although copying the address book back and forth seems like not the best way to share the data. It seems to me like a symlink is the way to go.
As a proof of concept, I just tried this on my machine. I copied the ~/Library/Application Support/AddressBook directory of my main user to /usr/local/PublicAddressBook (for lack of a better location and name) and then, for each user, after backing up their address book...
... then I created a symlink...
Boom, it works. Each user can read and write to the same data in real time. When one person updates the address, the next time the other person goes to that address, they see the latest info. As for race conditions when both want to update at the same time... well, that probably means you've outgrown the default Address Book and need something designed for such a thing. My only point here is that linking instead of copying is probably the way to go.
two possible buga-boos
Unless both of your users are Admin users, You will have to make sure both users share a group ID and that the file is writable by that group.
also one thing to watch out for is that the addressbook program may possibly delete and recreate the addressbook from time to time (as for example iTunes and iPhoto do with their databases). if so you will periodically have to restore the group priveledges.
Why not...
Why not:
Why not...
Yeah, that's a good idea. I should never post when I'm in a hurry, because I always leave stuff out. Like the permissions issue. I set the permissions on the PublicAddressBook to 777, which is certainly not the ideal way to do it.
Why not...
Yeah, that's a good idea. I should never post when I'm in a hurry, because I always leave stuff out. Like the permissions issue. I set the permissions on the PublicAddressBook to 777, which is certainly not the ideal way to do it.
A shell script to share Address Book data between users
I've noticed that the files keep getting larger and larger... |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.11 seconds |
|