Spyke
linux·Linuxbycm0002

Linux is Getting a New Default Folder in Your Home Directory

If you are using a rolling release distro like Arch, you might have noticed that your home directory now has a new member, a new folder called "Projects".

For as long as I remember, Linux has always had a set of default folders under the home directory. Usually they are Documents, Music, Pictures, Videos and Downloads. Templates, Desktop and Public folders are also there.

Now we have a new addition in the form of "Projects".

Linux is Getting a New Default Folder in Your Home Directoryhttps://itsfoss.com/news/new-projects-directory-linux/Open linkView original on lemy.lol
piefed.world

Y'all don't just do everything out of your Downloads folder?

159
Albbireply
piefed.ca

~ is kinda hard to reach. I just put everything in root so I just have to type / once to find everything.

/s

75

Everything is just in /. I patched directory support out of ext4.

25
altphotoreply
lemmy.today

My wife's Windows 10 desktop can fit one more icon. Just need to overlap a few others here and there.

11
trololololreply
lemmy.world

Living dangerously in agile times. I do it in /tmp and I set auto clean for every reboot.

8

auto clean for every reboot

Mount /tmp as tmpfs, dummy. It's literally in the name.

2

I like this idea. I've been doing pretty much the same thing for a while now, though it's been a subdirectory of Documents.

66
anarchist.nexus

I made SO MANY directories under home that could have just been ~/Projects that I'm annoyed with myself for not doing something so simple.

.... I'll be using the projects directory heavily going forward

50
andyburkereply
fedia.io

As someone who has used ~/Projects for years and has syncing and other setup around it I am (very slightly) terrified this change could somehow fuck with me.

Please let this just be a mkdir call that will fail.

16

I also use a Projects folder. It looks like it probably won't break anything. Apps might start putting stuff there by default, hopefully in sensible subdirectories. There's a note in the article that you can create ~/.config/user-dirs.dirs to specify where you want files to go.

9
anarchist.nexus

Nope. Only makes for new installs, and only uses it as a save spot default if the application asks for it. Should be no change at all.

5

When I read it originally (a bit back, maybe a week or two ago) it was new installs that was noted, though new users would make sense.

I guess I'll find out soon enough on a test box.

5

I'm on Artix Linux and it did automatically create it after an update.

It likely just runs xdg-user-dirs-update which, in my experience, doesn't delete anything if the folder is already there (the command just changed the folder icon in the file manager when I used to run it on a WM).

2

I think that's what normal people have been doing for decades.

0

This is the way. Everything I created in folder in Documents. Everything I downloaded in downloads. Home should be otherwise empty, except for all the left-over dot-folders that old software leaves lying around.

5
programming.dev

Everyone complaining, and here I am not having noticed the change because I've created that directory for myself years ago :-P

Personally its for organisation

50
naught101reply
lemmy.world

What do you put in it? For me the logical place for that would be ~/Documents/projects

11
promitheasreply
programming.dev

All my projects, which to be fair are mostly programming.

~/Documents/Projects doesn't make sense to me because theyre not strictly documents. In documents i have - well, documents like bill receipts, forms ive filled in, etc...

My projects are a first-order thing for me if that makes sense, so it makes sense to have them in the top-level of my home.

17

Right, for me "documents" is just "personal files". I used to have it called that, but then I just had and empty dir sitting there unused..

I don't like putting things in home because then files get mixed up with config and cache and crap, and it's more annoying to search

2
ikiddreply
lemmy.dbzer0.com

Luckily I created mine as projects so I don't have to worry about it writing a bunch of shit into my actual projects folder, or having to fix the xdg setting to disable it.

5
FauxLivingreply
lemmy.world

Same, I picked it up from some random user I was watching.

It may as well be called 'git folder' because it's almost exclusively used to clone 'hmm, neat' github repos and for my various 'to do' projects where I've gotten as far as running git init.

8
lemmy.world

I have two folders for git though, my projects, and other people's packages and such

6
hallettjreply
leminal.space

I used to have a scratch directory. Then I realized I can put stuff in /tmp/whatever, and it gets automatically deleted on reboot. I made a shell function that creates a /tmp subdirectory, and cds to it in one command.

3
hallettjreply
leminal.space

Me too! But now I'm thinking maybe I should capitalize the folder name

2

Forcing their facist file structure on is is literally wors than windows!

/s

