You are not logged in.
Sorting files by name results in a strange order, when numbers or [._- ] are involved.
An example is shown in the 1st column in the code block below.
Is it possible to change sorting to ls alike?
I use a start script for pcmanfm anyway and messed around with different values for "LC_COLLATE" and "LC_NUMERIC", but no success.
Are there other "LC_?=?" variables?
Or is it a setting for gtk-2 / gtk-3?
Example:
Listing of "Downlaods" as a collection of various file names without convention.
There are 3 columns, each sorted by name and cutted at the 10th characters.
Sorting was done by PCmanFM (c1), Double Commander (c2) and ls (c3).
The list is not complete, just the first 35 entries are shown.
$ cat _sort_PCmanFM.txt | cut -c -10 | paste -d ' ' - _sort_dc.txt | cut -c -21 | paste -d ' ' - _sort_ls.txt | cut -c -32
## pcmanfm doublecmd ls
0.1.0-welc 0001-Speci 0.1.0-welc
1.0.1-scan 0.1.0-welc 0001-Speci
0001-Speci 01_GI-Pers 01_GI-Pers
1_Aphex_32 0207Kopatz 0207Kopatz
01_GI-Pers 02_Physali 02_Physali
1_So-nah-d 0399fdd160 0399fdd160
1J24B_DB-E 03_Regulae 03_Regulae
1J24B_DB-R 04_Tiger-a 04_Tiger-a
1zh37b_1zh 0507Lesch_ 0507Lesch_
2_Abendrot 05_Die-Qua 05_Die-Qua
02_Physali 06_gruenze 06_gruenze
2N3819 N-C 07_Labkrau 07 Section
2n4416 tra 07 Section 07_Labkrau
2sk170.pdf 08_im-Herb 08S5.0.jpg
03_Regulae 08S5.0.jpg 08S5.1.jpg
3b508455d8 08S5.1.jpg 08S5.2.jpg
3D-Effekt_ 08S5.2.jpg 08S5.3.jpg
04_Tiger-a 08S5.3.jpg 08S5.4.jpg
5_creditAn 08S5.4.jpg 08S5.5.jpg
05_Die-Qua 08S5.5.jpg 08_im-Herb
5_laverne_ 0900766b80 0900766b80
5_Morgendl 09_Augenma 09_Augenma
06_gruenze 1000px-Fac 1.0.1-scan
6_Physalis 10.1.1.118 10.1.1.118
6ae2d0a63d 10.1515_cd 10.1515_cd
6AU6.pdf 1.0.1-scan 1000px-Fac
6cd060c1d6 1024px-E__ 1024px-E__
6R7.pdf 1024px-Las 1024px-Las
6sk7compch 1070px-Sta 1070px-Sta
07 Section 10d580ea04 10_Frostig
07_Labkrau 10_Frostig 10_Frostig
8_dott_war 10_Frostig 10d580ea04
08_im-Herb 1176sch.gi 1176_VCA.G
8df7ef4295 1176_VCA.G 1176sch.gi
$ cat .bashrc | grep -e LANG -e LC
alias ls='LC_ALL=C.UTF8 /bin/ls --color=auto --group-directories-first --time-style=+" %a %Y-%m-%d %H:%M "'
export LC_COLLATE=C.UTF-8
export LC_NUMERIC=C.UTF-8
export LC_TIME=en_DK.UTF-8
export LANG=en_GB.UTF-8
$ cat /usr/local/bin/pcmanfm
#!/bin/bash
export LC_COLLATE=C.UTF-8
export LC_NUMERIC=C.UTF-8
export LC_TIME=en_DK.UTF-8
exec /usr/bin/pcmanfm "$@"Offline
It seems to be affected by LC_ALL (like the sort command).
LC_ALL= /usr/bin/pcmanfmis slightly different than
LC_ALL=C /usr/bin/pcmanfmLC_COLLATE (which you set) also affects it.
These two locale settings (LC_ALL, LC_COLLATE) also affect the output of ls
I'm not sure what all locales you have generated on your system. You could try something like:
LC_ALL=en_GB.UTF-8 /usr/bin/pcmanfmLast edited by rbit (2026-04-25 22:47:47)
Offline
Thanks for the reply!
I did that to some extend, but didn't help - (EDIT) even if it should have.
After sacrificing more hours of lifetime to pointless ... . The "FM_SORT_CASE_SENSITIVE" declaration in the sources caught my attention.
There is an option, not in "Preferences", but in the main menu:
"View" ==> "Sort Files" ==> "Ignore Name Case".
Deselecting it results in a common sort order.
Now I feel stupid and hate GUI's even more!
Last edited by delgado (2026-04-26 14:19:41)
Offline