My fellow software engineer, It's the year 2024... (mastodon.social)
from bahmanm@lemmy.ml to linux@lemmy.ml on 14 Jul 2024 14:40
https://lemmy.ml/post/17978313

Shameless plug: I am the author.

#linux

threaded - newest

GolfNovemberUniform@lemmy.ml on 14 Jul 2024 14:44 next collapse

But what’s the difference? It’ll be in /home anyways and I heard BSD had some issues with something that could be XDG.

mrvictory1@lemmy.world on 14 Jul 2024 14:54 next collapse

Better organization and backup / restore. For example if you want to restore config files but don’t want to move over the large “.local” folder, applications that write to $HOME will create diifculty.

dotslashme@infosec.pub on 14 Jul 2024 14:58 next collapse

For me personally I just hate that I do not know where to find configs, especially when using a dotfiles repo, it becomes harder than if they’re all available under a common path.

just_another_person@lemmy.world on 14 Jul 2024 15:01 next collapse

Because, like /etc, you know there is a designated place for config files. It’s already set for you right there, and there is a standard for it.

mosiacmango@lemm.ee on 14 Jul 2024 16:03 next collapse

/etc is a standard, defined in the filesystem hierarchy standard. This is not:

freedesktop.org produces specifications for interoperability, but we are not an official standards body. There is no requirement for projects to implement all of these specifications, nor certification.

Below are some of the specifications we have produced, many under the banner of ‘XDG’, which stands for the Cross-Desktop Group.

Its nit-picking, but this is a specification, i.e a preference, not an official standard. It would be great if everyone would agree on just one of these to use, but that isn’t a foregone conclusion. Even the actual standard, the FHS, isn’t followed by popular OS’s like NixOS.

just_another_person@lemmy.world on 14 Jul 2024 16:38 collapse

Specification, WHATEVER 🙄

The point is it exists for a reason, and clear purpose.

mosiacmango@lemm.ee on 14 Jul 2024 23:03 collapse

All specifications exist for a reason, and they all have a clear purpose.

What happens when you have 15 that are different and all overlap? When any of 15 is “right?”

Feathercrown@lemmy.world on 15 Jul 2024 04:47 collapse

I’ve only ever heard of FHS or XDG. Due to the free nature of linux distros, there is no central authority on how they are to be set up, and so there is no difference between those two options in terms of authority. Standards (which XDG is, colloquially) are followed based on popularity.

mosiacmango@lemm.ee on 15 Jul 2024 14:18 collapse

Yeah, I fully get that. The post and comments were very specific about how if you dont follow XDG, you’re fucking up, while only generally saying that “everything would be better if everyone followed the same standard.”

I pointed out that there are several standards and asked for a unique reason why XDG was the best to use.

I still haven’t heard one, which is fine, but it undermines the “If youre not using, XDG youre a idiot” tone of the post and comments.

Feathercrown@lemmy.world on 15 Jul 2024 14:21 collapse

I think the logic is that it’s the most used, so to avoid seriously competing standards, it’s better to stick with it.

mosiacmango@lemm.ee on 15 Jul 2024 14:59 collapse

So far, thats the most specific reason someone has given to use XDG, but I dont think it accurate.

FHS is the most used, as it’s been the primary linux filesystem standard for decades. Isn’t it better to stick with it if the only metric is popularity?

Feathercrown@lemmy.world on 15 Jul 2024 15:14 collapse

I thought XDG-aware apps fell back to FHS if no XDG vars were set? Or do they not do that

GolfNovemberUniform@lemmy.ml on 14 Jul 2024 17:34 collapse

/etc can’t be edited on immutable distros and usually apps store the editable config in /home/config and make the /etc one kind of read-only.

bsergay@discuss.online on 14 Jul 2024 17:45 next collapse

/etc can’t be edited on immutable distros

False on at least Fedora Atomic^[1]^, NixOS^[2]^ and openSUSE Aeon^[3]^…

Which ‘immutable’ distros are you referring to?


  1. On Fedora Atomic, changing /etc is literally identical to how it goes any other distro; or at least 1-to-1 as on traditional Fedora. The bonus is that a pristine copy of the original /etc is kept inside a sub-directory of /usr. Furthermore, all changes compared to the pristine copy are kept track of.
  2. On NixOS, changes have to be applied through configuration.nix. Though, regardless, it’s effectively possible to edit and populate /etc like it is on other distros.
  3. It’s explicitly mentioned that /etc does not belong to the immutable base.
