I want to replace the folders in my home/
directory with symlinks to folders in another location, but I want to retain the folder emblems without having to go searching for them. How do I do this?
To illustrate what I'm asking, the directories in the home folder have nice emblems that look like this:
If I just delete this folder and replace it with a symlink the music emblem is lost and replaced by a link emblem.
I want it to have have both the music emblem and the symlink emblem, like this:
Preferably I'd like to be able to do this without having to manually hunt down and set the icon for the folder (but a good answer explaining how to do so would be upvoted as a good alternative).
For Ubuntu 18.04:
In 18.04 you can no longer paste/merge symlinks over directories (with good reason). Luckily, if you delete the home folder sub-directories (documents, downloads, etc.) and replace them with symlinks, the icons will automatically reappear if the names are the same.
Prior to Ubuntu 18.04:
This can be done using the "merge folder" functionality of Nautilus (the default file browser in Ubuntu).
Simply create the symlink in another location with the same name as the folder you want to replace, then copy and paste it into your home folder.
A dialog will appear asking if you want to merge the folders and you should click the Merge button and you will now have a new symlink with name and folder emblems of the old folder.
WARNING: From my testing, this doesn't appear to be a true 'merge' (it's more like a useful--albeit potentially dangerous--bug), any files or subdirectories in the folder you are replacing with the symlink appear to be deleted (aka, only replace empty folders if you don't want to lose files). Proceed with caution!
WARNING: Also, absolutely do not replace a folder that itself contains symlinks or it will follow the symlinks and recursively delete everything in the target directories.
This gets the job done, but if someone knew a command line alternative with the same results I would be very happy.