How to set it up?
Launch Terminal, starting our work.
Let’s navigate to our home folder:
Create a folder in iCloud that will contain desktop files:
mkdir "Library/Mobile Documents/com~apple~CloudDocs/Desktop"
Copy there the whole your desktop, keeping all attributes:
cp -p -R -v Desktop/* "~/Library/Mobile Documents/com~apple~CloudDocs/Desktop/"
Rename your original "Desktop" folder in user profile:
sudo mv Desktop Desktop_
You could delete it immediately, but it’s a good idea to keep a backup for a case.
Create a symbolic link to the new desktop location:
sudo ln -s "Library/Mobile Documents/com~apple~CloudDocs/Desktop" Desktop
Icon order will reset, so it’s a good chance to review what is indeed necessary to keep 🙂
From now on, when you delete files from desktop, the warning message will be different:
When saving a file or a folder to desktop, you will see its iCloud sync status:
As a bonus, with release of iOS 9 and OS X El Capitan you will be able to access your desktop docs from mobile device or in browser.
For now, it’s possible to check how much storage is used and delete any file, if necessary, from iCloud settings on a phone or tablet:
If it is going smoothly and syncs as it should, you can now delete an old desktop backup:
rm -fr ~/Desktop_
You can now repeat all steps starting with 3 and use the same desktop on any of your computers logged in to the same iCloud account!