11 ms·
I wish they did "User Files" instead of "Users" too, because so much software breaks on the home area having a space in it. Not least, it makes writing scripts
by ealexhudson 5y ago
I wish they did "User Files" instead of "Users" too, because so much software breaks on the home area having a space in it.
Not least, it makes writing scripts for various shells and getting the quoting rules right an absolute pain as well...
- the_mitsuhiko 5y agoThey used to. The folder was called `Documents and Settings` until Win7.
- 323 5y ago"Documents and Settings" still exists on Windows 10, as a soft link to "Users".
- 0des 5y agoYou know, this makes me wonder.. tangentially speaking- I wonder how hard it would be to rearrange the folder structure in linux so that I have something like this: /Users/{root, user0, user1, ... }... /System/{Logs, Apps/{opt, container, ...}, Temp, Conf ...}... /Devices/{Mount, sda, sdb, null ...}... /Boot/...
- selfhoster11 5y agoGoboLinux does exactly that: https://en.m.wikipedia.org/wiki/GoboLinux https://en.m.wikipedia.org/wiki/GoboLinux
- DarkWiiPlayer 5y agoDammit, I wanted to be the one to mention gobo linux [HN deleted my laughing emoji ffs]
- andai 5y agoBeat the system ʕ•ᴥ•ʔ
- gavinray 5y agoHow do you deal with lack of being able to just point to "/usr/lib/include" or other things when saying "here's my directory of shared libs"? This is definitely interesting though, and an improvement I would say
- JonathonW 5y agoGoboLinux symlinks everything into an FHS-ish structure under /System/Index/ so you still have a single place where binaries/libraries/includes/etc. live. (There are also symlinks from /usr/lib, /usr/bin, and others into /System/Index/ for compatibility with programs where those might be hardcoded.)
- short12 5y agoThat actually seems like some low hanging fruit to go on a commit spree correcting code that hard codes paths
- oblio 5y agoGoboLinux is old enough to vote in most countries. So either those low hanging fruits are higher than they seem, or we're all just a bunch of dwarves. My bet is on the second option.
- matheusmoreira 5y agoIt is low hanging fruit as far as the software is concerned. Simply parameterize all paths. Will upstream accept such patches though? Sounds unlikely to me.
- 0des 5y agoWow, thanks for the reply, nice find! I did some poking around on my Linux system and even re-arranging the home folder was a task of its own because the system kept trying to replace folders in their original places. I will do some digging in to Gobo and see how they're handling this. Thanks again for pointing this out.
- dotancohen 5y ago> the system kept trying to replace folders in their original places. This is the file that you want: $ cat ~/.config/user-dirs.dirs XDG_DESKTOP_DIR="$HOME/" XDG_DOWNLOAD_DIR="$HOME/Downloads" XDG_TEMPLATES_DIR="$HOME/" XDG_PUBLICSHARE_DIR="$HOME/" XDG_DOCUMENTS_DIR="$HOME/" XDG_MUSIC_DIR="$HOME/" XDG_PICTURES_DIR="$HOME/" XDG_VIDEOS_DIR="$HOME/"
- yjftsjthsd-h 5y agoThat helps, but be warned that there are still programs running around that just hardcode their paths
- kaba0 5y agoCries in nixpkgs (Anyone who tried to package a program that hardcodes the “usual” binary paths know the pain)
- account42 5y agoDoesn't nix itself hardcode the nix store path though?
- kaba0 5y agoAfaik there is an option to change it, but it is not advisable as that will break the binary cache and you are left with compiling everything yourself. This is due to a technical limitation in that different packages can contain paths everywhere and thus they are inherently part of the resulting hash, on which other packages can depend.
- caymanjim 5y agoYou monster!
- Bad_CRC 5y agomacos does something like that.
- Spivak 5y agoI mean we're heading there with /usr being your /System. Redhat/Pottering are doing heroic work in this space. /Users -> /home /System -> /usr /Data -> /var /Config -> /etc /Boot -> /boot /Ephemeral Temp -> /run /Persistent Temp -> /tmp The only real holdouts are proc/sys/dev which are the kernel and mnt/media/opt/srv which are really for the user/sysadmin and aren't really used by the OS anymore.
- woodruffw 5y agoGenuine question: on what systems is `/tmp` persistent? Both macOS and Ubuntu 20.04 clear `/tmp` on every reboot for me, and I haven't changed the defaults at all.
- novok 5y agoPeople don't reboot often. Persistent tmp basically means it will be cleared in an infrequent manner, so the likelihood of it going away 1s after you release your file handle is low.
- earthboundkid 5y agoAll storage is temporary. You just gotta wait long enough.
- mike_hock 5y ago"Persistent Temp" should be /var/tmp. "Persistent Temp" is also an oxymoron.
- nybble41 5y ago> "Persistent Temp" is also an oxymoron. It's not an oxymoron to have files which are temporary but not limited in scope to a single power cycle. For example, you could have a long-running process which you want to be able to resume if it's interrupted; /var/tmp would be an appropriate place for the state. The data is temporary because it will be deleted once the process is finished, but you wouldn't want it wiped out by a system reset. Generally /tmp is cleared at every reset, and is often a tmpfs mount, while files in /var/tmp are automatically cleaned up only when they reach a certain age.
- abdusco 5y agoThis is what I want from Linux. Sensible & guessable names for newcomers to figure out where to put files and programs. It's frustrating having to spend time to decide whether I should install a program in /var or /opt or /usr. What do they even mean! So, I disagree with this convention altogether and use /apps or ~/apps now.
- 0des 5y agoBehold! https://en.m.wikipedia.org/wiki/Filesystem_Hierarchy_Standard https://en.m.wikipedia.org/wiki/Filesystem_Hierarchy_Standar...
- LordDragonfang 5y agoI feel like it just highlights the problem of how antiquated and confusing linux terminology that so many of those reference "single-user mode", used to refer to booting into root, when the vast majority of computing devices a given user will interact with only have a single actual user, making this a confusing and almost meaningless distinction to someone not already intimate familiar with linux.
- emteycz 5y agoYeah, except that tells me nothing useful... The question is exactly the same: So where do I install this random binary I downloaded from the internet or compiled myself? Is it /opt, /usr/bin, /usr/local/bin, or /bin? Where do I put the dependencies I compiled for this software - /usr/lib, /usr/local/lib, /lib, /opt/lib, /opt/<app name>/lib, or what?
- biryani_chicken 5y agoYou don't even need to rearrange the folders themselves, just show them like that in the file explorer. Same way the windows explorer does.
- riccardomc 5y agoWhy not just symlink them? You can have best of both worlds with relatively little effort. Make the overlay of your dreams!
- anyfoo 5y agoIs it coincidence that you almost exactly replicated what macOS has? Except that /Devices is /Volumes, .../Apps is .../Applications. and /Boot is handled differently. Of course, that's not perfect either, because a) decades of changes vs. compatibility have made it less clean in certain places, and b) pretty much all the POSIX paths still exist for unix-y compatibility, but overall it's like that.
- e0a74c 5y agoCouldn't you do it with plain old symlinks?
- matheusmoreira 5y ago> I wonder how hard it would be to rearrange the folder structure in linux Restructuring the directories is the easy part. You just delete the old tree and make a new one. You can also mount procfs and sysfs wherever you want. The hard part is modifying existing software to work with the new tree. So many programs assume you have a "standard" file system tree. So many programs assume procfs is mounted at /proc. So many programs have hardcoded paths. Shared library locationd can become part of the binaries when they're compiled. It's insane and you'd essentially be creating a new Linux distribution.
- sixothree 5y agoI know this is completely tangential. But you can Win-R and just type Documents and it will load your documents folder. Same for downloads, pictures, temp (windows temp), and I'm sure many others. Works from File-Open dialogs and address bars and even in the command prompt you can even do "explorer documents".
- thedday 5y agoYeah, it's a junction point, but it's also useless. Open a command box and CD to it; now what? A file explorer and set it as the directory, again, now what?
- WalterBright 5y agoNothing says progress like renaming all your paths.
- gary_0 5y agoIn the Win95 era, it was "C:\My Documents".
- grishka 5y agoHuh, spaces. There's way too much software, especially on Windows, that breaks when there are Cyrillic characters in a path. I'll let you guess how I found out.
- DarkWiiPlayer 5y agoA friend had the username "Rubén" and jfc it broke everything other than windows itself xD
- dhosek 5y agoThe problem isn't the Cyrillic or the é but the fact that Windows lets you put those characters in file names in non-Unicode encodings which will create sequences of bytes which are invalid UTF-8. It's 2021, FFS, stop using legacy encodings.
- grishka 5y agoAll win32 functions that accept or return strings come in two varieties, with A and W suffixes, MessageBoxA/MessageBoxW. The A works with the system default 8-bit encoding (cp1251 in case of Cyrillic), the W works with unicode in wide chars. There shouldn't be much of a problem with string handling if you stick exclusively with W functions.
- ziml77 5y agoUsing the W functions has been the advice from Microsoft's documentation for ages. But people still use the A functions because they're easier, especially when writing cross-platform software since Windows is the only major OS that made the unfortunate choice of having the base character type 16 bits wide. Fortunately the future of the Windows API does look better since Microsoft has now added proper UTF-8 support since Win 10 1904. All you have to do is request it in the application manifest and the A functions will accept and return UTF-8.
- 5y ago
- kaba0 5y agoIf you have a username with your full name (plus point if you have special characters in your name), you will get the whole deal with shitty programs. I’m not sure if it’s me, but there were cases I simply could not use a program installed in such a location, to the point where at my previous (admittedly shitty) workplace, we often installed software in a root location…