How to change the desktop folder from "Desktop - Local" to a different folder on mac?

Piotr Irving picture Piotr Irving · Jun 29, 2017 · Viewed 10k times · Source

The files that are displayed on the desktop come from the folder

/Users/USER/Desktop

I am wondering if there is any way to be able to change that so the files that are displayed on the desktop come from a different folder?

The aim behind this is to use Google Drive (https://www.google.com/drive/download/) and create a "Desktop" folder in my Drive account allowing me to sync and access my Desktop from anywhere without using as much storage locally with all the files at the desktop being displayed from

/Users/USER/Google Drive/Mac Desktop

Appreciate all the help in advance!

Answer

Sam Menchyk picture Sam Menchyk · Jun 2, 2018

Backup your old default Desktop folder

If you have files in your existing Desktop folder, don’t worry. We’re going to back up your existing folder so you can copy your old Desktop files to your new DropBox Desktop folder afterwards.

Simply open a terminal and enter the following command.

sudo mv desktop desktop.bak

Create a symbolic link to your new DropBox Desktop folder

The long and short is that we’re telling OSX to create a link to the Desktop folder in your DropBox, but to treat the link as if it were the default Desktop folder itself. In this way, when you save things to your Mac Desktop, they’ll appear on your Desktop as before, but actually be stored in your new DropBox folder. Here’s how to do it…

ln -s /Users/your-user-name/Dropbox/Desktop/ ./Desktop

This worked perfectly for me.

Credit goes to https://ifyouwillit.com/life/auto-sync-your-mac-desktop-folder-with-dropbox/