GolfNovemberUniform@lemmy.ml on 14 Jul 2024 17:48 collapse

Fedora Atomic allowed it recently afaik. I’m always forgetting this. And NixOS is not immutable because of R/W FS.

bsergay@discuss.online on 14 Jul 2024 17:56 collapse

No sorry, Fedora Atomic has allowed changes to /etc since at least 2019. Regarding NixOS, the consensus is that it’s an immutable distro. The immutability of /nix/store/ suffices for this.

Your notion on Fedora Atomic was false. So, what other ‘immutable’ distro did you have in mind when making that comment?

GolfNovemberUniform@lemmy.ml on 14 Jul 2024 18:00 collapse

Please stop harassing me. And idk. I saw that issue but at this point I think it was just misinformation.

bsergay@discuss.online on 14 Jul 2024 18:04 collapse

Thank you for your honesty! I only intend for the truth to prevail and/or to reach mutual understanding. So please don’t feel attacked. If somehow I came off as such, my apologies; that has never been my intent.

MonkderDritte@feddit.de on 14 Jul 2024 20:37 collapse

In this case it would be XDG_CONFIG_HOME=/home/config. That simple.

SmokeInFog@midwest.social on 14 Jul 2024 15:02 next collapse

But what’s the difference?

I can only imagine someone asking this if they a) don’t use the terminal except if Stackexchange says they should and b) have yet to try and cleanup a system that’s acquired cruft over a few years. If you don’t care about it, then let me flip that around and ask why you care if people use XDG? The people who care about it are the people in the spaces that concern it.

Off the top of my head this matters because:

  • it’s less clutter, especially if you’re browsing your system from terminal
  • it’s a single, specified place for user specific configs, session cache, application assets, etc. Why wouldn’t such important foundational things required for running apps not be in a well defined specification? Why just dump it gracelessly in the user’s root folder outside of pure sloppy laziness?
  • it makes uninstalling apps easier
  • it makes maintenance easier
  • it makes installing on new machines easier

It’ll be in /home anyways and I heard BSD had some issues with something that could be XDG.

🙄

mosiacmango@lemm.ee on 14 Jul 2024 15:37 next collapse

Someone asking a question doesnt merit the insult of saying they “would never ask if they used a terminal.” I have no particular dog in this fight, but not being a dick isn’t that hard.

As to using this standard, just because this is your preferred standard, doesnt mean its the only standard.

It may actually be the best now, but so were the 14 others that came before it. Your stated reasons are the same reasons as everyone agreeing to use any other standard. Consistency, predictability, automation,ease of backup/restore, etc.

What sets this standard apart from all the rest? Based on their own description, they aren’t even an official standard, just one in “very active” use.

So why this, specifically? Just because its what you’re already doing?

SmokeInFog@midwest.social on 14 Jul 2024 17:24 collapse

Someone asking a question doesnt merit the insult of saying they “would never ask if they used a terminal.” I have no particular dog in this fight, but not being a dick isn’t that hard.

This is true, and something that I’m working on. For some reason my brain is uncharitable in these situations and I interpret it not as a simple question but a sarcastically hostile put down in the form of a question. In this case, “Why would you be dumb and not just put things in /home”. That really is a silly interpretation of the OP question, so I apologize.

As to using this standard, just because this is your preferred standard, doesnt mean its the only standard.

Sure, but the OP was essentially asking “Why isn’t dumping everything into a user’s /home the standard? Why are you advocating for something different?”

Based on their own description, they aren’t even an official standard, just one in “very active” use.

There are a LOT of “unofficial standards” that are very impactful. System D can be considered among those. The page you link to does talk about a lot of specifications, but it also says that a lot of them are already under the XDG specification or the reason for XDG is to bring such a scheme under a single specification, i.e. XDG.

So why this, specifically? Just because its what you’re already doing?

  • yes I do use it, so I am definitely biased in that regard
  • it bring a bunch of disparate mostly abandoned specification into a single, active one
  • it’s the active specification that has learned from past attempts
TrickDacy@lemmy.world on 14 Jul 2024 17:26 collapse

Weird to me that you apparently think the only way of viewing files is in a terminal

SmokeInFog@midwest.social on 14 Jul 2024 17:31 collapse

It’s weird to me that you think I think that. I do primarily browse files by terminal, but not always. Before I got into heavy terminal use I was a power user of Nemo. In any case, dumping everything in /home does not make for a better gui file browsing experience, either

