• 6 Posts
  • 142 Comments
Joined 10 months ago
cake
Cake day: November 24th, 2023

help-circle


















  • would you suggest XDG or creating Symlinks?

    You can do both, and both are easy.

    The user-dirs.dirs file contains something like this:

    XDG_DESKTOP_DIR="$HOME/Desktop"
    XDG_DOCUMENTS_DIR="$HOME/Documents"
    XDG_DOWNLOAD_DIR="$HOME/Downloads"
    XDG_MUSIC_DIR="$HOME/Music"
    XDG_PICTURES_DIR="$HOME/Pictures"
    XDG_PUBLICSHARE_DIR="$HOME/Public"
    XDG_TEMPLATES_DIR="$HOME/Templates"
    XDG_VIDEOS_DIR="$HOME/Videos"
    

    For example if you mount the disk in /media/dirname, it would be something like this, I’m giving it a external-drive name in this example:

    XDG_DESKTOP_DIR="/media/external-drive/Desktop"
    XDG_DOCUMENTS_DIR="/media/external-drive/Documents"
    XDG_DOWNLOAD_DIR="/media/external-drive/Downloads"
    XDG_MUSIC_DIR="/media/external-drive/Music"
    XDG_PICTURES_DIR="/media/external-drive/Pictures"
    XDG_PUBLICSHARE_DIR="/media/external-drive/Public"
    XDG_TEMPLATES_DIR="/media/external-drive/Templates"
    XDG_VIDEOS_DIR="/media/external-drive/Videos"
    

    And for the symlinks, if the drive already has the Desktop, Documents, etc directories. It is as simple as this:

    ln -s /media/external-drive/* $HOME

    That will symlink all the files in the drive to your $HOME

    I suggest you do both because you might run into a program that doesn’t follow XDG user directories.