Endorkend ,
@Endorkend@kbin.social avatar

This is major league bullshit tho.

On linux, where the config file for a specific program is, can vary annoyingly greatly depending on what distro you're using and sometimes the same config file exists in several places and somehow certain parts of the configuration parameters get taken from several of those files, so if you think you've found what the actual config file should be and remove the duplicates, suddenly the program uses defaults or doesn't even work at all.

Rustmilian ,
@Rustmilian@lemmy.world avatar

XDG Base Directory & XDG User Directories will help you immensely. At least, for the programs that follow the XDG specs. Also, check out XDG Ninja.

pearsaltchocolatebar ,

Yup. Is it in /usr /var /etc or /opt? Maybe in some hidden home folder? Sure, you can Google it, but there's no guarantee you'll find the right answer.

There are only a handful of places Windows sticks stuff, and it's pretty predictable.

ManniSturgis ,
@ManniSturgis@lemmy.zip avatar

Disagree. Take game saves on windows. They can be in appdata\local, appdata\roaming, documents\company-name, documents\savedgames\company-name
I'm sure there are more.

Demdaru , (Bearbeitet )

Nah. 3 places.

  • Appdata subfolder
  • Documents
  • Game installation folder

Savegame folder is then placed either ina folder with game name or studio name, so easy to check all these locations within minutes.

Let's not talk about rpgmaker games tho. I've seen them do some wacky shit with gamesaves.

Edit: To make my point clearer, I disagree with person above me about their disagreement. Savegames on windows are predictable as hell. Thanks to person below for pointing out I didn't convey. :<

Mardukas ,

Yes but appdata subfolder is local, locallow or roaming so the poster above you is still correct.

BlackRoseAmongThorns ,

Lol, appdata subfolder is already 3 different places 😂

exu ,
@exu@feditown.com avatar

Generally /usr should be managed by the package manager, /etc is for global custom configs and the user home is user specific.
/var shouldn't really be config, mostly logs or webservers for some reason.

lemmyvore ,

You should never be expected to edit anything in /usr, /opt or /var. That's highly unusual. For which software did you have to do this?

Opisek ,

Brother scanner utilities: /opt
Pretty sure I had to change something in /usr once, but I forgot what.
Now, /var would be very unusual.
But most of the time, all the configuration files happen to be somewhere in /etc.

pearsaltchocolatebar ,

Docker on RHEL saves everything in /var/lib, for example. Tenable and Nessus stick it in /opt. I'm currently doing a rhel7->8 upgrade, and that shit gets stuck everywhere.

But, I also have issues on my Pis. For a lot of the packages I use, I'm lucky if they actually put their .service file in /etc/systemd. Having to run a find / command on a pi can take forever.

hperrin ,

What system wide software stores their configs in anything but /etc? Data, sure, but not configs.

Opisek ,

nginx at the very least, but there's way more

hperrin ,

Nginx’ default config location is

/etc/nginx/
Opisek ,

Yeah I missed the "anything but", sorry

pearsaltchocolatebar ,

Docker installs in /var/lib. Tenable and Nessus use /opt.

There are tons of packages that store config files in places other than /etc.

hperrin ,

I don’t know what Tenable and Nessus are. I’m guess you have to install them from outside the package manager or build them from source, in which case, yeah, using /opt for config would be acceptable.

Docker’s config file is located at:

/etc/docker/daemon.json
pearsaltchocolatebar ,

It's not in RHEL. Tenable and Nessus are vulnerability scanners, and Nessus at least can be installed via yum.

shrugs ,

TLDR; Windows crap, I love Linux

Long read ahead, this resulted in a pretty big rant, but I feel better now:

Windows has way more silly places. From registry to ini files, assemblies, common files, services, drivers...it's everywhere.

Do you know how an MSI packages for software installation work? Let me tell you, it's a mess. An utter and complete garbage format. A database with hundreds of buggy functions, empty lines and internal inconsistencies. There wasn't even a way to create them comfortably without paying for expensive software back then. Yea, im looking at you, flexera admin studio.

I automated hundreds of custom software installations on 2000 clients from windows 2000 to XP to Windows 7 to Windows 10... for >10 years, so I know what I'm talking about.

