672
submitted 1 year ago by American_Jesus@lemm.ee to c/linux@lemmy.ml
top 50 comments
sorted by: hot top controversial new old
[-] 6xpipe_@lemmy.world 142 points 1 year ago* (last edited 1 year ago)

XDG gang, rise up!

Also, I know that this community and dot-files in general are Unix based, but this holds true for Windows development as well. You should be putting app files in the users' %APPDATA% directory, not their user folder. It's probably even more important since Windows doesn't autohide dot files.

[-] fartsparkles@sh.itjust.works 88 points 1 year ago* (last edited 1 year ago)

The My Documents / Documents folder on Windows is a dumping ground for game saves and random applications. I no longer use it for saving my documents anymore…

[-] pennomi@lemmy.world 27 points 1 year ago

Yep, my ~/Projects folder is where I keep anything I need to actually find. All the normal places are full of random cruft.

[-] clearleaf@lemmy.ca 11 points 1 year ago

I don't touch it either for two reasons that go together.

  1. It's a pig sty before I even get there.
  2. Nothing in there will ever be included in backups for that reason.

My cloud drive has SO much random flstudio crap in it. That's the worst program in the world when it comes to that. If you install their program they think they own your hard drive.

Also while I'm bitching about windows folders, why did they make it so weird to get to your home folder? It feels like we aren't supposed to know it exists anymore.

load more comments (5 replies)
load more comments (1 replies)
[-] thesmokingman@programming.dev 24 points 1 year ago

One of my proudest accomplishments is contributing to the XDG Base Dir spec. I fixed a typo.

load more comments (1 replies)
[-] Zeth0s@lemmy.world 21 points 1 year ago

Unfortunately not even Microsoft does that... On windows having a logical order is a lost battle

[-] gnutrino@programming.dev 117 points 1 year ago

I just write my config files directly to random unused blocks on /dev/sda, filesystems are overrated.

[-] PseudoSpock@lemmy.dbzer0.com 28 points 1 year ago* (last edited 1 year ago)

You still have sd devices? /s

load more comments (1 replies)
[-] chaorace@lemmy.sdf.org 26 points 1 year ago

Nah, dump em' to /tmp/ and let the user figure out the rest

[-] hperrin@lemmy.world 19 points 1 year ago

I just leave all config in memory. If the user really cared, they would never reboot.

load more comments (4 replies)
load more comments (1 replies)
load more comments (1 replies)
[-] AKADAP@lemmy.ml 97 points 1 year ago

I absolutely despise the following directories: Documents, Music, Pictures, Public, Templates, Videos. Why? Because applications randomly dump stuff into these directories and fill them with junk files. I don't want any application putting anything into directories I actually use, unless I explicitly tell them to. It is not possible to keep your files organized if applications randomly dump trash files into them.

[-] herr@lemmy.world 57 points 1 year ago

Same shit happens on Windows. Games will just install their shit literally all over OS with no rhyme or reason to it.

Why can't the save game and config.ini just be in the main god damn game directory? Nobody knows.

[-] jasondj@ttrpg.network 23 points 1 year ago

Actual reason is system permissions.

Most the default installation path is Program Files. That needs elevation to write to. Fine when you’re installing something, but not something you want to need just to run the game.

Writing to %APPDATA% or really anywhere in %USERHOME% is guaranteed to have the right permissions for this user.

Granted, a lot of home PCs and gaming PCs are single-user environments. The “personal” computer. In that case there’s no reason games and applications can’t be installed in %LOCALAPPADATA%, and in fact, I think windows has an environment variable or registry setting for that.

It’s no different in Linux. You don’t want users writing to /etc. And you may expect multiple users. So all of that stuff goes to dot files in $HOME.

load more comments (3 replies)
[-] AdmiralShat@programming.dev 19 points 1 year ago

Microsoft OWNS not just gaming companies, but one of the largest gaming hardware companies and many of the largest game developers.

You'd think by now we'd get a dedicated Saves folder to organize this shit after this long.

[-] Jakeroxs@sh.itjust.works 11 points 1 year ago

My Documents > My Games is kinda the default, but then you have steam cloud syncing and tons of games that default to various Appdata folder seemingly at random.

load more comments (3 replies)
load more comments (3 replies)
load more comments (3 replies)
[-] nyan@lemmy.cafe 81 points 1 year ago

Y'know what's worse? When there's no dot. Worse than that, it's an undotted directory used to store a single config file. Ugh, unpleasant memories. 😒

[-] pivot_root@lemmy.world 38 points 1 year ago

~/go is one of my major pet peeves.

[-] joyjoy@lemm.ee 24 points 1 year ago

That's not the only folder go creates. There's also ~/sdks/go1.xy

load more comments (1 replies)
load more comments (2 replies)
load more comments (1 replies)
[-] ouch@lemmy.world 75 points 1 year ago

If you care, please take time to upvote or file bugs on packages that don't follow XDG. Or even better, make PRs.

load more comments (17 replies)
[-] Gleddified@lemmy.ca 62 points 1 year ago

One of my greatest pet peeves is random folders appearing in my home folder. Thanks for this

[-] joyjoy@lemm.ee 71 points 1 year ago* (last edited 1 year ago)