9
programming.dev

But why are the names camel Pascal cased? It's a little bit more annoying to type.

26
Phoenixzreply
lemmy.ca

Seconded, I hate that every file is all lowercase but my home directory if filled with Downloads, Videos, Documents, etc...

13

time for a new shell or enable 'set completion-ignore-case on' in bashrc

5
SorteKaninreply
feddit.dk

Because any normal person would want it upper cased. Most people never type these folder names.

Yes, Linux should appeal to the masses, otherwise we will never get rid of Windows. No, this doesn't apply to anyone on Lemmy cause nobody on Lemmy right now truly qualify as "normal person", statistically speaking.

10
lemmy.world

Honestly I say just let the user decide what goes in their home directory. I always get annoyed at all the random garbage in there. There should be a specific place that is user owned that isn't filled with cruft and configuration files

22
midwest.social

Yeah, I have essentially never used these folders unless a program sticks something there by default (mostly pictures).

4
SkaveRatreply
discuss.tchncs.de

A thing I started doing years ago, to combat trashing to ~/Desktop or ~/Downloads:

Set /tmp as your default download directory.

At least for me, almost everything I download is just ephemeral and would collect dust

Putting it there causes it to be cleaned up on the next reboot. No more piles of junk on the desktop (the virtual one at least. Don't ask about my physical desktop)

3
Sneezycatreply
sopuli.xyz

That's a good idea until you download a 10GB file and you wonder why you're out of RAM :P

I use /tmp as a temp folder for yt-dlp (it is faster than an HDD when adding metadata and subs to the video), and I've ran out of RAM before by downloading a video too big... Silly me, my laptop only has 8GB.

2
frongtreply
lemmy.zip

If you don't, then it's not going to be cleaned up on reboot.

-1

I don't have it as ramfs and it gets cleaned up perfectly fine. never had a system where it doesn't

1

I relocated the default folders that are useful to another drive, I pretty much don't use the home folder at all apart from some random github pulls or some shit

1
TheV2reply
programming.dev

The user does decide, XDG user directories are optional and configurable. Since they are already established, user-friendly distros / desktop environments already pre-install them.

And what speaks against just using a new directory within your home directory as your "specific place that is user owned that isn't filed with cruft and configuration files"?

0
lemmy.world

It's only optional and configurable if it's respected. Which often times it's not due to convention.

And I do already actually, it's just weird that I have to.

It's 100% one of those carry overs from earlier days of computing and Linux not having great standards only great conventions. Like /bin vs /usr/bin

3

Could you elaborate how the configuration might not be respected? Do you mean that you've often encountered applications that save files to hard-coded paths and do not even let you change the destination path?

If you ask me, that's just bad software design. If the software is open-source, there is the option to request the developers to read the actual path of the respective well know directory from the XDG environment variables or allow configuration.

1
discuss.tchncs.de

Ahh, I was wondering why there's a Projects next to my projects, I thought I just made a typo at some point

21
lemmy.world

Now make all of default XDG directories lowercase. Nothing else is capitalized in the file system - why do these directories get an exception?

19
Dr. Moosereply
lemmy.world

Yeah I know and KDE ans Gnome both have settings for this but as I used to setup a lot of machines it was always frustrating that the default is uppercase and some idiots don't actually read the XDG preferences and have default uppercase directories hard coded

2

Yup, and everythjng done twice or even trice. I'm a sucker for efficiency who had some time on hand then, so i have my own environmemt setup and XFCE runner now, with clearly separated do xorg-stuff in X, XFCE stuff in XFCE, etc.

1

Yes, that is the reason to make them lowercase, so I don't have to shift when using the terminal to access my most used directories.

8
lemmy.dbzer0.com

Hah, thats funny, I... literally have a 'Projects' folder, though I'm running Bazzite.

hoists suspenders

Yep, made that folder on my own, gets the job done, mhrm.

... lol

(pleasedonotlookinsidetheProjectsfolderdeargoditissuchamess)

17

I make it? Subfolder in documents.

I’m fucking with someone elses? Subfolder in downloads.

4

We have a Programs folder for programs we've written ourselves. (Then a "repos" folder for stuff we've cloned.)

3

Absolutely. Some under a work subfolder, some under various other sub-folder depending on what they contain.

2

Ok if you keep your working copies in ~/Documents where do you keep your documents?