On Linux 99% of apps save global settings in /etc and usersettings in /home/user/.* or the newer way XDG_CONFIG_HOME.

But since all is a file on Linux every config can simply be copied to restore or backup settings. Almost every tool has man pages. How hard is it to run man tool and read the specifics if you need help? Windows? Sometimes you got some help files in a strange format (.hlp?). Other then that, start the browser and ask Google.

Linux package managing since 2003 has been better then it ever has been on Windows to this day.

One command to update all components? Packages will be installed and removed automatically to fulfill the dependencies of the software you want to install? Every package is build by a trusty maintainer of the OS instead of some overworked windows engineer that needs to create profit.

Do you know how Deb files work? They are simpel zips of the folder structure and files the software consists of. A textfile with metadata like maintainer, name, version and, very important: dependencies. Last but not least there are a two or three files that can contain scripts that need to be executed prior or past installation. That's it. And you can do everything with it.

On Windows you often are forced to find the right combination of weird parameters to ensure a program starts. commandlines like "c:\windows\powershell.exe -e cmd /c program name", happen way more often then you would expect.

On Linux I get: Global package manager and updates with trusted packages, no telemetry, more safety, no ads, better privacy...and many more.

My personal opinion: I don't understand how people can even question the superiority of Linux for personal devices.

Rustmilian ,
@Rustmilian@lemmy.world avatar

To add to this, Dotfiles is a very helpful Arch Wiki page.

0x4E4F OP ,
@0x4E4F@sh.itjust.works avatar

Trust me, that is not Linux specific, Windows has that bullshit as well. Everything depends on how the devs wanted to solve the local settings problem, and if you have devs that work 1 or 2 years on the project and then quit, which in turn are replaced by other devs, you get this bullshit. The new ones usually don't wanna touch the old one's code, or if they do, they only make minor changes, just enough to make something that's not working, work.

ChaoticNeutralCzech ,

Some people have diacritics and spaces in their usernames, which wreaks havoc for badly written programs accessing AppData or folders in the user's "home" directory, such as Documents. And there are lots of such programs.

When setting up Windows, use a short and memorable, DOS-compatible username, and then change it later (the home folder will still have the old name). You can then move indiidual Libraries (Documents, Downloads, Music, Pictures and Videos) to the root of D:\ too.

baseless_discourse , (Bearbeitet )

programs writing shit in the document folder are so freaking annoying. I typically backup my document folder, as they contains most of my user file.

And some stupid program just decide to litter it with their temporary file, and game saves....

ChaoticNeutralCzech ,

It is okay if they only do what you asked for.

"Okay, Audacity, save to 'C:\Users\me\Documents\recording.aup'"

*folder 'C:\Users\me\Documents\recording_data' shows up*

baseless_discourse ,

Oh no, I think AoE (some version) will sometimes save game file to Documents, and IIRC, wechat will save temp file to documents without user interaction

Delta_V ,

not seen in this comic: the linux file isn't where the comic/manual/internet nerds says it should be, and there's no realistic way to find it

ricdeh ,

Nonsense. And even if the config file cannot be found in the usual directories then there are always tools like KFind that can search your entire OS within seconds.

Delta_V ,

congratulations. you've just sent a linux newb down a 12 hour rabbit hole that doesn't actually solve their problem.

businessfish ,
@businessfish@lemmy.blahaj.zone avatar

and thats the power of linux baby hell yeah

ricdeh ,

How does it not solve their problem if they're searching for configuration files? That would only be the case if the files do not exist in the first place, and then there's really no difference between GNU/Linux and Windows at all if you assume that initial configuration has not occurred. What would you do?

dream_weasel ,

Sure there is: find / -name myprogram*.md -o -name myprogram*.txt or start with just looking for the program name and pipe to less

shasta ,

So simple

dream_weasel ,

The prompt was realistic not simple lol. Usually some man or programname -h and then reading will tell you where to look and that's simple. Not many people want to hear "RTFM" though.

baseless_discourse , (Bearbeitet )

Until flatpak came along and just keeps everything in their respective app sandbox.

If your app don't need full user home access (most app don't), you can use a persistent folder to place the folder in app sandbox instead of home.

It is not only more clean, but also more secure and private.