TrickDacy@lemmy.world on 14 Jul 2024 17:37 collapse

The implication seemed to be “if you don’t care exactly where all your files are you must not use terminal”. Which I still don’t get. Just about anyone who would even be in a community like this uses terminal a lot anyway.

lolcatnip@reddthat.com on 14 Jul 2024 16:03 collapse

To give one example, what if someone wants to have more than one set of options for the same app? That’s something I’ve needed before, and it’s really hard to accomplish if the app always looks in one specific place for its options.

GolfNovemberUniform@lemmy.ml on 14 Jul 2024 17:31 collapse

Oh so it makes it impossible to change config path? Yea that’s a bit inconvenient but you always can just make many files and replace the file in the right directory with the one you want.

lolcatnip@reddthat.com on 14 Jul 2024 19:36 collapse

Not if you want to use both at the same time. Due example, I’ve wanted to have a local Gnome session that I leave signed in, and another session with different settings that I remote into.

Mechanize@feddit.it on 14 Jul 2024 15:06 next collapse

I wish they used them all, especially XDG_CACHE_HOME which can become pretty big pretty fast.

MonkderDritte@feddit.de on 14 Jul 2024 20:21 collapse

And i wish there was a separate XDG_LOG_HOME or $HOME/.local/log, with logrotate preconfigured to look there.

jollyrogue@lemmy.ml on 15 Jul 2024 23:20 collapse

Or $HOME/.var/log.

Telorand@reddthat.com on 14 Jul 2024 15:34 next collapse

I didn’t know about this (and thankfully, haven’t written anything public). I’ve been trying to fix an install script for an OSS project that doesn’t work on immutable distros, and using the XDG Base Directory specs might just be the panacea I was looking for!

refalo@programming.dev on 14 Jul 2024 15:46 next collapse

Whatever happened to Linux being all about choice? Do you want that or not?

xkcd.com/927

Telorand@reddthat.com on 14 Jul 2024 16:10 next collapse

You can choose any home directory you want, as long as it’s XDG_CONFIG_HOME.

chip@feddit.rocks on 14 Jul 2024 17:00 next collapse

Choice, huh? I can’t choose where the config files are stored unless I am willing to either dig into an obscure setting, modify the source code and recompile (repeat every time there’s an update), or contact the developer’s smug beard using smoke signals.

refalo@programming.dev on 14 Jul 2024 17:16 collapse

idk that all sounds like choices to me

hallettj@leminal.space on 14 Jul 2024 17:53 collapse

Are there other relevant standards? The XDG base directory specification has been around for a long time, and is well established.

Maybe your comment wooshed over my head; if so I apologize.

refalo@programming.dev on 14 Jul 2024 17:56 collapse

having choices are the opposite of conforming to standards

Deckweiss@lemmy.world on 14 Jul 2024 18:05 next collapse

Well, when software supports this standard, you as a user have a way to not confirm to it by setting the env variables to whatever you want, even per app. So you have two choises, either use it as is or change it.

But if software doesn’t supportthe spec, there is no choise of using it. So ons choise less.

tabular@lemmy.world on 14 Jul 2024 20:17 next collapse

To conform to a standard or do something else are each a choice. If you can justify your choice then perhaps it’s a good one.

refalo@programming.dev on 14 Jul 2024 20:54 collapse

Choosing to not conform is also a choice

tabular@lemmy.world on 14 Jul 2024 22:47 collapse

Of course, and is what I say.

MonkderDritte@feddit.de on 14 Jul 2024 20:34 collapse

This standard makes your software’s paths user-configurable, giving users a choice.

refalo@programming.dev on 14 Jul 2024 20:55 collapse

And if I don’t agree with how that standard is implemented? I should have the choice to use something else. Isn’t that how everything works?

[deleted] on 15 Jul 2024 05:02 next collapse

.

MonkderDritte@feddit.de on 15 Jul 2024 11:37 collapse

You can of course not give users a choice. And a lot of applications do their own thing, having their own variables like GOPATH or a cli option like –config or some way to do that in a config file like Idea IDEs. But implementing XDG from start is miles simpler for all parties, it’s good practice to have your paths and variables somewhat organized in code anyway.

davel@lemmy.ml on 14 Jul 2024 15:51 next collapse

