News for hackers. Stuff that matters.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by throw7 on Thursday August 11, 2022 @12:52PM (#32428557)
Don't worry Rob. Freedesktop.org learned and spammed my home dir with Desktop/Document/Downloads/Music/etc/etc/etc...
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.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by psanford on Thursday August 11, 2022 @01:00PM (#32428671)
That is annoying but easily fixed with xdg-user-dirs-update eg:

    xdg-user-dirs-update --set MUSIC ~/.xdg-user-dir/music
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by UI_at_80x24 on Thursday August 11, 2022 @01:12PM (#32428829)
My annoyance is that they create any 'helpful' directories. It's just as bad on Windows. "Download", "Pictures", "3D crap", etc....

Nope, fuck that.

This is my $home, I'll make it look how I want.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by alexvoda on Thursday August 11, 2022 @01:29PM (#32429099)
You may indeed prefer an empty canvas you have full control over.

However, creating these folders by default is actually beneficial to most users. Most users (especially the vast majority that transitioned from Windows) expect these folders to exist.

I believe the choice to not create these existed and still exists. Yet either all the distros that made that choice are history or they all made the opposite choice.

I can say the same about other choices. I vastly prefer having a TRRS headphone jack and expandable storage on a phone. These do not appear to be priorities for most people.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by adrusi on Thursday August 11, 2022 @02:56PM (#32430174)
The choice not to create these directories basically doesn't exist, because all sorts of software will automatically create them if they don't exist, their creation isn't centrally orchestrated. A while back I was using a minimal i3-based desktop and when I launched transmission-gtk it thought I might want a "Downloads" folder, and would create it whenever it launched, even though it had been configures to download files elsewhere.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by psanford on Thursday August 11, 2022 @03:11PM (#32430337)
That not really true. Most desktop environments will create the directories on session startup but depending on the DE that behavior can be disabled (in xfce for example has a service in the session you can disable).

It is true that applications will create these directories if they don't exist. But you can fix this by setting the XDG user directories[0] to something that isn't in your home directory. I set them all to a subdirectory under `~/.xdg-user-dir/`, but you could just as easily set them to `/tmp`. Nothing has recreated ~/Documents on my system in years.

[0]: https://wiki.archlinux.org/title/XDG_user_directories

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by alexvoda on Thursday August 11, 2022 @03:08PM (#32430310)
I was not aware of that behaviour. I agree that should not happen. Or the user should be asked if they want that. This should very much be under the control of the system and the apps the user chooses to manage the system. In a capability-based OS, apps would not be able to misbehave like this, unless granted the capability.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by jl6 on Thursday August 11, 2022 @01:47PM (#32429354)
> This is my $home, I'll make it look how I want.

I have long since accepted that it’s not my $home after all, but rather a general purpose application config dumping ground. My actual “home” is now a top level directory used only by me.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by jrockway on Thursday August 11, 2022 @01:08PM (#32428779)
I had no idea. Excellent tip!
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by jmclnx on Thursday August 11, 2022 @02:57PM (#32430188)
I agree, but the OpenBSD did some nice things in regards to ~/Downloads

Using unveil() and pledge(), OpenBSD hides many $HOME and system directories from Firefox and chrome. Thus an errant javascript will only see things in ~/Downloads

So one nice use for these.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by petepete on Thursday August 11, 2022 @02:47PM (#32430074)
I like to lowercase mine so bin and projects don't look weirdly out of place. Thankfully it's totally customisable.

https://github.com/peteryates/dotfiles/blob/master/xdg/.conf...

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by kodah on Thursday August 11, 2022 @12:56PM (#32428617)
What Rob is griping about is more analogous to $HOME/.config now, or /var/run for non-user specific stuff.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by t-3 on Thursday August 11, 2022 @01:04PM (#32428723)
It's even worse with dotfiles nowadays than before. We have the cluttered "xdg" dotfile directories, and then a bunch of stuff makes random dotfiles/dotdirs in the home directory, and then .profiles/shellrcs/xinits that are basically required. Every single program seems to think you want a scrollback history, a configuration directory, or some random garbage to remind of you of that one time used it.
Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by samatman on Thursday August 11, 2022 @01:22PM (#32428985)
Complying with the XDG standard seems about as good as a stringly typed OS like Unix can get.

Part of which is making sure that the defaults the program chooses may be overridden by consistent environment variables.

Programs need some way to persist their own state and configuration, after all.

The fact that XDG is more honored in the breach is tiresome, but this can at least be corrected, and it's well enough put together to be a steady-state approach to wrangling dotfiles.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by nmz on Thursday August 11, 2022 @02:24PM (#32429802)
Windows fixed this by just having %APPDATA%, and to me, its a great idea. No .config, no .local, no .share, no .randomfile, each installed program has its directory in hidden directory, and nobody has to know what each directory is for, and sure, this is what ~/.config is for some, but I also see there's some stuff in ~/.local/share and so on.

To expand on this, when a program gets installed, it should write its binary location in a file, then if you ever erase it, a doesthisexistanymore $Config/dir/*/symlink | remove_entire_configuration_directory should be run via cron daily.

No manual cleanup, ever.

Re:Dotfiles being hidden is a UNIXv2 mistake (2012) by kodah on Thursday August 11, 2022 @05:14PM (#32431785)
Slight correction here, XDG keys are analogous to Windows standards: https://github.com/adrg/xdg/blob/master/README.md