Hi guys
would anybody know if user's '.local' folder, its path & name are configurable in some way? Perhaps by a var or/and os-wide configs?
many thanks, L.
On 15Jul2022 16:12, lejeczek peljasz@yahoo.co.uk wrote:
would anybody know if user's '.local' folder, its path & name are configurable in some way? Perhaps by a var or/and os-wide configs?
Maybe not, but nothing stops you making it, or particular things inside it, symlinks to better locations. My local machine:
[~]fleet2*> ls -ld .local drwxr-xr-x 3 cameron cameron 96 27 Jun 2020 .local [~]fleet2*> L .local/ total 0 drwxr-xr-x 3 cameron cameron 96 27 Jun 2020 . drwxr-sr-x+ 223 cameron cameron 7136 16 Jul 08:22 .. drwxr-xr-x 5 cameron cameron 160 26 Jul 2021 share [~]fleet2*> L .local/share total 0 drwxr-xr-x 5 cameron cameron 160 26 Jul 2021 . drwxr-xr-x 3 cameron cameron 96 27 Jun 2020 .. drwxr-xr-x 3 cameron cameron 96 27 Jun 2020 direnv drwx------ 4 cameron cameron 128 26 Jul 2021 fish lrwxrwxr-x 1 cameron cameron 12 14 Aug 2020 vt -> ../../var/vt
I keep a lot of things in ~/var, a lot of configs in ~/rc, yea, even to the point of:
[~]fleet2*> ls -ld .config lrwxrwxr-x 1 cameron staff 2 11 May 2017 .config -> rc
and machine specific configs in ~/rc-local.
Cheers, Cameron Simpson cs@cskk.id.au
On 15/07/2022 23:25, Cameron Simpson wrote:
On 15Jul2022 16:12, lejeczek peljasz@yahoo.co.uk wrote:
would anybody know if user's '.local' folder, its path & name are configurable in some way? Perhaps by a var or/and os-wide configs?
Maybe not, but nothing stops you making it, or particular things inside it, symlinks to better locations. My local machine:
[~]fleet2*> ls -ld .local drwxr-xr-x 3 cameron cameron 96 27 Jun 2020 .local [~]fleet2*> L .local/ total 0 drwxr-xr-x 3 cameron cameron 96 27 Jun 2020 . drwxr-sr-x+ 223 cameron cameron 7136 16 Jul 08:22 .. drwxr-xr-x 5 cameron cameron 160 26 Jul 2021 share [~]fleet2*> L .local/share total 0 drwxr-xr-x 5 cameron cameron 160 26 Jul 2021 . drwxr-xr-x 3 cameron cameron 96 27 Jun 2020 .. drwxr-xr-x 3 cameron cameron 96 27 Jun 2020 direnv drwx------ 4 cameron cameron 128 26 Jul 2021 fish lrwxrwxr-x 1 cameron cameron 12 14 Aug 2020 vt -> ../../var/vtI keep a lot of things in ~/var, a lot of configs in ~/rc, yea, even to the point of:
[~]fleet2*> ls -ld .config lrwxrwxr-x 1 cameron staff 2 11 May 2017 .config -> rcand machine specific configs in ~/rc-local.
Won't do for me - fails with any bit more "complex" case when multiple nodes are involved and user landing on each such node would have unique/different '.local' dir, having whole home dir net mounted. I was hoping (& expecting) that would be controlled via a env var but it does not seem that way - which makes me wonder - that must the software which knows/chooses '.local' internally or might ignore that all rogether and use own path(s), if it is not the OS providing that information? hmm..
thanks, L.
On 18Jul2022 12:05, lejeczek peljasz@yahoo.co.uk wrote:
Won't do for me - fails with any bit more "complex" case when multiple nodes are involved and user landing on each such node would have unique/different '.local' dir, having whole home dir net mounted.
If the whole homedir is net mountd (shared from a central storage server, yes?) what does the .local actually do? Surely as things are it would be common to all. Or is that the problem you're trying to solve? If so, you really need to sort out some per-node persistent personal area. That might need a per-node custom solution :-( And /tmp might be too unstable for you. And you'd still need to get things to hook into it of course...
I was hoping (& expecting) that would be controlled via a env var but it does not seem that way - which makes me wonder - that must the software which knows/chooses '.local' internally or might ignore that all rogether and use own path(s), if it is not the OS providing that information? hmm..
It will be per app. There are some conventions, which is why all these things land in .local, but each app will honour them in its own way. I do not know if there is a recommended envvar to govern ~/.local as a whole. You may need to find a solution on a per-app basis.
Note that your _should_ be able to fiddle the $HOME envvar. How well that works again depends on the app, but you'd hope that most things would use it in _preference_ to looking up your homedir from the passwd mapping. Then you can do a hack like:
SHARED_HOME=$HOME HOME=$SHARED_HOME/.local-`hostname` export HOME SHARED_HOME
in your startup. And then you can put symlinks in $SHARED_HOME for the common top level things (.profile, etc etc) but have a per-hostname .local. A bit inverted, and some things will doubtless not play nicely.
Cheers, Cameron Simpson cs@cskk.id.au
On Mon, 2022-07-18 at 12:05 +0100, lejeczek via users wrote:
I was hoping (& expecting) that would be controlled via a env var but it does not seem that way - which makes me wonder - that must the software which knows/chooses '.local' internally or might ignore that all rogether and use own path(s), if it is not the OS providing that information? hmm..
I think it's only a more recent custom that we have some common dot folders (e.g. ~/.cache, ~/.config ~/.local). It seems like it's a suggestion from some people that it might be more organised that application programmers put certain kinds of things inside such folders, rather than there being a variable that says what the local system uses.
Many applications have their own hidden folders right in the users homespace (~/.mozilla, ~/.thunderbird, and a myriad more), which seems to be the more traditional approach.
Though some splatter their bits in more than one place. For instance, Firefox puts its cache within subfolders in ~/.cache yet its config is within ~/.mozilla (in some sort of half-support of that common hidden folder kind of scheme which doesn't seem so well implemented, to me).
There's some sense in having cached things all in a .cache, and all configs in a .config, as a structured approach. There's also some sense in having all of a programs whatsits within just one common dot hidden folder, as a more simplified approach. I'm guessing that a ~/.local folder was an idea as an opposite of a "remote" storage location.
I think like all things Linux, getting a consensus is a near impossibility. A distro could set a house standard of doing it one way, another might take a different approach. And programmers may tailor packages to suit each distro or decide that's too much of a headache to deal with (which the current trend of flat packs and app images seem to suggest - standalone blobs that are not very distro conforming).