Default file sorting in nemo file manager is weird and confusing to new users
Describe your issue
The default file sorting in nemo file manager is weird and confusing to new users for a desktop system. It doesn't sort "rabbit01" and "Rabbit02" next to each other but into wildly different spots (with e.g. "Tesla01" appearing in between) because the sorting is based on the ASCII codes rather than something proper like lowered Unicode glyphs. The Nemo developers told me this is because they sort files based on the Unix libc locale-based sorting, which as a start doesn't seem the wrong way to do it. Rather, there seems to be an inherent problem with locale on postmarketOS that breaks this.
The way to solve this issue appears to be the following:
-
Set a proper default locale that produces an expected behavior for regular users (as in, those who don't happen to be programmers with ASCII knowledge), like
"en-US"
instead of"C"
. Make sure it's set in particular forLC_COLLATE
:$ cat /etc/profile.d/locale.sh export CHARSET=UTF-8 export LANG=en_US.UTF-8 export LC_COLLATE=en_US
-
Approach musl libc and point out that LC_COLLATE-based sorting is pretty important for a non-weird desktop experience. I already attempted to do so.
What's the expected behaviour?
In a folder listing in Nemo containing "rabbit01", "Rabbit02", and "Tesla01", with locale/LC_COLLATE set to "en-US", the two words starting with R are sorted next to each other. Like this:
(this is a mockup, this is not what it does)
What's the current behaviour?
The sorting is "Rabbit02", "Tesla01", "rabbit01" which is very disorienting and counter-intuitive to anyone but a programmer:
How to reproduce your issue?
Create a folder with empty subfolders "rabbit01", "Rabbit02", and "Tesla01", install file manager Nemo, then browse into that folder and look at the listing
What device are you using?
broken on all devices
On what postmarketOS version did you encounter the issue?
-
edge ( master
branch) -
v21.12
-
v22.06
On what environment did you encounter the issue?
Phone environments
-
Phosh -
Plasma Mobile -
Sxmo (Wayland/Sway)
Other
-
No environment -
GNOME -
KDE Plasma -
Kodi -
MATE -
Shelli -
Sway -
Weston -
Xfce4 -
fbkeyboard -
i3wm -
Sxmo (Xorg/Dwm)
How did you get postmarketOS image?
-
from https://images.postmarketos.org -
I built it using pmbootstrap -
It was preinstalled on my device
What's the build date of the image? (in yyyy-mm-dd format)
I don't know