This would just further complicate things for me. It assumes that 1) the system even has a windowing system/desktop environment or 2) all the installed software is XDG-aware. Most of the time I’m fiddling with headless environments.

exu@feditown.com on 14 Jul 2024 16:00 next collapse

It’s not too hard to check for XDG support first and use a few hardcoded directory paths if that is unavailable.

davel@lemmy.ml on 14 Jul 2024 16:39 collapse

It’s even easier to ignore it altogether, which is what I do. I don’t use “a few” non-XDG-aware things; I use lots an lots of them.

hallettj@leminal.space on 14 Jul 2024 17:49 collapse

Are you saying that you don’t want to write your software according to the XDG spec, or that you don’t want to set the XDG env vars on your system? If it’s the second that’s fine - apps using XDG work just fine if you ignore it. If it’s the first I’d suggest reconsidering because XDG can make things much easier for users of your software who have system setups or preferences that are different from yours; and using XDG doesn’t cause problems for users who ignore it.

OP’s recommendation is aimed mostly at software authors.

davel@lemmy.ml on 14 Jul 2024 18:02 collapse

I meant the second. But as to the first: I generally write in-house software for headless server environments, and my peers are going to push back if I add irrelevant XDG foo to my PR.

hallettj@leminal.space on 14 Jul 2024 16:38 next collapse

So yes, “XDG” stands for “Cross-Desktop Group” - but I don’t agree that using the spec assumes a windowing system. The base directory spec involves checking for certain environment variables for guidance on where to put files, and falling back to certain defaults if those variables are not set. It works fine on headless systems, and on systems that are not XDG-aware (I suppose that means systems that don’t set the relevant env vars).

OTOH as another commenter pointed out the base directory spec can make software work when it otherwise wouldn’t on a system that doesn’t have a typical home directory layout or permissions.

eager_eagle@lemmy.world on 14 Jul 2024 23:49 collapse

The spec doesn’t make those assumptions at all, idk where that’s coming from.

I have headless machines with XDG vars configured and ones without them. XDG compliant software works in either case, but I’m less likely to use a piece of software that clutters my $HOME.

dohpaz42@lemmy.world on 14 Jul 2024 16:01 next collapse

Here is a more concise way to achieve the same thing:

ls -ACd ~/.??*/ | sed -e "s#$HOME/##g"
palordrolap@kbin.run on 14 Jul 2024 20:11 next collapse

I think that can be boiled down to only cd; echo .*/

Maybe throw a ;cd - on the end if the change of directory is unwanted.

ComicSads@lemmy.blahaj.zone on 15 Jul 2024 01:04 collapse

if you need to preserve cd - you might be able to do this with pushd and popd

Samueru@lemmy.ml on 15 Jul 2024 02:43 collapse

ls -A | grep “^\.”

<img alt="" src="https://lemmy.ml/pictrs/image/e8da5656-b741-48f4-9488-be7cc83c9159.png">

I had to make a dummy .dotfile to test because I don’t have hidden files in my home.

dinckelman@lemmy.world on 14 Jul 2024 17:19 next collapse

Golang puts shit specifically in $HOME/go. Not even .go. Just plain go.

Why is it so difficult to follow industry standards

Laser@feddit.org on 14 Jul 2024 18:00 next collapse

That’s what happens when you don’t set $GOPATH I think

fmstrat@lemmy.nowsci.com on 14 Jul 2024 19:27 next collapse

That doesn’t make it better.

Laser@feddit.org on 14 Jul 2024 20:33 collapse

It makes it insofar better to me that you have the option to change it. You can’t change Mozilla programs to use anything but .mozilla (apart from modifying the source code of course) so for me seeing the folder is at least a way of telling me that the variable is unset.

The better question is which folder is suited the best to store the stuff that goes into $GOPATH

fmstrat@lemmy.nowsci.com on 15 Jul 2024 02:44 collapse

Just because something is worse, doesn’t make the other thing good. A sane and standard default, as others have mentioned, is a small bar to meet.

dinckelman@lemmy.world on 14 Jul 2024 19:59 collapse

Of course, but that’s not the point. There should be a sane default, and there isn’t one

[deleted] on 14 Jul 2024 19:34 next collapse

.

WolfLink@sh.itjust.works on 14 Jul 2024 19:55 collapse

What I want in $HOME are the following directories:

If I’m on a GUI-based environment:

  • Desktop
  • Documents
  • Downloads

In general:

  • .local
  • my_junk_folder_i_made

I’d like everything else to live within something like ~/.local thanks

dan@upvote.au on 14 Jul 2024 20:24 collapse

Maybe Linux should have .local and .roaming folders like Windows. local = only useful on this system, roaming = good to sync across systems. Config would be in .roaming if it’s not machine-specific.

luciferofastora@lemmy.zip on 15 Jul 2024 04:19 next collapse

Does ~/.config fit the bill for the second one?

dan@upvote.au on 15 Jul 2024 05:20 collapse

There’s some stuff in~/.config that’s specific to the computer. KDE is a good example - a lot of KDE apps mix config and state in the same file. There’s some solutions for syncing these files, like github.com/VorpalBlade/chezmoi_modify_manager which is an addon to Chezmoi that can exclude particular keys when storing an INI-style config file in Git.

I’m sure there’s some config files in there that are entirely specific to the computer. Things like the Wayland per-monitor scaling settings are in there somewhere I think.

There’s also things like data files that you may want to keep in sync across machines. They’re not really configs.

rotopenguin@infosec.pub on 15 Jul 2024 13:27 next collapse

The only practical difference between Local and Roaming and LocalLow is that developers randomly pick one and dump your game saves in there.

jollyrogue@lemmy.ml on 15 Jul 2024 23:19 collapse

There is a .local folder these days.

Profile roaming hasn’t been solved aside from NFS mounts. I guess Syncthing might work.

dan@upvote.au on 16 Jul 2024 01:27 collapse

I know .local exists - My comment was more about .roaming which would be nice to exist, but doesn’t currently exist.

Profile roaming hasn’t been solved aside from NFS mounts. I guess Syncthing might work.

I’m using Chezmoi to sync some dotfiles, scripts, etc. to a Git repo and that seems to work well enough for me. I’m not syncing much yet, though.

eager_eagle@lemmy.world on 14 Jul 2024 23:43 next collapse

off the shelf go was too annoying for me

Nowadays I set GOENV_ROOT to an XDG location and use goenv instead.

atzanteol@sh.itjust.works on 15 Jul 2024 04:56 next collapse

Go pisses me off with that. I separate projects the way I want but go wants every project written in go in one big directory?

dinckelman@lemmy.world on 15 Jul 2024 15:01 collapse

I really didn’t like this either. It’s quite surprising, because the rest of Go tooling is quite nice. Not having a venv, or at least something like pnpm-style node_modules is weird

jollyrogue@lemmy.ml on 15 Jul 2024 23:16 collapse

Why would go have a virtual environment or dep tree like node_modules equivalent, it’s not interpreted or dynamically linked.

With modules, dependencies can be vendored.

dinckelman@lemmy.world on 15 Jul 2024 23:52 collapse

Obviously it’s not, but you have to download all this shit somewhere before compilation. That’s the whole point

turkalino@lemmy.yachts on 16 Jul 2024 00:04 collapse

Google

following industry standards

pick one

mcepl@lemmy.world on 16 Jul 2024 15:00 collapse

This post literally links to the leading one.

mactan@lemmy.ml on 14 Jul 2024 18:38 next collapse

there’s no place like 127.0.0.1

there’s no place like XDG_CONFIG_HOME.

daniyeg@lemmy.ml on 14 Jul 2024 19:04 next collapse

حق

sfera@beehaw.org on 14 Jul 2024 19:27 next collapse

Are there abstractions available around the XDG specifications to resolve the proper paths?

dan@upvote.au on 14 Jul 2024 19:33 next collapse

Use the environment variables.

sfera@beehaw.org on 14 Jul 2024 23:38 collapse

I do. But you might have misunderstood my question. I was not asking for assistance. I was just curious if there are libraries available which allow easy adoption of the XDG specification. I imagine that such abstractions would be useful for multi-platform software and generally to lower the bar for adoption.

dan@upvote.au on 15 Jul 2024 00:26 collapse

Depends on the programming language. In C# for example, there’s an API to get special folder paths that works in all supported environments (Windows, Linux, MacOS, Android, and I think iOS too). On Linux, it includes fallbacks in case the environment variables aren’t set.

MonkderDritte@feddit.de on 14 Jul 2024 20:18 collapse

What language? Python has PyXDG.

In shell it’s simply

XDG_DATA_HOME="${XDG_DATA_HOME:-"$HOME"/.local/share}"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-"$HOME"/.config}"
etc.
sfera@beehaw.org on 14 Jul 2024 23:41 collapse

