4 ms·
One of the annoyances of Linux is working out where configuration information is, following through multiple layers of indirection and files over-riding other f
by tengwar2 9mo ago
One of the annoyances of Linux is working out where configuration information is, following through multiple layers of indirection and files over-riding other files. This looks like adding another layer, another place to look, and if you're reading the man file for a shell (for example) it probably won't even mention that this could invalidate the information contained in that in the man file.
- deafpolygon 9mo agoAlways check the man pages..
- tengwar2 9mo agoAnd I said that the man pages would be a part of what you have to examine. 95 pages in the case of bash (that's after running it through troff). man pages were fine when they were three pages long, but their lack of any internal index has become a problem. Ok, now you might have a dozen files which could contain the information, where the location of each file can be modified by environment variables. It's tolerable if you are working on something you change weekly, but a practical problem if you do it yearly or it's entirely new.
- BenjiWiebe 9mo ago'man bash'. Type G. Press PgUp until you see the FILES heading (took one press for my terminal size). There's your list of files. Alternatively, instead of G and PgUp, type /FILES<Enter>. Of course, this doesn't help at all when software either doesn't have manpages, or doesn't include the list of files in the manpage. Just nitpicking your bash example.
- tengwar2 9mo agoThis is HN, not Reddit. You can safely assume that every single person here knows how to use man, particularly if they mention using troff to format it properly. There remains a problem.
- BenjiWiebe 9mo agoI truly wasn't sure if they were aware of man's search and go to options, as they brought up 95 pages as being why it was hard to find configuration file locations for bash. When I'm searching for configuration file location, I do use '/FILES' or PgUp from the bottom of the manpage, so the length of the manpages is irrelevant.
- skobes 9mo agoTomorrow: modify man pages from kernel space!
- mariusor 9mo ago> working out where configuration information is Generally, good behaved applications have an entry in their man page that spells out these details for you, so you don't have to work out anything.
- user3939382 9mo agoUnfortunately so many packages these days don’t even have a man page at all let alone one with good config info.
- mariusor 9mo agoWell ... hopefully they're open source and all that.
- user3939382 9mo agoSo the solution to not having a man page that tells you where the config is… is to write a PR for your own documentation for someone else’s project? lol riiight
- ktm5j 9mo agoYou're not wrong. In a worst case scenario I resort to using strace to figure out where a program is reading config from.. from what I understand, if this kernel module is in use then even that approach wouldn't help. But since the use case is personal dotfiles, I imagine the user isn't going to forget that they set this up.
- brianjlogan 9mo agoTo be fair the author shows an example of using NixOS. It's absolutely another layer of indirection (probably several) but it does make that usual Linux "fun" less problematic because of its immutable nature and API design.
- rnhmjoj 9mo ago> this could invalidate the information contained in that in the man file. No, it doesn't. The point of modetc is precisely keep both myself and the programs happy: the files are actually stored where I like to keep them, but they can be accessed as if they were stored where the developer intended.