Welcome to Incremental Social! Learn more about this project here!
Check out lemmyverse to find more communities to join from here!

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.

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)

MystikIncarnate ,

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

baseless_discourse , (edited )

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 , (edited )

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 , (edited )

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.

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

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

Nonononoki ,

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

baseless_discourse , (edited )

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

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.

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.

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.

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.

XEAL ,

Mozilla products:

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

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 , (edited )

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.

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%

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linuxmemes@lemmy.world
  • incremental_games
  • meta
  • All magazines