OneDrive --> Desktop

Dear all,

hopefully you can help me with a solution to my “challenge”.
I’m a user of both Mac’s and Windows PC’s, and in this connection I’m making use of the OneDrive application for file management, and was wondering if it would be possible to have the Desktop “folder” of my Mac use the same “Desktop” folder as I’m using on my Windows PC (and found in the OneDrive library).

Thank you in advance for your help.

Kind regards
Lasse

There is no way I am aware of to really show the Windows Desktop Folder on your Mac or your Mac Desktop Folder on your PC. Both folders are deeply baked into the operating systems and they need to be where they are.

But… It can be done as long as you are fine with duplicate files (see below).

A not so elegant solution would be to sync those two folders on your Mac using a tool like Hazel (User Guide) or ChronoSync or a similar tool like that.

Both tools are able to exclude files you might not want to be synced (examples are thumbs.db from your Windows Desktop or “hidden” files from your Mac desktop like .DS_store).

Downside: you will end up having duplicate copies of the files on the Mac that is doing the syncing:

  1. The files will sit inside your OneDrive Desktop folder (Windows Desktop folder).
  2. The files will also be inside your Mac Desktop folder (which may or may not be your iCloud Desktop folder).
1 Like

Here’s my recipe. Example is Document but ive done it for Desktop, Videos, etc.

Redirect directories to OneDrive

  1. Empty and delete the respective directory in user home (backup documents or transfer them to the OneDrive directory
  2. Activate root account
    1. Choose Apple menu (Finder > System Preferences, then click Users & Groups.
    2. Click lock icon, then enter an administrator name and password.
    3. Click Login Options.
    4. Click Join (or Edit)
    5. Click Open Directory Utility.
    6. Click lock icon in the Directory Utility window, then enter an administrator name and password.
    7. From the menu bar in Directory Utility:
    8. Choose Edit > Enable Root User, then enter the password that you want to use for the root user. Or choose Edit > Disable Root User.
  3. Log out and back in again as the root user If the login window is a list of users, click Other, then log in.
  4. If there’s an existing folder with the same name in the user’s home directory, delete it.
    1. If you get an operation not permitted error:
      1. Make sure in the Finder that that folder is not locked (in Get Info).
      2. Go to System/ Preferences/Security&Privacy/Privacy/Full Disk Access and add Terminal to the list.
  5. Open terminal and create a symlink: ln -s /Users/yourusernamegoeshere/OneDrive/Documents /Users/yourusernamegoeshere/Documents
  6. Lock the symlinks
    1. Use Finder to go to the new folder. Get Info. Click Locked.
  7. Log out and log back in with user account
  8. Deactivate root account

If as part of this root creates any new folders/files, don’t forget to change the owner to yourusernamegoeshere

5 Likes