The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus 1 for Mac
FAQ Members List Calendar Today's Posts

 
OmniFocus on Multiple Computers [USB, iDisk, .Mac, Syncing] Thread Tools Search this Thread Display Modes
I'd like to sync OF between my MacPro up in my office (where the app and its database lives) and my MacBook down in the house, but I'm not going to try to figure out rsync to do it. I don't even have OF installed on the MacBook, but I still use the laptop to enter and edit info in OF when I'm not in my office.

How, you ask? Both machines are running Leopard, and I use Leopard's Screen Sharing to view and work with the MacPro's screen from the MacBook. It works great.

I used some of the tips from Macworld's Screen Sharing article to improve the sharing experience.

http://www.macworld.com/article/1310...harepower.html

This works easily for me because my house and office are on the same LAN, but I think it will work over the Internet, too, though you may have to fiddle with router settings.

Until the Omni folks deliver their own sync features, screen sharing does it for me.
 
Thanks for getting OF 1.0 out earlier rather than later : )

Quote:
Originally Posted by Brian View Post

(Additionally, while this feature is important to some of our users, it's not going to be useful to everyone. Delaying OmniFocus for feature X helps the folks that use it, but hurts everyone else. Sometimes an imperfect solution that ships sooner is still the better choice.)
 
Quote:
Originally Posted by marhar View Post
Can you post an example rsync script? Of course they would be unsupported, disclaimed, etc.
Sure! First, I have all of my accounts push their OmniFocus data to a central server every half hour. This central server could be .Mac, but in my case I just push to a Mac that I always leave running (we'll call it "example.org"). So, here's the crontab entry I install everywhere:

Code:
#
# Mirror current Focus data to example.org
#
*/30 * * * * /usr/bin/rsync -az --delete ~/Library/Application\ Support/OmniFocus/. example.org:Mirrors/$(hostname -s)/OmniFocus/.
I use zsh, so in all my .zshenv files I've defined two shell functions: one which publishes manually (called "push-focus") which I use before putting my laptop to sleep (since cron can't run while it's asleep), and one which rsyncs a specific remote mirrors back to my local computer:

Code:
function push-focus() {
    /usr/bin/rsync -vP -az --delete $* ~/Library/Application\ Support/OmniFocus/. example.org:Mirrors/$(hostname -s)/OmniFocus/.
}

function sync-focus() {
    if [ "$1" = "" ]; then
        echo "Usage: sync-focus hostname"
    else
        echo "Syncing from $1"
        rsync -avP -z --delete example.org:Mirrors/$1/OmniFocus/Perspectives ~/Library/Application\ Support/OmniFocus/
        rsync -avP -z --delete example.org:Mirrors/$1/OmniFocus/'OmniFocus.ofocus*' ~/Library/Application\ Support/OmniFocus/
    fi
}
When I sit down at home in the evening, I say "sync-focus hypno" and when I sit down at work in the morning, I say "sync-focus jamethiel". I then close and reopen my document in OmniFocus, it complains that it's locked by the other computer, I click "Override" and start working.

This approach is not ideal, I know. Did I mention that we're working on synchronization for 1.1? :) But since you asked, I thought I'd share what I'm doing for what it's worth.

Tom Negrino's screen sharing approach seems much simpler than my rsync commands. (Though, unfortunately, it loses Quick Entry and the Clipping service, both of which I use heavily.)
 
i am new to the forum, so I apologize if this is something obvious -

syncing between two machines owned by the same person would be nice - but, I have a partner and we run a work "to do" list that we are constantly updating. I am fine with the list being only on my laptop versus also on my blackberry, and desktop.... What I would really like is to be able to work off of the same list (database?) as my partner.

I am not a programmer and really don't want to tinker - but for years I have been wanting a program that could sync "to dos" or a contact database without having some huge corporate server. We are a 2 person office with freelancers. My partner and I are constantly meeting and call to "go over" the "list". How cool if we had a sync'd list, or if it worked through ichat or email or a subscription

Am I talking about something that already exists - or am i talking about something that will never exist - an omni focus that could have subscriptions like my ical. my partner subscribes to the work "to do" my wife to the personal "to do" etc.... and they are all managed through my omnifocus. Pie in the sky?? Just wondering
 
I thought I had .Mac syncing working. I was able to sync my laptop with the database I had placed on my .Mac account. Problem is that when I go back to my officer tower .Mac sync fails. So I log out and log back in and it works, so does OmniFocus and when I quit OmniFocus I notice that the file is updated on my .Mac account. I go back to my Laptop and it has a sync problem, so I log out of .Mac in the preferences pane and log back in, it syncs fine. This problem happens back and forth each time I go to the other computer.

I had started a thread suggesting that .Mac sync be built into OmniFocus. I use Transmit from Panic as my FTP client. Panic has .Mac sync built into the software. I am assuming it is not that hard to do. Anyhow, I guess I can wish for this feature to be added to 2.0

jerad
 
First, thanks Ken.

I've ended up taking a slightly different approach. I manage to split my tasks pretty neatly between work and domestic/personal so I've created a system whereby I will email my domestic and personal tasks home when I am at work and email my work tasks to the office if I am at home and then the native email import system works its magic. I'm currently doing this by entering the task into OmniFocus and then using an AppleScript which takes any selected tasks and generates an email with the data formatted as per the user guide notes. However, I am also working on a small Cocoa app (mainly to help my Cocoa learning) which will allow you to enter the various details of a task and then email it. I'm then going to devise an AppleScript which will handle that email rather than using the native system so that I can do various extra things such as creating projects and contexts if necessary and store the full context 'path' (I've made a couple of other posts in the forums about these issues).

I'm half hoping that 1.1 takes a while to arrive so that my work doesn't become obsolete too soon! ;)
 


Could foldershare be used to sync the data to different mac's?

www.foldershare.com
 
Hi all,

I've taken Ken's post and created the files necessary and instructions for everyone to do this themselves. You can add as many other files and folders to this process as you like. It's not limited to OF.

Requirements:
You must have a central, 99% uptime repository with a static IP. (I am using my personal domain at Dreamhost). I you want to this to be awesome, install Growl and the growlnotify tool, because i've included growl notifications in the script, alerting when it syncs.

Terms:
"Client" refers to the client computers running OmniFocus.

Each of your client computers has a "computer name." You can find this by going to system preferences -> sharing. Ken's examples were jamethiel and hypno.

"Host" refers to the central computer (which could be running OmniFocus) which contains the Mirrors folder and hosts sync files/backups for OmniFocus

myhost.com refers to your static IP of your host. In my case, it's code404.com. In ken's case (ken case! ha!), it's example.org. If you are using a mac, enable remote access in the sharing preferences

myname refers to your login name/account name on myhost.com

Setting up the DSA keys:
Since you don't want to be entering passwords everywhere, you should generate DSA keys so your computers can freely communicate.

1. On your first client computer, open Terminal. You're now most likely in your home directory. Type "ssh-keygen -tdsa", and accept all defaults.

2. On your host computer, do the same.

3. On your client computer, open another terminal window. Type the following:
ssh myname@myhost.com
Enter your password. Just leave this window alone. We'll use it to do some cleanup later.

4. In the first terminal window, where you ran ssh-keygen, type the following:
scp ~/.ssh/id_dsa.pub myname@myhost.com:id_dsa.pub

5. In the second terminal window (myhost.com), type the following commands:
cat id_dsa.pub >> ~/.ssh/authorized_keys2
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys2
rm id_dsa.pub


6. Repeat steps 1-5 for each client computer.

This will now allow you to ssh, scp and rsync from your client to host without having to enter your password.

If you're not much of a terminal junkie, you're likely using bash, the default shell. If you're using tcsh or zsh, you already know enough about what you're doing to modify the following instructions to meet your needs.

Creating the environment functions
1. Grab the file bash_profile.zip included in this post.

2. Put it in your home directory.

3. Double click it to unzip it, then delete the zip file.

4. type the following command:
mv bash_profile .bash_profile

5. Edit the .bash_profile. If you have BBEdit or TextMate installed, type bbedit .bash_profile or mate .bash_profile. If you don't, type
/Applications/TextEdit.app/Contents/MacOS/TextEdit .bash_profile.

I've renamed "push-focus" and "sync-focus" to "-files" because I've modified my own personal one to sync multiple files, not just OmniFocus. Change the content in red to your own information. Also, if you didn't install growlnotify, delete the two lines in blue

username="enter your username here"
hostname="enter your hostname here"

function push-files() {
/usr/bin/rsync -vP -az --delete $* ~/Library/Application\ Support/OmniFocus/. ${username}@${hostname}:Mirrors/$(hostname -s)/OmniFocus/.
/usr/local/bin/growlnotify -m "Synced OmniFocus (push)"
}

function sync-files() {
if [ "$1" = "" ]; then
echo "Usage: sync-focus hostname"
else
echo "Syncing from $1"
rsync -avP -z --delete ${username}@${hostname}:Mirrors/$1/OmniFocus/Perspectives ~/Library/Application\ Support/OmniFocus/
rsync -avP -z --delete ${username}@${hostname}:Mirrors/$1/OmniFocus/'OmniFocus.ofocus*' ~/Library/Application\ Support/OmniFocus/
/usr/local/bin/growlnotify -m "Synced OmniFocus (sync)"
fi
}


6. Save, and close the file.
7. if the process is still hanging from textedit, and you don't have a prompt, hit control-c (not command-c).

8 (I think?). Once you've saved it with your edits, type source ~/.bash_profile to reload it.

Creating the auto-syncing script
1. Grab the file filesync.sh.zip included in this post.

2. Put it in your home directory.

3. Double click it to unzip it, then delete the zip file.

4. Edit it and replace your own info just like you did for the last one.

Yay! They're now fully-functional scripts. But we can't do anything with them yet...

Setting up the host:
There are better ways of folder-checking followed by folder creation and so on. I'm going for quick and dirty. We're going to manually set up the repository folders on the host computer. Assuming you still have a terminal window open connected to the host computer (if you don't, ssh myname@myhost.com and get one going)

Ok. So we're in a terminal window connected to the host.

1. Create a folder "Mirrors":
mkdir ~/Mirrors

2. Create folders inside it for each of the client computers. Repeat for each one
mkdir -p ~/Mirrors/Computer Name/OmniFocus
(e.g., mkdir -p ~/Mirrors/jmaxwell-laptop/OmniFocus)

You can now close the terminal window connected to the host.

Now the host is ready to receive the files. If you're going to sync other programs, make folders within each Computer Name folder for that program name, too. For example, I have folders for DEVONthink and OmniPlan inside each of mine.

Pushing the file up there:
1. in terminal, type push-files. The result should look something like this:
jmaxwell-mlap-2:~ jkmaxwell$ push-files
building file list ...
944 files to consider
./
OmniFocus.ofocus/
OmniFocus.ofocus.lock
495 100% 0.00kB/s 0:00:00 (1, 0.3% of 944)
OmniFocus.ofocus/2F142372-4714-4D3E-8D4C-20775EB8862A:B5689632-229D-4157-80CD-CED478B5F09D.xml
263 100% 28.54kB/s 0:00:00 (2, 17.5% of 944)
OmniFocus.ofocus/C7917066-B881-49C6-818B-91BC5559E280:2F142372-4714-4D3E-8D4C-20775EB8862A.xml
210 100% 18.64kB/s 0:00:00 (3, 76.3% of 944)

sent 83156 bytes received 80 bytes 18496.89 bytes/sec
total size is 807074 speedup is 9.70


And if you have growl, you'll get a growl notification when it finishes.

Setting up the LaunchAgent:
Although unix folks are more accustomed to cron, it's been phased out (but still supported) in OS X, in favor of LaunchAgents (for tasks run while the user is logged in) and LaunchDaemons (for tasks run regardless of user login). We're going to set up a LaunchAgent that runs every 30 minutes. (I haven't added growl notifications to this one, but I'd like to eventually and will edit this post when that happens)

1. grab the file com.omnigroup.OmniFocusSync.plist.zip from this post and put it in your home directory
2. double-click it to unzip it to com.omnigroup.OmniFocusSync.plist
3. delete the left-over zip file
4. open a terminal window and edit the file. If you have BBEdit or TextMate installed, type bbedit com.omnigroup.OmniFocusSync.plist or mate com.omnigroup.OmniFocusSync.plist. If you don't, type
/Applications/TextEdit.app/Contents/MacOS/TextEdit com.omnigroup.OmniFocusSync.plist.

Change the content in red to your own information.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.omnigroup.OmniFocusSync</string>
<key>ProgramArguments</key>
<array>
<string>/Users/(enter your account name here)/filesync.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>1800</integer>
</dict>
</plist>


5. Save, and close the file.
6. if the process is still hanging from textedit, and you don't have a prompt, hit control-c (not command-c).
7. Move the file to LaunchAgents, set permissions, and load it up:

mv com.omnigroup.OmniFocusSync.plist ~/Library/LaunchAgents/

sudo chown root ~/Library/LaunchAgents/com.omnigroup.OmniFocusSync.plist

sudo chgroup wheel ~/Library/LaunchAgents/com.omnigroup.OmniFocusSync.plist

sudo launchctl load ~/Library/LaunchAgents/com.omnigroup.OmniFocusSync.plist


As long as you didn't get an error, you've successfully set up auto-syncing on your client computer. It will now sync omnifocus data every 30 minutes. As Ken said above, you can use push and sync manually in terminal now:

push-files
This pushes the current version of your omnifocus file from your client computer (the one on which you're typing) to the host. Use this right before you're about to switch from one computer to another, go home from work, etc.

sync-files computername
This gets the latest version of your omnifocus file from your host computer and puts it on your client computer. Use this when you get on another computer, when you get home from work, etc.

If anyone has any problems, please let me know.
Attached Files
File Type: zip bash_profile.zip (869 Bytes, 442 views)
File Type: zip com.omnigroup.OmniFocusSync.plist.zip (953 Bytes, 429 views)
File Type: zip filesync.sh.zip (766 Bytes, 431 views)

Last edited by Señor Pantalones; 2008-01-31 at 12:14 PM.. Reason: Revised
 
btw, this seems like a lot of info, but it only takes about 10 minutes :)
 
Señor Pantalones,

Thanks so much for posting these detailed instructions. They are great!

I've just set it up, and have a few corrections and notes.

There were a few errors:
1. In "Terms:", you suggest getting the computer name from sharing preferences. The name can be mangled, so "MacBook Pro David" becomes "MacBook-Pro-David". It would be better to get the computer's name from hostname -s instead.

2. Step 6 of Setting up the DSA keys should be:
Repeat steps 1,3,4 and the cat and rm commands of step 5.

3. In the file you posted:filesync.sh, change "/users/jkmaxwell" to "~"

4. In the section on setting up LaunchAgent, the LaunchAgents folder may not exist, so you may need to:
mkdir ~/Library/LaunchAgents

Also, Change:
sudo chown root ~/Library/LaunchAgents/com.omnigroup.OmniFocusSync.plist
sudo chgroup wheel ~/Library/LaunchAgents/com.omnigroup.OmniFocusSync.plist

To:
sudo chown root:wheel ~/Library/LaunchAgents/com.omnigroup.OmniFocusSync.plist

5. growlnotify doesn't currently work reliably in Leopard, so if you're using 10.5 don't expect to get notifications.

6. I don't think "push-files" and "sync-files" are valid bash function names, they should be "push_files" and "sync_files".

Thanks again,
David

Last edited by davidamis; 2008-02-10 at 01:29 PM.. Reason: added an error
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Security of OmniFocus idisk syncing macula OmniFocus 1 for Mac 1 2010-08-23 05:23 AM
Sync Multiple accounts over multiple computers Flexattend OmniFocus Syncing 13 2010-03-16 03:21 PM
Multiple iphones on multiple computers heretemp OmniFocus for iPhone 0 2008-09-26 11:42 AM
Multiple users sharing one iDisk? lhotka iDisk/MobileMe/.Mac Syncing 1 2008-07-11 09:20 PM


All times are GMT -8. The time now is 06:10 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.