Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I hate when applications ignore the XDG spec, but you know what I hate more? the XDG spec!

I don't want all my pictures to go in Pictures, all my documents in Documents, etc. I want everything from each project to go in the directory for that project. I don't need it to read my mind, but when I save a document to a new directory and then I want to save a spreadsheet too... I want that new directory to be a top-line choice, but I want the old directory there too.

Doesn't everybody work like me? (asking seriously)

and hey, call me a freak, but I still get the odd sort of picture that I don't want showing up on the lock screen screensaver



What are you talking about? When people say the "XDG spec", they are usually referring to the XDG Base Directory Specification, but there are other specifications from XDG - are you talking about a different one?

Because the XDG Base Directory Specification does not dictate about how files should be saved - whether in Pictures/, Documents/, or anything else...



Also I hate localized XDG directories. Windows and macOS don't localize real directory name but only Linux does. I run LANG=C xdg-user-dirs-update after I install Linux with my lang


Windows does (did at least)

And macOS has Xxx.localized directories


Windows just localizes how it shown on Explorer (and have API to get localized name), so real path is still C:\Users\user\Documents . macOS does the same thing by the way as you wrote. I don't think it's a problem.

Only XDG based systems use real /home/user/ドキュメント (in Japanese) directory . This is annoying. Please localize it well as Win/mac does.


Now yes, but it didn't used to be that way. No, I can't tell you which version changed that, it might have been 2000. :P


Right, I still remember programs blowing up because they expected C:\Program Files and then encountered C:\Programme - that one at least got better when WoW64 forced the issue for english-speaking devs.


I 100% agree. Localized directories was a stupid mistake. The way Windows does it today is much better and XDG should follow suit.


I don't think there is a spec dictating that the default location for saving files needs to depend on the file tile - which program is doing this? I think Firefox remembers the last used path per file type, even across restarts.

The Desktop, Downloads, Pictures, etc. directories themselves are not from the XDG Basedir spec and not set by XDG_ environment variables but instead in the $XDG_CONFIG_HOME/user-dirs.dirs file. I also find these less useful than the more generel data/config/cache dirs and have most theme set to my home directory - perhaps that is affecting how Firefox works?


hypothetical, but, could easily make a script that, upon cd, checks all above directories for `.xdg-root`, and while inside, has envvars set to use said folder as a root for Documents/Pictures/Etc folders


not a terrible idea, has some good points, but gui apps don't cd in a way that can be hooked, and usually i get around to popping a terminal window after i'm working on a project rather than before. (also, cd isn't so easy to script, I'd have to use a bash function, but i'd probs have to make a up new name to get used to, cdproj or something, otherwise any "headless" scripts would be do it too

And I frequently jump from desktop to desktop for multiple projects, and my terminal on that desktop is likely to already be where I want to be. Do gui apps reliably reload xdg all the time, or only at startup?

anyway, keeping it in mind, it might just be worth the trouble to click a scripted icon on each desktop :)


You can set the XDG environment variables in Direnv maybe?


The Desktop, Downloads, Pictures, etc. directories are not from the XDG Basedir spec and not set by XDG_ environment variables but instead in the $XDG_CONFIG_HOME/user-dirs.dirs file. I also find these less useful than the more generel data/config/cache dirs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: