You are not logged in.
Hello,
this is my first thread. I am not new to Linux but still consider myself a true newbie. Also, I am sure this question has been asked before, but I was unable to find it.
Question: Many applications create their folders and files in random locations inside the $HOME folder, e.g. snap creates its snap folder, npm creates node_modules, go language creates a go folder etc.
Is there a general way to move those folders to a different location or just hide them via prefix . and let the application that looks for that particular folder redirect to the new location/hidden location?
I know the XDG USER DIRS, but these only work for the common user dirs like Downloads, Documents etc., correct?
I would like to have my $HOME folder clean like a true nerd.
Last edited by gforsi (2020-04-24 04:19:06)
Offline
It depends. Some applications use XDG_CONFIG_HOME. Other allow you to move the files to a directory of your choosing and point the application at them with an environment variable, or with a flag that sources an alternate location (--config=/path/to/dir, for example).
If your application does not afford either of these approaches, you are either going to hack the source, or just grin and bear it.
Offline
Jin, Jîyan, Azadî
Offline
The specification these programs are supposed to follow, but often don't: https://wiki.archlinux.org/index.php/XDG_Base_Directory
The second half of this wiki article collects reports of programs which do or don't support the specification, including a table for "partial support" where you might have to start the program with specific options or env vars for it to work.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thanks, it is a shame that such a little amount of programs follow the guidlines for XDG Base Directory.
Offline