Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 298
Piotr Irving Avatar asked Jun 29 '17 20:06

Piotr Irving


People also ask

How do I change my desktop folder on Mac?

Click the folder icon in the upper right corner of the info window. Press command + V. The default folder icon will now be replaced by the image you selected.

Why does it say Documents Local on my Mac?

You've got two folders called Documents, one on iCloud Drive and the other one on your Home directory. It will says - Local or iCloud unless you deleted Documents folder on your iCloud Drive as it cannot be renamed.


Video Answer


3 Answers

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/

like image 148
Sam Menchyk Avatar answered Oct 11 '22 18:10

Sam Menchyk


Move everything you have on your Desktop to the cloud:

mv ~/Desktop/* ~/Dropbox/MyDesktopOnTheCloud/

Remove your current local Desktop folder from your home directory:

sudo rm -rf ~/Desktop

Create a symlink to your Desktop folder on the cloud:

ln -s ~/Dropbox/MyDesktopOnTheCloud ~/Desktop

On MacOS Catalina, in order to prevent the system from deleting your symlink and creating a blank Desktop folder after every system restart, change the flag of the symlink:

sudo chflags -h schg ~/Desktop

It's important to specify the -h option to instruct the chflags command not to follow the symlink. In this way, the link is unchangeable by the system, but the destination folder is not. The system can indeed save screenshots to the Desktop, for instance. If you omit the -h option, the symlink will be deleted after reboot and the folder in Dropbox will be marked as unchangeable instead.

like image 39
Strozzascotte Avatar answered Oct 11 '22 18:10

Strozzascotte


I found that MacOS Catalina resets the symlink on reboot. sudo chflags schg (path to link) prevents MacOS from touching the link.

like image 3
Stevan Reese Avatar answered Oct 11 '22 19:10

Stevan Reese