Let's count them. (not including legacy or standard locations like .local, .config, or .cache, .ssh, and shell configuration files

  • .aws
  • .azure
  • .bun
  • .byobu
  • .cargo
  • .dbus
  • .docker
  • .dokku
  • .keychain
  • .kube
  • .minikube
  • .motd_shown
  • .node_repl_history
  • .npm
  • .nuxt
  • .nuxtrc
  • .nvm
  • .oh-my-zsh
  • .pack
  • .psql_history
  • .pyenv
  • .python_history
  • .redhat
  • .ruff_cache
  • .rustup
  • .selected_editor
  • .sqlite_history
  • .sudo_as_admin_successful
  • .tmux.conf
  • .tox
  • .ts_node_repl_history
  • .vim
  • .viminfo
  • .vimrc
  • .vscode-server
  • .wget-hsts
  • .yarn

And a couple more, non-hidden files for Go.

  • go
  • sdk/go1.20
[-] darcy@sh.itjust.works 29 points 1 year ago

i can almost ignore the hidden ones, but ~/go? no thats just rude

[-] waspentalive@beehaw.org 16 points 1 year ago* (last edited 1 year ago)

Why aren't all of these just normal directories under either .local (for data files) or .config (for configuration)???

Actually, I think the XDG directories should be under a single XDG directory either dotted or not (a better name would be OK with me) ~/xdg/Documents, ~/xdg/Music, ~/xdg/Pictures etc.

load more comments (3 replies)
[-] darcy@sh.itjust.works 14 points 1 year ago

afaik, tmux can use ~/.config/tmux/tmux.conf or something, if ~/.tmux is not found

load more comments (1 replies)
load more comments (2 replies)
[-] natecox@programming.dev 33 points 1 year ago

The rust library mentioned there doesn’t support system install paths for windows or macOS, it only uses XDG. I recommend the directories crate which properly supports Linux, Mac, and Windows.

https://github.com/dirs-dev/directories-rs

load more comments (2 replies)
[-] guckfoogle@sh.itjust.works 32 points 1 year ago

You might wanna backup your dotfiles somewhere remote too. I literally lost dotfiles that I'd been building up for years because I couldn't remember the password to my Linux machine after coming back from vacation. Funny enough though, a couple hours after nuking my OS I magically remember my password.

[-] pitbuster@lemmy.ml 41 points 1 year ago* (last edited 1 year ago)

Unless you disk was encrypted, you could have booted up a live distro and back up the files you needed (or even overwrite the shadow file to get a new password)

[-] mvirts@lemmy.world 12 points 1 year ago

And maybe could still get them with testdisk 😁

load more comments (2 replies)
load more comments (1 replies)
[-] conc@lemmy.ml 19 points 1 year ago

After two years of typing in the same boot pass on my same laptop at my same job I woke up one day and couldn't remember it. Almost died trying. Right as I was reaching out to my admin it came to me.

load more comments (2 replies)
[-] JetpackJackson@feddit.de 25 points 1 year ago

Me staring aggressively at Steam, Zotero, and bash:

(And more)

[-] loutr@sh.itjust.works 14 points 1 year ago

To be fair, bash was released a decade before the XDG specs.

load more comments (1 replies)
load more comments (11 replies)
[-] herr@lemmy.world 24 points 1 year ago* (last edited 1 year ago)

And wtf is with anaconda3 just permanently changing your "user@machine" terminal prompt?? Who thought that was a good idea?

load more comments (1 replies)
[-] Blizzard@lemmy.zip 20 points 1 year ago

My $HOME is my castle (・へ・)

load more comments (1 replies)
[-] Urist@lemmy.ml 18 points 1 year ago* (last edited 1 year ago)

Tangentially related: I recently learned that there are tools for handling dotfiles such as chezmoi and yadm. I would suppose that after spending some time on backing up the dotfiles that matter one can purge the remainders without much issue. I also remember some tool that was made for the purpose of cleaning $HOME, but can not recall its name (if anyone knows please let me know).

load more comments (3 replies)
[-] JoMomma@lemm.ee 15 points 1 year ago
[-] TankieTanuki@hexbear.net 15 points 1 year ago

I hate it when an application puts its configuration data in its own dotfile under $HOME instead in ~/.config. Also hate it when caches are stored in ~/.config, because then I have to manually tag those subdirectories for exclusion before doing a backup.

[-] RandomLegend@lemmy.dbzer0.com 14 points 1 year ago

Yes please!

[-] xXthrowawayXx@hexbear.net 12 points 1 year ago

Also if the normal invocation of your program produces more than 3k lines of stdout, sanitize it and default to a file.

[-] elbarto777@lemmy.world 11 points 1 year ago

A user may want to back it up as an important part of their system, control it’s permissions,

control its* permissions

[-] Moonrise2473@lemmy.ml 11 points 1 year ago

I'd like to set nautilus to show hidden files, but I can't stand the amount of "trash" there's in home

Everyone is thinking "my app is the best, it totally deserves a ~/.myappisthebest directory"

load more comments
view more: next ›
this post was submitted on 28 Sep 2023
672 points (98.7% liked)

Linux

48179 readers
1128 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