News for hackers. Stuff that matters.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by MichaelCollins on Thursday August 11, 2022 @01:28PM (#32429074)
I've never seen anybody use these trashy preset directories as intended. Experienced users ignore them or delete them, using their own directory structure instead. Inexperienced users use one of them (usually Downloads or Desktop) while the others are treated as write-sometimes/read-never; e.g. sometimes they accidentally have files saved to those other directories which may as well be that file disappearing into the void never to be seen again.

These presets only serve to confuse or at best annoy. These directories were well-intentioned originally but proved to be a huge mistake. They need to go away.

(Edit: The above rant applies only to Downloads/Music/Video/etc. I think ~/.config and ~/.local are fine. I have no problem using those as intended, and I've seen plenty of other people using them too.)

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by bogwog on Thursday August 11, 2022 @02:59PM (#32430198)
Well the Music/Video folders are probably less relevant now with the popularity of streaming. If you aren't using ~/Downloads, then that means you went through the extra effort of re-configuring your web browser for some reason. I don't think many people do that.

Overall I think it would be productive to go back and redesign these old folders, even if it breaks some stuff if only to better reflect the way the new generation of consumers understands tech. There are probably a lot of young people who have never used a PC before, and will be confused coming into them with a background of smartphones and tablets.

Maybe we should eliminate the Desktop folder completely, and only allow adding widgets/app launchers/shortcuts to the desktop rather than files. Using the desktop as a folder has always been a questionable practice since you can't even see it when you have a window open.

At the very least, we should get rid of the "Templates" folder. I still have no idea wtf that's meant to be used for.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by jle17 on Thursday August 11, 2022 @05:00PM (#32431660)
> Maybe we should eliminate the Desktop folder completely

Seconded. I'm irrationally annoyed that it gets created and sometimes filled with .desktop files while my DE doesn't even use it.

> At the very least, we should get rid of the "Templates" folder. I still have no idea wtf that's meant to be used for.

You can place files in the "Templates" dir to serve as templates for the "right-click > new document" feature in nautilus and some other file explorers.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by pdntspa on Thursday August 11, 2022 @01:35PM (#32429181)
Windows users use them, Mac users use them, hell even on a fresh profile in Gnome I use them...

It is a little weird to see htem on a server OS install though

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by rgovostes on Thursday August 11, 2022 @01:48PM (#32429360)
They exist on macOS and Windows but I tend to agree that these directories are not particularly useful for users.

Apple software tries to organize files but it's a disaster: iTunes used to download movies to ~/Music/iTunes/iTunes Media/Movies, now TV.app downloads them to ~/Movies/TV/Media/Movies (!), and videos I shoot on my iPhone end up in ~/Pictures.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by pdntspa on Thursday August 11, 2022 @02:46PM (#32430060)
There has always been a tragedy of the commons with these folders, nobody can agree on where a lot of stuff goes.

Should my game saves go in Documents? What about Documents/My Games/Publisher? What about %APPDATA%/Publisher? Hell there's even a few in ~/My Games. Every new game, figuring out where the save data went is an adventure and it's cluttered up every folder it touches. And now for whatever reason everyone is being pushed to put user data in %APPDATA%, which I don't consistently remember how to get to without that shortcut. So who knows!

I just looked up the save data location for Subnautica and it is (I shit you not): %AppData%\..\LocalLow\Unknown Worlds\Subnautica\Subnautica\SavedGames

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by ablob on Thursday August 11, 2022 @03:33PM (#32430648)
LocalLow is just %LocalAppData% for low privillege programs. The Roaming folder (%appdata%) is for platform independent data, and the LocalAppdata folder fo platform specific data. You can find the appdata folder in your userhome "C:Users\YourUserName\AppData", but it's hidden by default if you havent changed it.

Edit: clarified what I mean by the Appdata folder

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by pdntspa on Thursday August 11, 2022 @03:47PM (#32430844)
I am aware of that, those folders have existed as such since at least Windows XP. But only recently have I noticed consumer software placing fungible user data in there.

IIRC at one point you couldn't even open one of the "AppData" homefolder aliases, Explorer would spit out some error message and you'd have to navigate to the hidden folder or key it in manually.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by MichaelCollins on Thursday August 11, 2022 @02:04PM (#32429560)
> Windows users use them, Mac users use them, hell even on a fresh profile in Gnome I use them...

Really, you use all of them? When you go on vacation and take some pictures and video of your family, do you then split those files between ~/Video/Beach2022/ and ~/Pictures/Beach2022?

I've never seen anybody do this, not on Windows, MacOS, or any linux DE. Instead you get something like ~/Desktop/Beach2022 or ~/Downloads/vacations/Beach2022 or generally, a single directory anywhere (often on a USB harddrive, not their home directory at all), but never do those vacation files get split by filetype into ~/Videos and ~/Pictures, that seems like utter madness to me.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by klodolph on Thursday August 11, 2022 @02:32PM (#32429880)
I think pictures + videos from vacation are the exception. I definitely use the ~/Movies ~/Pictures ~/Music (or ~/Videos) folders to hold those types of media. I do this on macOS, Linux, and Windows.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by pdntspa on Thursday August 11, 2022 @02:43PM (#32430030)
Not exactly, but as I poke around those folders on my desktop PC, all of them hold various things. If I didn't have a NAS they'd hold a lot more stuff too.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by marcosdumay on Thursday August 11, 2022 @02:05PM (#32429578)
Browsers default into putting files in ~/Downloads, so that one gets used. DEs default into showing anything under ~/Desktop on your screen, so people disable the desktop file browser.

~/Documents is there because Freedesktop.org somehow thought they were dealing with Windows and tried to port the solution of problems Linux does not have. The other directories aren't used on any OS and only serve to annoy people.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by layer8 on Thursday August 11, 2022 @04:33PM (#32431361)
I don’t know anyone who actually uses the Documents folder under Windows either.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by bscphil on Thursday August 11, 2022 @02:50PM (#32430099)
I don't know anyone, other than a few tech-ignorant people who put everything on the desktop, who doesn't use them. Where else would you put stuff like music, pictures, documents, etc? These different types of files usually call for different hierarchies, so you've got to do something.

What do you do instead?

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by MichaelCollins on Thursday August 11, 2022 @03:19PM (#32430457)
>These different types of files usually call for different hierarchies

I organize my files by subject, not file type.

My files about space stuff go in a directory called 'space'. Files about the space shuttle go in space/shuttle. This directory contains any sort of file related to the space shuttle, be it picture, video, pdf, epub, or otherwise. I don't see any utility in breaking this directory apart into ~/Pictures/shuttle, ~/Videos/shuttle, ~/Documents/shuttle... Do you really do something like that? How far do you take this "different files, different hierarchies" principle? Do pdfs and docx go in two different hierarchies too? Are pngs and jpegs separated? What's your criteria for deciding when different sorts of files get different hierarchies?

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by bscphil on Thursday August 11, 2022 @10:12PM (#32434067)
What I do is probably more similar to you than you realize. I'm not categorically placing all images in ~/Pictures, rather I'm using that directory primarily for pictures that I've taken. Each photo taking session gets its own sub-directory with the ISO 8601 date followed by a description of the event. This is extremely convenient because software I use (like raw image developers) automatically knows to look in ~/Pictures and I can access my files right away.

Likewise, I'm not using ~/Documents just for stuff with an .odt or .pdf extension. Rather, any sort of human-readable text based file goes there. I have some markdown files that have embedded images, and of course the .png or .svg files exist alongside them in the relevant directories.

~/Music is probably the best example of why the default XDG approach makes sense. You can place everything in an Artist/Album hierarchy, and most music software is written to automatically pick up and scan these directories to keep their internal libraries in sync. There's no fuss.

I don't limit myself to just the XDG directories when there's not a close fit; i also have a ~/Projects for various things I've made and ~/Programs for statically built programs that can't be installed, and so on.

Basically, I've found that the XDG approach does a pretty good job of splitting up files by purpose, allowing you to compartmentalize by avoiding having too many directories at the top level of the hierarchy.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by llanowarelves on Thursday August 11, 2022 @03:21PM (#32430494)
As an aside, the desktop is a great place as a TODO-list / sticky note. Your stuff sitting there is so present and ugly, you will feel anxiety to get it sorted to a proper place.

I am more likely to do something with those files than if they are hidden away in Downloads (which is like a tempdir), or on windows, some User/Documents subfolder somewhere.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by GauntletWizard on Thursday August 11, 2022 @03:19PM (#32430461)
You don't know a lot of people, then - Most people, the vast majority, are tech ignorant that way.

The concept that files are cross-compatible, and usable outside the app that created them, is increasingly foreign to an online app oriented world.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by bscphil on Thursday August 11, 2022 @10:03PM (#32434019)
My point is that that sort of person is not organizing their files at all. They're not refusing the Linux/Windows/Mac hierarchy and choosing a different one consciously, they just don't understand that the hierarchy even exists.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by Beltalowda on Thursday August 11, 2022 @02:59PM (#32430200)
A lot of people running more "minimalistic" window managers like i3 or dwm or whatnot don't really have a "desktop" like Windows, macOS, GNOME, KDE, etc. have, and everything tends to just go in ~, or some subdirectory of that.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by bee_rider on Thursday August 11, 2022 @01:46PM (#32429342)
Downloads is fine, IMO. It is basically a temporary files directory. I'd be fine with changing the name to tmp, but I don't really see a reason to change the default.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by nmz on Thursday August 11, 2022 @01:59PM (#32429494)
Downloads is not a temporary files directory, that's what /tmp is for, I for one am using $HOME/Tmp instead of /tmp because /tmp is for whoever doesn't respect $TMPDIR big problem if you don't have much ram and you want to avoid writing to an sdcard. (assuming /tmp is tmpfs)
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by naniwaduni on Thursday August 11, 2022 @02:13PM (#32429663)
Okay, it's persistent storage for potentially arbitrarily large files that probably came from a browser, that you haven't gone out of your way to find another location for. You can go pretty far outside the viable scope of /tmp, but still have the files' presence there be logically temporary.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by MichaelCollins on Thursday August 11, 2022 @02:23PM (#32429782)
> (assuming /tmp is tmpfs)

Not a safe assumption, annoyingly. Debian doesn't use tmpfs for /tmp; I guess they expect you to use /dev/shm if you want a tmpfs.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by nmz on Thursday August 11, 2022 @06:44PM (#32432767)
Which is non-portable.

(Well, it exists in freebsd, but not openbsd, no clue if it exists in netbsd/minix)

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by naniwaduni on Thursday August 11, 2022 @02:02PM (#32429545)
I find Desktop fine, it serves a distinct purpose; Downloads doesn't seem like the greatest idea, but works well enough considering browsers. Documents/Music/Video/&c., though, I definitely concur doesn't provide any obvious value being more than one directory.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by game-of-throws on Thursday August 11, 2022 @02:04PM (#32429556)
Imagine being the poor soul who had to implement Windows's "3D Objects" directory.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by layer8 on Thursday August 11, 2022 @04:28PM (#32431304)
I’m tempted to rename "Pictures" to "2D Objects" and "Music" to "1D Objects".
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by Beltalowda on Thursday August 11, 2022 @02:57PM (#32430184)
> Experienced users ignore them or delete them

I wish I could! But ~/Desktop and ~/Downloads keep getting re-created by ... something :-/ I tried setting XDG_{DESKTOP,DOWNLOAD}_DIR but it seems to get ignored. Been annoying me for years.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by epakai on Thursday August 11, 2022 @04:15PM (#32431166)
Modify ~/$XDG_DIRNAME_DIR/user-dirs.dirs (usually ~/.config/user-dirs.dirs). You can just point them all to $HOME if you don't want any sub-directories created.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by Beltalowda on Thursday August 11, 2022 @04:32PM (#32431352)
I'm fairly certain I tried this in the (distant) past but that it didn't take, but I've tried again; we'll see if it gets re-created.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by nobody9999 on Thursday August 11, 2022 @04:21PM (#32431243)
>I wish I could! But ~/Desktop and ~/Downloads keep getting re-created by ... something :-/ I tried setting XDG_{DESKTOP,DOWNLOAD}_DIR but it seems to get ignored. Been annoying me for years.

Perhaps something like:

   ln -s /dev/null ~/Desktop

   ln -s /dev/null ~/Downloads 

   etc.
That would solve the problem, no?
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by layer8 on Thursday August 11, 2022 @04:29PM (#32431319)
It wouldn’t solve the problem of those directory entries being present.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by pfraze on Thursday August 11, 2022 @02:10PM (#32429629)
I actually use these extensively on my mac, believe it or not.