Orthogonal: ~/Projects is a delusional name btw, everyone's code should be in ~/Code

Put your crafting/woodworking/metalworking blueprints and schematics and stuff in ~/Projects

1
lemmy.world

That one was proposed but people were not able to agree on the name. Homework was the leading candidate when i last checked.

9

Honestly I don't mind this at all.

When I start a Godot projects, putting the project into Documents makes very little sense to me.

12

It's pretty much the first folder I add on a fresh install, gotta keep that shit contained

12

how about first getting programs to put dotfiles into the .config folder (opposed to .programname) instead of adding more folders that are inconsistent over distros for multiple years before the point of a default for IDEs and CAD programs can even be meaningfully made?

11

Ugh yeah this is a real point of annoyance for me, we have the XDG basedir spec for a reason but everything just ignores it. I'd settle for even the config part, let alone state, data dirs and the rest. Just throw it all in home...

2
lemmy.world

I always change the defaults to another place and to have another naming. Just camel casing those folders is already stupidly annoying. I guess one more silly one into another folder out of view.

I already do the following:

  • media with images, music and videos inside
  • changes to small case for desktop and download
  • change documents to docs
  • create another folder called shares which I moved the public folder inside.
  • hide the templates folder that nobody knows what is it for, so it becomes .templates
  • no idea what the projects is supposed to be about, maybe I can map it to the already existing dev folder...
9

hide the templates folder that nobody knows what is it for, so it becomes .templates

I think the templates folder is for the "New File" items, I forget how it works but you can make custom new files similar to new Text File, Empty File, etc

11

The article should also mention the new XDG variable itself, please.

And also, the XDG people should've thought of a more flexible way, that allows unlimited custom icon-directory associations. Now, we have some file managers, that do it their own way, most don't allow custom directory icons.

9

shouldn't have even started imo. it's hard for me to believe creating a projects folder is done often enough that people can't just continue to make their own

9
piefed.world

And Music? But they'd still need subfolders to keep the content organised and then it begs the question why hide it all away a whole layer lower down from the Home folder?

10

Pictures and Videos typically refer to personal media, whereas music would refer to professional media. I don’t think grouping them into a single media directory would usually make sense.

4

Oh, that's what I do, you just have to customize it. I have media with images, music and videos inside.

2

I already make my own Projects folder. Does this mean programs are going to start being tuned to make changes to it? Leave my adhd folder alone plz.

7
who
feddit.org

Sigh... Yet another thing pushed by the self-appointed nannies at freedesktop.org that I will have to manually undo on practically every new account.

At least it will probably be configurable, unlike Canonical's infamous ~/snap directory.

5
whoreply
feddit.org

I don't mind that one, since .var doesn't clutter my home dir and is only created if I use Flatpak. It follows unix conventions, stays out of my way, and is only a few lowercase letters to type if I choose to work with it.

2
whoreply
feddit.org

I don't know what you're referring to. How would changing the location of dotfiles make backups easier?

1

I guess I didn't think of that approach because it wouldn't work for me. I use a lot of tools that follow the long established convention of putting dotfiles directly under $HOME, so I back up $HOME and exclude things like cache and trash.

2

Even if I am against this kind of "defaults", today I learned how you customize this for any folder in the home directory !

For linux based system, you do like told in https://www.freedesktop.org/wiki/Software/xdg-user-dirs/

~/.config/user-dirs.dirs specifies the current set of directories for the user. This file can also be modified by users (manually or via applications) to change the directories used. Note: To disable a directory, point it to the homedir. If you delete it it will be recreated on the next login.

So at last I disabled Music, Templates, Pictures and Videos . Cleaner Home !

5

Idk, XDG is weird.
"Music", "Documents", "Downloads", "Public" and "Templates" are in Ukrainian;
"Public" and "Downloads" are duplicated in English;
"Desktop" is just English;
"Images" is in Russian for me for some reason.

No Projects despite me updating recently, I guess it just gave up.

5

That sounds like a translation deficiency. You should contribute a fix.

-1

I feel called out by the first sentence of the article

Cool I guess? I'm a weirdo who always puts projects in Documents/ so... maybe I'll use it more from now on

3

the "for as long as I remember, Linux has always had a set of default folders.."

lmao..

they've been bugging me with their presumptuousness for decades.

They can't ask if we want those things?

