• Endorkend
    link
    fedilink
    147
    edit-2
    10 months ago

    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.

    • @[email protected]
      link
      fedilink
      4910 months ago

      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.

      • lemmyvore
        link
        fedilink
        English
        1410 months ago

        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
          link
          510 months ago

          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.

        • @[email protected]
          link
          fedilink
          310 months ago

          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.

      • exu
        link
        fedilink
        English
        1010 months ago

        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.

      • @[email protected]
        link
        fedilink
        510 months ago

        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
          link
          2
          edit-2
          10 months ago

          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
            link
            4
            edit-2
            10 months ago

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

      • @hperrin
        link
        310 months ago

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

        • @[email protected]
          link
          fedilink
          210 months ago

          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
            link
            2
            edit-2
            10 months ago

            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
            
            • @[email protected]
              link
              fedilink
              110 months ago

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

        • @Opisek
          link
          010 months ago

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

          • @hperrin
            link
            710 months ago

            Nginx’ default config location is

            /etc/nginx/
            
            • @Opisek
              link
              310 months ago

              Yeah I missed the “anything but”, sorry

      • shrugs
        link
        210 months ago

        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.

    • @[email protected]OP
      link
      fedilink
      English
      010 months ago

      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.

  • @LouNeko
    link
    102
    edit-2
    10 months ago

    This is the “appdata” folder, this is where all the application’s data goes.

    So whats the “Programs” folder then?

    This is also where the application’s data and files go.

    But I thought thats the “Programs x86” folder.

    This is also where the application’s data and files go.

    Ok whats “Program Files” then?

    This is also where the application’s data and files go.

    So my config file is in either one if those 4?

    No thats in the “Documents” folder, obviously.

    Windows program data file structure has always been the wild west.

    • @[email protected]
      link
      fedilink
      6310 months ago

      Don’t forget about the hidden ProgramData directory at the root of the file system. Ableton Live likes to install there for some ungodly reason.

      • @LouNeko
        link
        3310 months ago

        Selects separate drive for install

        Adobe: “Imma, pretend I didn’t see that”

      • @[email protected]OP
        link
        fedilink
        English
        13
        edit-2
        10 months ago

        Always remember, C:\ProgramData is the eqivalent of /etc in Linux. If they don’t know where to put/hide shit, but needs admin priviliges to edit and users can only read, you put it in C:\ProgramData.

        • @Hawke
          link
          13
          edit-2
          10 months ago

          I think programdata is closer to /usr/lib or maybe /var/lib.

          You almost never see config files in programdata.

          • @[email protected]OP
            link
            fedilink
            English
            1
            edit-2
            10 months ago

            Config files that are meant to be used as sane defaults for new user accounts, yes. Config files that are meant to be manually edited, no.

            Besides, there are a lot of examples of configs that are saved in ProgramData, like, let’s say, registration info for proprietery programs (of course, this info needs to be shared amongst users, so your safest bet is ProgramData). Hidden by default, makes it perfect for storing everything the program is trying to hide from the user.

      • Morphit
        link
        fedilink
        410 months ago

        Don’t forget that there’s a hidden system junction at C:\ProgramData\Application Data that points to C:\ProgramData. Because everyone loves loops in their filesystem. Of course C:\Users\All Users is also a junction to C:\ProgramData. This kills updatedb in WSL.

    • @pivot_root
      link
      1910 months ago

      Don’t forget %USERPROFILE%/AppData/Local/Programs, where some programs get installed to because the developer doesn’t want to make it a system wide installation.

      • @pivot_root
        link
        910 months ago

        Game save data? No, my documents.
        Application config files? Again, my documents.
        Temporary documents I don’t care about keeping? Downloads, duh.
        My actual documents? Desktop.
        My desktop? Turned icons off because it was too messy.

        Just another day using Windows…

        • @Sanctus
          link
          English
          310 months ago

          I have to say I love having no desktop. Something about watching my coworkers become dependent on it is neurotic.

          • @pivot_root
            link
            2
            edit-2
            10 months ago

            Agreed. It’s much nicer to see your wallpaper than a mess of mismatched icons that may need to be occasionally clicked.

            • @[email protected]
              link
              fedilink
              210 months ago

              Same here. I don’t need icons, just press Win and type in the program. I just gotta pray for Windows to not open Edge and search in Bing.

      • @[email protected]OP
        link
        fedilink
        English
        110 months ago

        Agreed, but the number of places where to search for the config is not as big as in Windows. And there is the fact that most software is open source, so you could always check where the application saves it’s data.

  • SGG
    link
    English
    6910 months ago

    Don’t forget that appdata nowadays has 3 sub folders, local, locallow, and roaming.

    Also there’s C:\programdata

    Also some programs just store it in the user folder, the documents folder, or games/ my games folder if they are a game.

    • @hperrin
      link
      5210 months ago

      It could also be stored in the registry.

      • SGG
        link
        English
        3910 months ago

        Oooh the registry is even more fun.

        • HKLM, HKCU? These are statements dreamt up by the utterly deranged
        • Store it in software, make your own root folder
        • Also for 32 bit programs there wow6432node
        • There’s also the policies section, but this kind of makes sense to have it split off
        • Also make sure to follow the apple methodology of having multiple different key names like Apple, Apple inc., etc
        • @[email protected]OP
          link
          fedilink
          English
          1
          edit-2
          10 months ago

          I still have no idea why HK is in front… why is the key hot 🤔… and what key are we talking about…

          Oh, yeah, and the different key names… Windows, Windows NT (WITH a white space…), Win…

          • @[email protected]
            link
            fedilink
            310 months ago

            HKEY means “handle to registry key”… Not that that helps anything.

            When code opens a file, device, etc, it’s given a “handle” to it, which is an internal reference so that Windows knows which file you’re reading or writing, and it keeps track of where you are in the document. Similarly, HKEY_CURRENT_USER is the handle that gives you the current user part of the registry.

            • @[email protected]OP
              link
              fedilink
              English
              110 months ago

              I know that, the HOTKEY_* part of it was a mystery, why is the key hot… I mean, why does HK have to stand in front of it, it could be simple like just LM, CU, U (Users… still does nothing and nothing in it gets transfered as a setting in new user accounts), CR, etc.

              • @[email protected]
                link
                fedilink
                1
                edit-2
                10 months ago

                It’s HKEY (handle to key), not HOTKEY. That’s what I was trying to say in my comment. There’s no “HOTKEY”.

                • @[email protected]OP
                  link
                  fedilink
                  English
                  110 months ago

                  Huh… I don’t know where I’ve read this a long time ago, but I could swear it was HOTKEY, not HKEY… your explanation does make sense though, while what I thought never did make sense.

    • @pHr34kY
      link
      24
      edit-2
      10 months ago

      And half the time you’ll find it in the registry too. Linux has proven quite well that an OS doesn’t need a registry.

      Oh, and what’s with ProgramData and AppData being two completely different things. I understand the difference between the two directories, but there is no difference between a program and an app. Everywhere else it’s Machine/User.

      • optional
        link
        fedilink
        20
        edit-2
        10 months ago

        Linux has proven quite well that an OS doesn’t need a registry.

        Gnomes dconf would like to have a word with you. It’s really interesting how the Gnome people seem to get rid of every useful feature as it might confuse the user or be complex, but on the other hand add this registry-like anti-feature to make the system just as unmanageable as Windows.

      • @[email protected]
        link
        fedilink
        510 months ago

        Funny thing is, most 3rd-party utility tools don’t use registry but a config. Which makes them portable, btw.

        • @[email protected]OP
          link
          fedilink
          English
          2
          edit-2
          10 months ago

          Nowadays, yes. Go back 15+ years, the registry was used extesively.

          My reasoning as to why, Linux was never a targeted platform for software back then, now it is. There was only GTK back then and it didn’t look “nice” (appealing) at all. Plus GTK apps were huge for Windows, since you’d have to also install the GTK runtimes and all that… that just took a lot of disk space, which was expensive back then. Compared to an app that does the same, but spends only 10% of the disk space needed for GTK (you could even go a lot lower with compressors), it’s obvious why GTK was never a viable option when making a GUI app.

          And since Linux doesn’t have a registry (or even if it did, it’ll probably be completely optional to have it or not, so you can’t rely on users having it installed), you’d have to just save the settings in a file, just like the rest of the FOSS applications. So, it makes no sense to have completely different codebases for the same app for Windows and everything else. In fact, most apps nowadays that aim to be cross platform just use Qt. You can compile it for watever you like, there is no need to keep separate codebases.

      • @[email protected]
        link
        fedilink
        2
        edit-2
        10 months ago

        there is no difference between a program and an app

        Yeah the naming is confusing. The reason is what you said - machine vs app.

        Back on Windows 9x, some apps would store files directly in the C:\Program Files directory. This was ‘fine’ at the time since every app ran with full permissions. Users were at C:\Windows\Users, but users were optional so not every install used it.

        Windows XP had a better NT-based permission model (not nearly as improved as Vista, but better than 9x) and allowing regular users to write to the Program Files and Windows folders wasn’t really a good idea. It added two directories for settings:

        • C:\Documents and Settings\username\Application Data for user-specific data
        • C:\Documents and Settings\All Users\Application Data for non-user-specific data

        Vista kept the former but moved the latter to C:\ProgramData. I can’t remember why.

        Windows 7 moved the user stuff to C:\Users.

      • @[email protected]OP
        link
        fedilink
        English
        110 months ago

        ProgramData is for admin stuff and things that need to be shared between users. AppData is for personalized settings per user. For example, AnyDesk stores the unattended access password in ProgramData, as well as the ID. Sure they do get copied to AppData when AnyDesk runs on boot/login on any user, but you could also have some user specific options (like language) and they get stored in a separate file in AppData.

    • @[email protected]
      link
      fedilink
      710 months ago

      What the fuck is local low? I don’t understand. Local is Billy G’s jizz… I get that… And Roaming is for poor plebs. But why LocalLow? Is it like cache? But I have seens games saving their save files there. I don’t understand

      • @[email protected]
        link
        fedilink
        1510 months ago

        The folders actually do make sense.

        Roaming: this data can be moved between machines in a domain if you have a roaming profile. E.g. go to another workstation and your browser configuration is the same? Means it’s in Roaming.

        Local: this data will not be synchronized between machines when you roam. This could be your browser’s cache.

        LocalLow: like local, but for applications that are “low integrity”, like Internet Explorer. These folders have special properties. https://helgeklein.com/blog/internet-explorer-in-protected-mode-how-the-low-integrity-environment-gets-created/

      • Lath
        link
        fedilink
        1210 months ago

        Local is for regular apps, LocalLow is for depressed apps and Roaming is for high apps looking for munchies.

        • @[email protected]OP
          link
          fedilink
          English
          210 months ago

          Has anyone tried this, any software who has the path hardcoded?

          I know for certain that some Adobe products did have these paths hardocded (past tense, haven’t tried this now), because I moved my home/user directory on D:, yet they persisted to save the settings in C:\Users.

  • @[email protected]
    link
    fedilink
    English
    4210 months ago

    This isn’t really accurate for either side. For Linux, I’ve had crap shove configs in ~, /etc, /var, at least.

    On Windows, it could be literally anywhere or in the registry.

    • @atmur
      link
      English
      710 months ago

      That’s one thing I especially like about Flatpaks on the Linux side. Everything’s in ~/.var.

    • Hello Hotel
      link
      English
      6
      edit-2
      10 months ago

      Or ~/.local/share/${software_name_or_whatever}… Or ~/.${software_name_or_whatever}/

      Oof

        • Hello Hotel
          link
          English
          4
          edit-2
          10 months ago

          Which one is your favorate, mine is ~/freedroid/. 😝

        • @[email protected]
          link
          fedilink
          110 months ago

          If you have flatpak, and the application don’t need full user home access, then you can move the folder to application sandbox by setting a persistent path.

        • Hello Hotel
          link
          English
          4
          edit-2
          10 months ago

          Being the ‘correct one’ makes it easy to skip over… thx

    • @platypus_plumba
      link
      110 months ago

      The idea of the registry is so freaking nice. Imagine if all the configs of a system could be changed through a centralized and consistent API.

  • andrew_bidlaw
    link
    fedilink
    3610 months ago

    I feel mildly aroused when I see a program or a game that collects everything in it’s folder and can be used from a USB drive. Some paid, industrial grade software leaves so much traces and depends on so much different hidden files and keys it’s making me sick.

    • JackGreenEarth
      link
      fedilink
      English
      710 months ago

      Any game can be used from a USB drive if that USB drive is running a live OS.

      • TurboWafflz
        link
        6
        edit-2
        10 months ago

        Or if you just symlink /usr, /opt, and /home to that usb drive. You may be asking why you wouldn’t just mount partitions on the usb drive to those locations. This is not a question I will be answering

    • @[email protected]OP
      link
      fedilink
      English
      110 months ago

      That is good… unless you plan on sharing the app between users, then it sucks, because every user has to be an admin in order to change the config… and then, you have one user that sets it like so and so, and another that sets it completely different. And this is why separate settings for users is a good thing. Sure, have an option for a global config, and let that copy be copied to the local config as sane defaults, but not having the option to actually have separate configs in user directories is, from an IT perspective, insane.

    • @pivot_root
      link
      2110 months ago

      This should be considered a war crime, and doubly so when they don’t even have the decency to prefix it with a dot (looking at you Golang). It’s my home folder, not a dumping grounds for random trash.

        • @pivot_root
          link
          2
          edit-2
          10 months ago

          What does snap do to your home directory? I haven’t touched Ubuntu in a very long time

          • Eager Eagle
            link
            English
            110 months ago

            ~/snap

            Notice the lack of period. Users can’t change it.

    • Norgur
      link
      fedilink
      210 months ago

      Or in /etc/<application>, or in /var/<application> I’ve seen all of that, sometimes differing between distributions for maximum annoyance. So I don’t think we get to act smug in I’m this particular case.

  • @rtxnM
    link
    English
    33
    edit-2
    10 months ago

    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.