this post was submitted on 14 Jul 2024
284 points (94.7% liked)

Linux

48044 readers
778 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Shameless plug: I am the author.

(page 3) 25 comments
sorted by: hot top controversial new old
[–] [email protected] 117 points 3 months ago (20 children)

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

Why is it so difficult to follow industry standards

load more comments (20 replies)
[–] [email protected] 14 points 3 months ago (3 children)

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

ls -ACd ~/.??*/ | sed -e "s#$HOME/##g"
load more comments (3 replies)
[–] [email protected] -3 points 3 months ago (3 children)

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.

[–] [email protected] 24 points 3 months ago

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.

[–] [email protected] 25 points 3 months ago (1 children)

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

load more comments (1 replies)
[–] [email protected] 28 points 3 months ago

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!

[–] [email protected] 51 points 3 months ago (2 children)

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

load more comments (2 replies)
load more comments
view more: ‹ prev next ›