Sure, I can understand people coming-from the MS-Windows paradigm needing such things done for them, but to just presume that everybody wants the defaults?

Why not simply ask, in the 1st-login, if the user wants such defaults?

Opt-in, rather than opt-out, you know?

I add a ~/prog directory, that I'm certian many who either program or are trying to learn programming, add.

Does that mean it ought be a default?

Why would I want a Public folder in my homedir?

_ /\ _

3

Fuuuuuuuck

Tbh not a bad idea but I have nightmare about windows and their 3d models folder that they put everywhere

2
lemmy.ca

I love this! Now to remove other unwanted folders like templates and music

2
lemmy.world

On my Fedora system (KDE) I have unified all unused and pointless folders (Documents, Pictures, Public, Templates) into a single folder called Unspecified with a trash icon. You could probably do that as well.

2

@BiscuityCat @dudesss Sad that there is no smile-like here, but I would do it :-) Afaik it is for compatibility with the windows users. But also Android has already such a default folder structure.

1

i deleted an empty project folder yesterday... i just assumed i made it and forgor about it

2

I'm more of a fan of /Projects

then syncthing that between all my boxes.

~home is great on shared systems, but my projects should be in the same place for all my local accounts on my non-shared box.

1
discuss.tchncs.de

Why? What would I want to have the folder for? I never had it with any OS I ran. It’s either in the documents, or I’d create my own directory with the name I want. I have different types of projects, so I’d prefer organising my directories myself.

I wasn’t sure the fuck this directory keeps appearing in my home, kept removing it over and over again. Can I disable that?

1

Aha, it’s in the article:

Don't like the new Projects directory? Just delete it. The xdg-user-dirs utility will not try to create it again. The default location for this directory will be moved to your home directory.

It recreates them for me.

Power users, who want more control, can edit the ~/.config/user-dirs.dirs configuration file and modify it to control what goes where.

This might help, I guess.

10
lemmy.cafe

At least projects is an understandable purpose, I don't use the Templates, Desktop and Public folders at all, and aside from desktop (which I know is a workflow thing that I don't even use) I would need someone to explain them to me. I'm guessing public would be for a multi-user system, templates maybe for printing stuff (I do not).

4
fedia.io

Templates is super useful! You can make a copy of any file you put there in any other directory with right click > new. Some examples I usually have in my computers are 'newFile', 'newTextFile.txt' (just blank text files), 'newTextDocument.odt', 'newSpreadsheet.ods'... but once you start you'll find many more things to add like, if you're a programmer or web dev you'll put files with all the boilerplate already in them, if you design fashion you'll put an image of a figure template to draw over (in your format of choice), you have to make monthly schedules? Throw a table/spreadsheet with the days, format, colours... already in it. Anything you find yourself repeating is a good candidate to go into your templates folder.

8

Interesting. I guess I'm not that far along (sort of stalled now), and quite possibly may never really need that.

Though for this one:

Some examples I usually have in my computers are ‘newFile’, ‘newTextFile.txt’ (just blank text files)

creating a blank file and renaming to .txt before editing seems good enough for me.

2

I think Templates is for cases where you make lots of documents that have the same starting structure. Like a letter head, or a spreadsheet you recreate every month. The starting structure can be saved in Templates so you can copy it ever time you need it. Maybe I'll put a Nix flake template there instead of always copying from a recent project.

Public might be for files that other users have read access to on a multi user system? Or maybe for network shares? Or a personal website? I'm not sure. Edit: I found a comment saying that Gnome file sharing uses Public.

5
wltrreply
discuss.tchncs.de

Templates are auto-used by some software, but I don’t understand why it’s not hidden. E.g. .templates or some .app/share/templates. As not many people would ever use it, and those who will would find the location easily.

Desktop, I never used it, but I understand the workflow. I used it as a quick directory to send some files, which I could symlink. Some people use it. And some DEs show desktop files.

Music and videos, I see no point. Not many people use them at all, and for me those were separate disks (which I never needed mounted in my home). Now, it’s all separate machines (for self-hosted media content and servers).

I use only documents and downloads, and in general, that’s enough for me. Also I use some top level directories, and I name them myself. All my files are my projects, I see no point in having any other files in my home.

I have a .hidden file to hide the rest.

4

I do use music and video (Flash animations in video too), though yeah they have been moved to slower drives (because data, easier migration). I use XFCE but don't use desktop icons.

2