Nonononoki ,

To this day, I still don't know how to set a path variable permanently in any Linux distro

baseless_discourse , (Bearbeitet )

I do feel like setting environment variable on linux is not as intuitive as on windows, but after I setup my workflow, I realized I never have the need to manually set any environmental variable besides in flatseal.

Maybe you have a specific use case for it?

excitingburp ,

export PATH=$PATH:/mypath1:/mypath2 in ~/.profile. Means "add :/mypath1:/mypath2 to what is already in $PATH." If you need the entire system to be aware, set or update it in /etc/environment with PATH=...

psion1369 ,

There once was a time when configs were not in a universal place like .config. I have terrible memories of trying to fix a gnome setting gone wrong and having to search several files in four different places and just having to firebomb everything.

dan ,
@dan@upvote.au avatar

Still the case today... Not every Linux app complies with XDG.

ColeSloth ,

I use an all encompassing indexing app on windows called "Everything" and it let's me find....everything, since it indexes it all, it also finds it instantly. if you have to use windows, I suggest getting it. It's no cost.

XEAL ,

Mozilla products:

"What is this .config folder you talk about?"

oo1 ,

windows is simple, all configs are keys accesible via reddit

pivot_root ,

[Deleted]

^half^ ^the^ ^time^ ^its^ ^been^ ^deleted^ ^because^ ^Spez^ ^is^ ^a^ ^greedy^ ^pigboy^

sag ,
@sag@lemm.ee avatar

Via Reddit How?

oo1 , (Bearbeitet )

Sorry, that was my lame joke about the simlar sound of the windows essential tool "regedit".

My only surviving knowledge from when I used to be able to do things on windows was that it was always a bucket of shite until you "regedit" a bunch of things. These edits were arcane secrets known only to mystical internet guru's like some bloke called "Fred Vorck" and impossible to figure out by logic, reason or even through mundane hard work. I assumed that's what the lower panel in the OP is getting at.

But on reflection, I'd be sad if there's not a forum on reddit called "regedit" will all the advice on what registry keys to fix - so unintentionally it might not be the worst advice - apart from the word "simple".

edit: reddit isshit
https://www.reddit.com/r/regedit/

oo1 ,

I'd forgotten about "dog destroyer for windows XP"
That's how bad it used to be.
https://web.archive.org/web/20120722030506/http://www.vorck.com/windows/index.html

OfficerBribe ,

All that depends on developer. Majority of my used Windows software is portable stored in folder that's synced with Dropbox. All settings are then usually stored in the same folder so I can easily copy SW over to another machine without loosing any configuration / history.

Some of those programs still do not store settings in same folder, you can often simply export settings from GUI.

tatterdemalion ,
@tatterdemalion@programming.dev avatar

Despite what developers do at the end of the day, there are conventions for application directories on every OS.

I just use the directories crate in Rust.

https://github.com/dirs-dev/directories-rs

Darkrai ,
@Darkrai@kbin.social avatar

🦀

IsoSpandy ,

Yeah... It's an awesome crate. I use it for my app too.

Darkassassin07 ,
@Darkassassin07@lemmy.ca avatar

Docker: right where you chose to put it.

0x4E4F OP ,
@0x4E4F@sh.itjust.works avatar

It still doesn't apply to propritery software.

pivot_root ,

Sure it does! Throw that festering pile of garbage into a docker container and keep it away from everything important while bind mounting the arbitrarily-placed config directory in the container to something sane on the host.

rtxn , (Bearbeitet )

The setting you're looking for could be in %appdata%
It could be in %localappdata%
It could be in C:\ProgramData.
It could be in the registry. It could be in HKLM. It could be in HKCU.
It could be in any of the userdirs.
It could be in the application's directory.

HA! Joke's on you, it was an envvar all along!

True story.

nightwatch_admin ,

This is the real answer.

possiblylinux127 ,
@possiblylinux127@lemmy.zip avatar

They don't have config files in Windows. Apps just throw things everywhere without rhyme of reason

LouNeko ,
  • Alle
  • Abonniert
  • Moderiert
  • Favoriten
  • random
  • linuxmemes@lemmy.world
  • haupteingang
  • Alle Magazine