Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

Music folder with music emblem

If I just delete this folder and replace it with a symlink the music emblem is lost and replaced by a link emblem.

Music symlink with link emblem

I want it to have have both the music emblem and the symlink emblem, like this:

Music symlink with music and link emblems

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).

share|improve this question
up vote 5 down vote accepted

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.

Merge Folder Dialog

This gets the job done, but if someone knew a command line alternative with the same results I would be very happy.

share|improve this answer
This is dangerous, since it can lead to this:… – Luis Sieira Sep 18 '15 at 9:49
Thanks for the comment. I do note in the solution though that this is taking advantage of a bug and provide two warnings about what could go wrong if you aren't careful. I'd love to see--and would happily accept--another answer with a less risky solution though. – adempewolff Oct 1 '15 at 14:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.