Wednesday, May 16, 2012

Sharing Your Mac OS X Desktops Using Google Drive

Here is what my Macbook Desktop looks like:


My iMac desktop in my office also looks exactly like the above. In fact, when I create a file on my Macbook desktop at home, it magically appears on my iMac desktop in the office.

My desktop now lives in the Cloud, thanks to Google Drive. There is no "special folder" that I have to remember putting my files into for them to be synced across all my machines.

How did I do this? Read on!

First, you have to install Google Drive. Go to http://drive.google.com and log into your Google account. Click on the "Get started with 5 GB free" button on the top.
Click on "Download Google Drive" link at the bottom of the left menu and follow instructions to download and install the DMG for Google Drive.

Launch Google Drive from your Application Menu (or Launchpad on OS X Lion) and sign in using your Google account.

Next, launch a terminal and change your Desktop to use Google Drive instead as follows:

$ cd
$ mv Desktop/* Google\ Drive/
$ rm -r Desktop
$ ln -s Google\ Drive/ Desktop

Log out and log back in.

Now your Desktop should start syncing and showing all your files in Google Docs. Any new files or folders that you create in your Desktop from now on will be synced across all machines that have Google Drive set up.

Repeat the aforementioned instructions for all machines which you want to keep in sync and enjoy the ride!

13 comments:

Michael Sebastian said...

this seems only to work for the first computer. When I try to repeat on the second computer, I get a message that the "file exists".

This would be the ideal: to have Mac user folder subfolders like "Desktop", "Downloads", etc, all simply point to shared folders on Google Drive. I know this can be done with symlinks, but I keep running into this same problem.

Any suggestions? And thank you, Sujoy.

Sujoy Gupta said...

Michael, which file is the second computer complaining about existing?

Don Held said...

How would you undo the process? It does not seem to be working properly and I am not familiar with "terminal".
Thanks, Don Held

Sujoy Gupta said...

@Don Held, in order to answer your question, I will need to know where in the process you got stuck.

Bill and Dianna said...

Hi, When entering the commands at the terminal, I get "Permission denied" when I try to remove the Desktop and "File already exists" when I enter the last line of code.

nomartas benq said...

I think, technology is working computer, iPhone and including laptops

Sujoy Gupta said...

@Bill and Dianna, what are the permissions of your Desktop folder? Can you paste the results of the following two commands (type these in a terminal)

ls -ld ~/Desktop

whoami

Sujoy Gupta said...

@Don Held, a terminal is a window in which you can type commands. You can launch a terminal by first pressing Cmd + spacebar and then typing terminal in the search box that pops up.

Anonymous said...

you are the best! Scared me when I did the rm, thought i lost everything, but noticed that it just moved to the google drive folder. THANKS!!!

mahasiswa teladan said...

hi...Im student from Informatics engineering nice article,
thanks for sharing :)

Anonymous said...

Hi, I'm about to do this.
What is the way to reverse the process?

Sujoy Gupta said...
This comment has been removed by the author.
Sujoy Gupta said...

@Anonymous, you can delete Desktop and create again, this time without reference to Google Drive:

$ cd
$ mkdir ~/Desktop2
$ mv ~/Desktop/* ~/Desktop2/
$ rm Desktop
$ mv Desktop2 Desktop