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

Linux

48067 readers
908 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.

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

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

Why is it so difficult to follow industry standards

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

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

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

That doesn't make it better.

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

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

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

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.

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

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

[–] [email protected] 13 points 3 months ago* (last edited 3 months ago) (3 children)

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?

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

Google

following industry standards

pick one

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

off the shelf go was too annoying for me

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

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

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. https://github.com/b3nj5m1n/xdg-ninja

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

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

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

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

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

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

load more comments (1 replies)
[–] [email protected] 38 points 3 months ago* (last edited 3 months ago) (5 children)

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

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

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

load more comments (4 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] 22 points 3 months ago* (last edited 3 months ago)

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, https://wiki.archlinux.org/title/XDG_Base_Directory

[–] [email protected] 17 points 3 months ago (14 children)
[–] [email protected] 22 points 3 months ago

I regret checking this

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

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

ls -ACd ~/.??*/ | sed -e "s#$HOME/##g"
[–] [email protected] 5 points 3 months ago* (last edited 3 months ago) (1 children)

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.

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

My fellow FOSS users, patches are welcome.

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

there's no place like 127.0.0.1

there's no place like XDG_CONFIG_HOME.

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

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.

load more comments (1 replies)
load more comments
view more: next ›