csm10495 ,
@csm10495@sh.itjust.works avatar

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 ,

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

baseless_discourse ,

Which unfortunately also don't follow xdg-dir specification...

HelloHotel ,
@HelloHotel@lemmy.world avatar

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

Oof

jbk ,

i love apps which don't follow the XDG Base Directory spec 🥰🥰

HelloHotel ,
@HelloHotel@lemmy.world avatar

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

baseless_discourse ,

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.

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

Or ~/.config/software_name.

HelloHotel ,
@HelloHotel@lemmy.world avatar

Being the 'correct one' makes it easy to skip over... thx

platypus_plumba ,

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.

ian ,
@ian@feddit.uk avatar

Linux is confusing for non IT people looking for program settings. It might be in share, local or config or hidden somewhere. On W 10 I just look under ProgramData. Maybe W11 is different. But Linux application devs need to agree on a single place. As users sometimes need to access it for plugins and resources.

Hiro8811 ,
@Hiro8811@lemmy.world avatar

I mostly saw them in ~/.config or /etc

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

~/.config for local, /etc for global.

LANIK2000 ,

You mean the 2 ProgramData folders? Altho who the hell puts config stuff there? Anyways, the 2 official settings apps, the 3 AppData folders and then the registry for every little thing Microsoft doesn't want you to edit for whatever reason? And then the countless 3rd party config apps for every device aiming to make this process easier? Yea I totally don't Google where to toggle stuff on windows as step #1, noo... And W11 just has a slightly better 2nd official settings app, so sadly not too different.

Also who the hell puts config stuff on Linux into /local or /share? It was always in ~/.config (personal) or /etc (system wide) from my experience.

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

Altho who the hell puts config stuff there?

Permanent configs that should be shared amongst users, yes. Like, for example, AnyDesk stores it's ID and encrypted password there.

LANIK2000 ,

That horrifies me...

baseless_discourse ,

That is what the xdg standard and file hierarchy standard are for.

andrew_bidlaw ,
@andrew_bidlaw@sh.itjust.works avatar

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 ,
@JackGreenEarth@lemm.ee avatar

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

andrew_bidlaw ,
@andrew_bidlaw@sh.itjust.works avatar

That's deep 🤔

You can make a Confucius meme quote out of it.

turbowafflz ,

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

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

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.

LouNeko ,

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.

otacon239 ,

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 ,

Selects separate drive for install

Adobe: "Imma, pretend I didn't see that"

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

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 ,

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

You almost never see config files in programdata.

0x4E4F OP , (Bearbeitet )
@0x4E4F@sh.itjust.works avatar

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 ,
@Morphit@feddit.uk avatar

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.

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

Yeah, the Documents config file/dir pisses me off the most as well!

pivot_root ,

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 ,
@Sanctus@lemmy.world avatar

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

pivot_root ,

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

alexsup21 ,

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.

pivot_root ,

If you're using Windows, you can get a much better experience by ditching the Microsoft start menu entirely.

Everything Search to index files and Flow Launcher for searching files and applications. You can even make it open when you press the windows key.

Or if you still want a start menu, Start11 is worth paying for to get away from Microsoft's ad-ridden crapware they call the start menu. It even supports using Everything for showing file results.

alexsup21 ,

Flow Launcher seems pretty cool. I'll try it out. Thanks!

Zorsith ,
@Zorsith@lemmy.blahaj.zone avatar

System wide config for an application? Lets put that under C:\users*?????

pearsaltchocolatebar ,

And Linux isn't? There's definitely not a central location either.

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

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.

pivot_root ,

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.

SomeBoyo ,

Or in /home/username/.applicationname/ if they want to be annoying.

pivot_root ,

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.

eager_eagle ,
@eager_eagle@lemmy.world avatar

and snap

fuck snap

pivot_root ,

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

eager_eagle ,
@eager_eagle@lemmy.world avatar

~/snap

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

Norgur ,
@Norgur@fedia.io avatar

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.

Badabinski ,

For Linux applications that respect XDG? Sure. There are plenty that don't because they either predate that specification, or they just don't care. Linux filesystems are generally much faster at executing reads on many small files, meaning fast search tools like ripgrep and fd make it so I don't really have to care. They'll run through my whole $HOME in 5 seconds flat. There's also stuff like locate, although I don't like maintaining an index. SSDs are so damn fast that I can just rg --hidden --glob '*.toml' 'the_setting_i_want_to_change' ~/ whenever I want.

MystikIncarnate ,

Everyone knows the real power of configuration on Windows is regedit.

baseless_discourse , (Bearbeitet )

Let's not pretend regedit is a good thing, it is littered with unreadable keys and has terrible UI and UX. And it requires root privileges to edit anything.

I believe one of the worst disservice Windows has done to secure computing is to make users desensitized about root privileges. Every single action you do need root privileges, install app, changing config, people would just click allow whenever UAC pops up...

This means any program can easily inject rootkit into Windows during install, without the users noticing a thing, like LoL.

Crashumbc ,

As opposed to sudo command?

baseless_discourse , (Bearbeitet )

You don't need to use sudo command that much on linux. I personally only need to use it to edit two config files when setting up my system, that is it.

One for pre-connection mac randomization, one to enable a kernel module I need, because my distro disable many of them by default. I am very conscious of the changes I am making. However on Windows, I have no idea what the app installers are doing.

