I have my music collection in my Nextcloud instance. This is synced at ~/NextCloud, so my music collection is located at ~/NextCloud/Music.

I now want to have a symbolic link from the latter folder to ~/Music. Is it safe to omit the default empty Music folder and just rmdir ~/Music; ln -s ~/NextCloud/Music ~/Music, or would this give problems with apps automatically using and detecting the Music folder?


The Music folder in a fresh Ubuntu installation is configured as a special user folder, an XDG user dir. You can see that from the music emblem on the folder icon. After your action, i.e., deleting the folder, and replace it with a symbolic link, the link will not have that status anymore: the folder icon of your link will not have the music emblem.

You can return the special status to your link by editing your user configuration file ~/.config/user-dirs.dirs. After that, it will acquire the music emblem on the folder.

Whether there will be problems actually depends on the applications you want to use and how they are configured. If you use other apps, and you do not want them to interfere in the folder where your Music symbolic link refers to, then it is probably wise to use another name for the link to your ~/NextCloud/Music folder, and leave another Music folder in place as the XDG folder. Alternatively, you will need to configure the other app to look elsewhere, if the app allows that.

  • Didn't know that. So, I could change the XDG_MUSIC_DIR to $home/NextCloud/Music. – Ward Segers Jul 17 '18 at 21:45
  • You can directly change XDG_MUSIC_DIR to $home/NextCloud/Music if you wish, instead of having it point to a symbolic link Music. – vanadium Jul 17 '18 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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