You are not logged in.

#1 2012-08-27 18:44:38

matthias_hueser
Member
Registered: 2012-08-27
Posts: 5

Own convention for user configuration files

As I dislike that most packages / upstream programs
disregard the UNIX Filesystem Hierarchy Standard by
scattering numerous config files variously in ::

(a)  ~/
(b) ~/.config
(c) ~/.local
(d) ~/etc

I just want to have one  ~/etc/<package-name> where
all configuration files of that particular program are stored. However I can see problems
coming when Pacman tries to upgrade the packages. Maybe
I can just put wrapper scripts into ~/bin and set this folder
at the front of my path. This script will take the appropriate action
to tell the program that it should not search for user-config
files under its own method but always under ~/etc/<package-name>

Do you think this is feasible or will just result in a large
maintenance mess? I really like having things organized and knowing
where things are and I would be prepared to have some extra work
spent to keep it tidy.

By the way do you think Pacman can help with this issue? Maybe I
can modify the package meta-data so it knows where user-config
files live.

Offline

#2 2012-08-27 18:46:35

matthias_hueser
Member
Registered: 2012-08-27
Posts: 5

Re: Own convention for user configuration files

For programs that actually hard-code the search location in their source code I would
have to live with setting up symlinks from the original locations

Offline

#3 2012-08-27 19:01:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

Re: Own convention for user configuration files

I don't know how pacman fits into any of this.  Pacman should not ever install anything in your home directory.

All those files are created when the program runs.  And I've never heard of a program creating an ~/etc directory.

For a more useful approach, you'll probably want to look into XDG variables like XDG_CONFIG_HOME.

Last edited by Trilby (2012-08-27 19:03:16)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2012-08-27 19:16:51

matthias_hueser
Member
Registered: 2012-08-27
Posts: 5

Re: Own convention for user configuration files

Well for example .bashrc is not created by Bash. Nevertheless i'd like to have it in ~/etc/bash/bash.rc and have BASH find it.
[In this directory i can then also collect all files that are included from bash.rc.]

With Emacs I currently use the wrapper-technique with 'emacs -l <init_file>' where I can simply pick the start-up file location.
I place this wrapper script in a location that is never touched by pacman and as long as the option interface of Emacs
stays the same I can track all upstream changes immediately and my config files are always found smile I would need such a
separation for all my programs.

Offline

#5 2012-08-27 19:22:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

Re: Own convention for user configuration files

For rc files you could do the same for every program I'm aware of as you describe for emacs - but that is very different than what you described in your initial post.  Is this about rc configuration files, or about data files created in .config and .local?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2012-08-27 20:53:32

matthias_hueser
Member
Registered: 2012-08-27
Posts: 5

Re: Own convention for user configuration files

Sorry for the confusion I have caused with the initial post.--  I mean all of :
(and it is an open question whether they should be separated into different folders)

1. User-modified configuration files
2. Configuration files written by the application but only modified through the GUI
3. Temp / internal config files which should in no circumstance be modified by the user..

The FHR make different recommendations regarding locations of these files and
I want to sort of mirror the structure into my ~/

Sometimes there are grey zones between (1)-(3) obviously, since you can
always modify plain-text config files yourself.for example even if not
recommended.

Part of what annoyed me is also mentioned here:

http://stick.gk2.sk/2009/03/the-ugly-du … nfig_home/

which deals with the aspect of ~/ pollution..

PS: Excuse me if my post not really deals with a 'hard' bug/problem, reply to it at
       your leisure -- not urgent at all

Last edited by matthias_hueser (2012-08-27 20:57:01)

Offline

#7 2012-08-27 20:55:48

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Own convention for user configuration files

I think for (d) you meant /etc , not ~/etc. If you want, you probably can keep all your configs there.

Offline

#8 2012-08-27 20:59:30

matthias_hueser
Member
Registered: 2012-08-27
Posts: 5

Re: Own convention for user configuration files

I have made it a rule to avoid custom modifications to anything except under
$HOME. Since everything else is probably owned by a pacman-controlled
package I thought it would result in confusion in case they are upgraded.

Offline

#9 2012-08-27 21:11:10

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: Own convention for user configuration files

There is an app that will trap attempts to create hidden directories in /home and force them to use /home/.config, but I can't remember what it's called and my searches have been fruitless so far.

(edit) Thank you jasonwryan. I knew someone would post it if I mentioned it.

Last edited by 2ManyDogs (2012-08-27 21:18:48)


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#10 2012-08-27 21:15:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Own convention for user configuration files

2ManyDogs wrote:

There is an app that will trap attempts to create hidden directories in /home and force them to use /home/.config, but I can't remember what it's called and my searches have been fruitless so far.

https://wiki.archlinux.org/index.php/Libetc


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2012-09-12 06:27:04

amadar
Banned
Registered: 2011-04-15
Posts: 147

Re: Own convention for user configuration files

Thank you for pointing that out @jasonwryan.

Offline

Board footer

Powered by FluxBB