Not to mention, most users don't even need to make these changes. Per-network randomization is likely good enough for most user, and they probably not on a security-hardened distro which disables tons of kernel modules.

For a office work and entertainments, flatpak apps are more than enough. And developers can choose to get their sdk via flatpak or podman dev containers. None of them requires sudo.

Is there a good reason for a everyday user (not a tinker nor a system admin) to use sudo in linux?

Aux ,

Not sure what you're doing there, but it's pretty much every other command needs sudo here... Can't even install updates without it.

baseless_discourse , (Bearbeitet )

The safest way to install update is via offline updates, which don't need sudo on the user side, but requires a restart. See https://fedoramagazine.org/offline-updates-and-fedora-35/ for a good explanation.

I believe offline upgrade is also the default on every OS out there, for example gnome software only installs updates offline.

Even if you have to use sudo to upgrade (or journalctl, dmesg, both are sysadmin tasks and not typically done by a normal user), you are still only giving root privileges to these trusted programs distributed by your distro, not some random installers on the internet, unless you are using AUR.

I am genuinely curious what other commands with sudo that you need to run on a daily bases, for tasks that is unrelated to system administration?

uis ,
@uis@lemm.ee avatar

Except when you install something on linux package manager of your distro is executed as opposed to installer that was made by developer of package you are installing. And you probably install install packages from your distro's repos, unless you are on Debian of course.

Or you can run package manager as user that usually installs in ~/.local. Or unpack yourself.

areyouevenreal ,

Package managers have post install scripts and hooks that would allow you to install a rootkit. Then again they can also just add services on many Linux systems, which can run as root. Just put a systemd unit file in the right place and enable it.

The security advantage of Linux is having trusted repos and using things like FlatPak. System packages being malicious would very much be able to infect a system. Just look at the XZ backdoor for an example.

BradleyUffner ,

Tell that to the file I just dropped in to
~/.steam/debian-installation/steamapps/compatdata/1086940/pfx

uis ,
@uis@lemm.ee avatar

To be fair sometimes configs instead of XDG_CONFIG_HOME(/.config) are stored in XDG_DATA_HOME(/.local/share)

SGG ,

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 ,

It could also be stored in the registry.

SGG ,

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
0x4E4F OP ,
@0x4E4F@sh.itjust.works avatar

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...

dan ,
@dan@upvote.au avatar

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.

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

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.

dan ,
@dan@upvote.au avatar

It's HKEY, not HOTKEY. That's what I was trying to say in my comment. There's no "HOTKEY".

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

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.

IsoSpandy ,

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

Lath ,

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

IsoSpandy ,

This is by far the best explanation

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

This is probably what MS thought when naming them... seriously, only Local makes some sense.

Laser ,

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/

MonkderDritte ,

You can rename them in the environment variables UI. Has anyone tried this, any software who has the path hardcoded?

Btw, here's the paths.

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

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.

pHr34kY ,

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.

brotundspiele ,

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.

poinck ,
@poinck@lemm.ee avatar

What you can find in dconf is well organized compared to what is inside of the regedit hell.

MonkderDritte ,

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

0x4E4F OP , (Bearbeitet )
@0x4E4F@sh.itjust.works avatar

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.

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

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.

dan ,
@dan@upvote.au avatar

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.

Crashumbc ,

Shrug don't remember the last time I actually needed to modify a system config file on Windows...

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

Software actually does store it's configs in files... sometimes.

Pacmanlives ,

/etc or /usr/local/etc and done

Itdidnttrickledown ,

For user space /home/$user/.config/application_name/config.file_name

topinambour_rex ,
@topinambour_rex@lemmy.world avatar

%appdata%

CamWiseOwl ,

Takes you to the roaming subfolder though

topinambour_rex ,
@topinambour_rex@lemmy.world avatar

Which contains 90% of what you search. Then just press backspace, and you reach the appdata folder.

dan ,
@dan@upvote.au avatar

Most configs should be in the roaming directory, since you'd usually expect them to roam between computers on a domain. The local directory is only for stuff that doesn't make sense to sync to other computers - things like caches, configs specific to that individual PC, etc.

Not that it matters for home users, as home users generally aren't using Active Directory with roaming profiles.

Huschke ,

Tell that to the developers. At this point I'm sure they are just rolling a dice to decide where they should put things.

the_artic_one ,

%localappdata%

NostraDavid ,
@NostraDavid@programming.dev avatar

Have you found appdata/local/Application Data? It's a "conjunction point" that you can only find via the command line, and only exists for backwards compatibility. It points to appdata/... Do not EVER try to gain access over all your files in appdata/. It'll break due to that conjunction point.

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

There are symlinks in Windows all over the place for backwards compatibility. Just look at "Documents and Settings", it's a symlink to ”Users".

Yet, you still have to install the same libraries with every app over and over, even though they can be shared. Why? Because Windows has no sense of default library locations, except for the things it absolutely needs to work.

llama ,
@llama@midwest.social avatar

Oh that setting is super easy to change, just go to run, type in regedit, expand HKEY_LOCAL_MACHINE then just scroll until you find CLSID-73838-abf83-c758d57-87a90ba, set the value to zero and reboot!

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

Probably just log in an out, but still, I fail to see how this is easier than changing some_bool_setting from =true to =false is harder... maybe because you actually know what you're changing, so that makes it scarier 🤔.

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