Thanks, I did not know about PyXDG. That was the type of thing I was asking about.

dan@upvote.au on 14 Jul 2024 19:35 next collapse

Shout out to xdg-ninja - it’ll find files that are in your home and suggest how to configure the app to use XDG instead. github.com/b3nj5m1n/xdg-ninja

sparr@lemmy.world on 15 Jul 2024 04:40 next collapse

Thanks, I hadn’t heard of that. Time to add a few hundred lines to my dotfiles :)

PureTryOut@lemmy.kde.social on 15 Jul 2024 05:46 next collapse

Strange that some apps allow configuring it rather than just doing it automatically…

Lifter@discuss.tchncs.de on 20 Jul 2024 11:24 collapse

That’s the usual open source way. The config probably came later so they just added the option without changing the default because that would break backward compatibility.

And there would be too much boring work to build a migration.

ZeroHora@lemmy.ml on 15 Jul 2024 17:30 collapse

After running it and properly configure the paths I once again came to the conclusion: I fucking hate Google.

MonkderDritte@feddit.de on 14 Jul 2024 20:11 next collapse

Where did i read this… basically, the .file being hidden being a bug in the early unix filesystem, which got misused to hide configuration files.

Offenders despite XDG-variables set and with no workaround:

  • .android: hardcoded in adb and i guess something in mtp too
  • .pki: some tool/library Firefox and Chromium sometimes use.
  • .steam: yes, that

Btw, wiki.archlinux.org/title/XDG_Base_Directory

Wispy2891@lemmy.world on 14 Jul 2024 20:18 next collapse

100% agree and I also despise devs who do this on windows, instead of using %appdata% they’re using c:\users\username\.myappisimportantandtotallydeservesthisdir

Tlaloc_Temporal@lemmy.ca on 14 Jul 2024 22:25 next collapse

To be fair here, appdata is technically a hidden folder and there are lots of reasons an app would want it’s data accessable by the user.

Wispy2891@lemmy.world on 15 Jul 2024 00:27 collapse

Yes but then just spam the documents folder like anyone else, don’t hoard the home root for no reason except that is a lazy cross platform port

lockhart@lemmy.ml on 14 Jul 2024 23:45 next collapse

I have to use a separate Documents folder for my actual documents lol

conorab@lemmy.conorab.com on 15 Jul 2024 02:14 next collapse

I think that also causes issues for roaming profiles and folder redirection. If roaming is turned on then everything in the %appdata%\roaming folder is synced to a server. %AppData%\Local is not. So if your app is using %AppData%\Roaming for temporary data then you are causing a whole bunch on unnecessary IO. Same for using Documents since that if often synced.

xan1242@lemmy.dbzer0.com on 15 Jul 2024 13:19 collapse

Not to mention - this isn’t necessarily the correct place for Windows anyway. That is exactly why they standardized stuff around Vista.

Plus - what about apps that store an ungodly amount data in there? Personally, I only keep the OS and basic app data (such as configs and cache) on the partition and nothing else.

Then something like Minecraft comes along and it’s like “humpty dumpty I’m crapping a lumpty” and stores all its data in “.minecraft” right there in your user directory.

Then you gotta symlink stuff around and it becomes a mess…

walthervonstolzing@lemmy.ml on 14 Jul 2024 21:00 next collapse

vim now has an option to put the .vim folder in ~/.config; though I’m not sure if the default plugin/package & syntax folders can be set under ~/.local/share.

PlexSheep@infosec.pub on 15 Jul 2024 16:50 collapse

You can also just use neovim instead, among other improvements, it’s configs are in the xdg dirs

aard@kyu.de on 14 Jul 2024 21:55 next collapse

Probably half the entries in that list are not GUI apps, and XDG doesn’t apply (though some still support it). For some others there (like emacs) XDG is used if it exists.

eager_eagle@lemmy.world on 14 Jul 2024 23:55 next collapse

XDG doesn’t apply for CLI apps? About half of dirs I still have cluttering my home are GUI apps whose devs refuse to follow the specification, while I see less friction from CLI/TUI devs, since they’re the ones actually seeing these hidden locations.

sparr@lemmy.world on 15 Jul 2024 01:50 collapse

What makes you think XDG doesn’t apply to non GUI apps?

aard@kyu.de on 15 Jul 2024 06:46 collapse

