0

I've bought a new SSD in which did a fresh install of Ubuntu 24.04. I've tried this successfully on my previous SSD in which I had done this on Ubuntu 22.04, but I can't remember how I did it. What I want to do is for Ubuntu to assume the Desktop, Documents, Downloads, Pictures and Videos folders already existent on my NTFS drive as the default ones, leaving the ones on Ubuntu home folder intact. Upon seeing a similar answer here, someone suggested "Ubuntu tweaks", but the app doesn't show or have what I need.

2 Answers2

1

There are multiple possibilities. Your NTFS partition obviously should be automatically mounted during startup through /etc/fstab for this to work.

  • By far the easiest way to connect these folders to existing folders on an NTFS partition will be to replace the current folders by symbolic links to the target folders on the NTFS partition.

    • Delete the current folders ("Documents", "Downloads", ...) in your home directory.

    • Create symbolic links to the target folders in your home directory. (You need to turn on the right-click menu item "Make link" in Files first to create symbolic links with Files)

    • Your ~/.config/user-dirs.dirs will now have been changed because you deleted the folder. Open it in a text editor, and restore the paths to their original value, e.g. .XDG_DESKTOP_DIR="$HOME" should read XDG_DESKTOP_DIR="$HOME/Desktop", etc.

    If you instead do this from the terminal, there will be no need to correct ~/.config/user-dirs.dirs.

  • Another approach requires you to be root. You can mount --bind the folders on the NTFS partition on the respective folders in your home partition.

  • In principle, you could edit ~/.config/user-dirs.dirs so the XDG special folders instead point to the folders on your mounted NTFS partition. This is not recommended, because these folders then will not anymore live in your home directory, although they still can be reached easily from the left pane in the file manager.

vanadium
  • 97,564
-1

I figured out a pretty simple solution to my question.

  1. Create a subfolder in your /mnt folder and give it any name you wish (mine is the UUID number, i.e. /mnt/01D266B54B2782C0). Find said UUID number in your Disks app when you click on any partition.

  2. Still on that app, click on the wheel below any partition to Edit Mount Options.

  3. While there, uncheck "User Session Defaults" and insert as the Mount Point the folder path you created on step 1, /mnt/01D266B54B2782C0. Click ok and reboot.

  4. Go to ~/.config/user-dirs.dirs and replace every $HOME/ with /mnt/01D266B54B2782C0 in every directory you want to change, i.e. XDG_VIDEOS_DIR="/mnt/01D266B54B2782C0/Videos"