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!
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.
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.
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/
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.
I found that MacOS Catalina resets the symlink on reboot. sudo chflags schg (path to link) prevents MacOS from touching the link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With