It’s already in the name - XDG stands for X Desktop Group (nowadays freedesktop), which works on interoperability for desktop environments. In a pure shell environment (or even if you’re not running a full desktop) none of the XDG variables are defined, and especially in shell environments the default fallbacks specified by XDG are not necessarily what the operator would expect.

sparr@lemmy.world on 15 Jul 2024 16:21 collapse

That name is decades old. XDG stands for “Cross Desktop Group”.

A “pure” X environment (e.g. startx xterm) also doesn’t define those variables, but many desktop environments do, just like many shell configurations do.

Samueru@lemmy.ml on 15 Jul 2024 02:17 next collapse

Shameless flex

<img alt="" src="https://lemmy.ml/pictrs/image/e69dded6-8682-49ba-8bc3-825b2cdbbf67.png">

Xylight@lemm.ee on 15 Jul 2024 03:28 next collapse

I regret checking this

<img alt="" src="https://lemm.ee/pictrs/image/05632732-7b05-4feb-9487-c1cb430c9d03.png">

dizzy@lemmy.ml on 15 Jul 2024 07:24 next collapse

Whoa I’m a stickler for getting as much as I can out but even I have .zshenv and some other too hard to figure out things in there. How’d you manage a total wipeout?

Samueru@lemmy.ml on 15 Jul 2024 08:04 collapse

zsh is actually easy and it is detailed in the archwiki

You have to set $ZDOTDIR in /etc/zsh/zshenv and iirc that was the only location that required root to edit.

For the rest of stuff, here is how I fix steam for example and you can check the rest of my dotfiles for how I configured zsh and all of that.

Although I haven’t updated them, I still had a .local directory back then, it was 1 week ago that I changed .local for Local and that let to an issue with distrobox which I made a PR fixing it that’s still open though.

dizzy@lemmy.ml on 15 Jul 2024 19:48 collapse

That’s awesome!

laurelraven@lemmy.blahaj.zone on 15 Jul 2024 13:33 next collapse

This is probably a dumb question, but what program is that?

twei@discuss.tchncs.de on 15 Jul 2024 17:12 next collapse

Looks like thunar (default file manager on xfce)

Samueru@lemmy.ml on 15 Jul 2024 17:26 collapse

thunar (and the smaller window is the xfce4-terminal).

njordomir@lemmy.world on 15 Jul 2024 21:20 collapse

Lol, the minimalist window decoration had me thinking you were running a terminal inside of the home directory of your file manager. :D

I’ve seen weirder things.

laurelraven@lemmy.blahaj.zone on 15 Jul 2024 21:57 collapse

Honestly, that’s what I thought too, and wanted to check that out

tabular@lemmy.world on 15 Jul 2024 21:50 collapse

ls Volatile

Samueru@lemmy.ml on 15 Jul 2024 22:08 collapse

It’s empty lol, it’s a directory on tmpfs that i use to build programs and similar stuff to not be hammering my ssd with unnecessary writes.

I have $XDG_CACHE_HOME in tmp as well and I moved the mesa sharer caches to $XDG_STATE_HOME as that’s really the only thing so far I’ve needed to preserve.

tabular@lemmy.world on 15 Jul 2024 22:42 collapse

tmpfs (…) to build programs (…) to not be hammering my ssd with unnecessary writes

Sounds useful. How did you setup the directory?

Running df tells me “tmpfs” is mounted on /run. If I build in that that directory then would it be stored in RAM, or do I need to do something else?

Samueru@lemmy.ml on 15 Jul 2024 22:53 collapse

I have /tmp in my fstab with these mount options.

tmpfs /tmp tmpfs rw,noatime,size=20G 0 0

And the rest of the setup is done in my zprofile

tabular@lemmy.world on 15 Jul 2024 23:02 collapse

I think I should be able to get this working following your zprofile file. Thanks!

avidamoeba@lemmy.ca on 15 Jul 2024 05:10 next collapse

My fellow FOSS users, patches are welcome.

drwho@beehaw.org on 15 Jul 2024 17:01 next collapse

BRB, putting in a PR to make /etc mode 1777 by default.

[deleted] on 15 Jul 2024 20:07 next collapse

.

Thcdenton@lemmy.world on 15 Jul 2024 23:22 next collapse

YOU’RE NOT MY MOM I’LL DO WHAT I WANT

umbrella@lemmy.ml on 16 Jul 2024 01:51 collapse

yes please!