Flatpak can sometimes complain when there's a symlink (Steam, in particular, does this) so you can use the symlink, but have to update XDG-USER-DIRS to point to the actual location. I wrote it up here: https://ideatrash.net/2024/07/howto-update-xdg-user-dirs-to-avoid-symlink-issues-with-flatpak.html
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Thank You for sharing.
Not related to your question exactly, but if you want certain "special" folders (Downloads, Music etc.) to be in specific places, it might be worth setting up xdg data dirs to the appropriate location.
Thank You.
This helped me. But would you suggest XDG or creating Symlinks?
I'd go with symlinks, so both you and software not strictly following standards know where to put and find stuff.
Thank you.
Honestly, whichever one you want. You could probably continue down the rabbit hole of which option is "better" or more closely fits some idealised standard. But ultimately, both methods solve your problem well enough.
Thanks.
Folders? you mean directories 👀
Mount the disk (if you ask me at /media/nameofdir
) and configure ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
(99% of that time that would be the .config dir in your home lol) and define each XDG_***_DIR=
to the respective directory in the path of the mounted disk, no need to make symlinks, though you might need to because there is likely many apps that don't follow xdg specs.
I would really appreciate a GUI way
I know gnome-disks has a GUI way to change the mount options, I don't know how good it is though.
Thank You.
would you suggest XDG or creating Symlinks?
Found this just for you. https://lemmy.world/post/1352601
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.
Thank you.
a lot of good answers here:
https://askubuntu.com/questions/557733/what-is-the-difference-between-ln-s-and-mount-bind#557735
Thank you for the link. This helped a lot.
Seconding this. As it's a mount that is explicitly for your user, you might as well mount it where it's most convenient for you.
If, on the other hand, it was a mountpoint for the entire system, I'd keep it in /mnt and go the symlink route - I'm old fashioned, and I like to use /mnt for as much as possible. I find it more tidy that way. On that note, I'm not 100% sold on /media yet
Seconding this.
I'm sorry, but which one exactly?
As it's a mount that is explicitly for your user
So, mounting folders just do that for a single user whom created the mount point?