Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I describe here is not about a problem with my Nautilus. (it is the default behavour)

I understand why Nautilus sorts the Name-column (ascending) so that "6 cats" occuring before "10 dogs"... Its collation sequence is treating a group of numeric-digits as a single number-value and not as individual characters.

That's fine... I can see some value in it, but personally I find it to be confusing,

And I have no idea why Nautilus completely ignores many leading non-alpha-numeric characters.. ie.!@$%^_:"- etc. as typed via as standard US keyboard..
By "ignore", I mean "---two camels" sorts to be immediately above "two camels", as if the "---" didn't exist... (strange !?).

How can I change the default collating sequence?...

gconf-editor /apps/nautilus/list_view shows some sort options, but does not offer a choice of collation option....
I hope there is an way to do this (otherwise Windows Explorer is one-up on this issue :( Windows allows you to choose the conventional collation sequence (via the registry)

share|improve this question
I agree that ignoring the non-alphanumeric characters is annoying; e.g. I used to abuse them so that my temporary folders were always at the top... ;-) – JanC Nov 2 '10 at 21:41

The sorting of Nautilus follows the default collating of the locale. This means you have to override the collating of your locale.

To get the sorting like you described, add the following line to ~/.gnomerc (create if it doesn't exist and mark it executable): export LC_COLLATE=POSIX. One downside is that capital letters will sort ahead of lower case letters.

share|improve this answer
Joris, I want to first mention a mistake on my part. The ALPHA chars were sorting case-insensitive all along (I've ammended the question)... I applied POSIX as you suggested, but numbers and symbols are still sorting according to the "mysterious" heuristics I mentioned... I've rebooted, and even tried ="C" (didn't work)... I found an Arch-Linux forum page on this issue; lots of too-ing and fro-ing, but they couldn't resolve it... Maybe this behaviour is just hard-coded into the source. – Peter.O Nov 3 '10 at 17:40
up vote 1 down vote accepted

This answer is a workaround.
I've put this information forward because it seems that Nautilus just can't sort in the manner I prefer / want / need.

PCMan File Manager has a similar look and feel to Nautilus, yet it sorts the detaill view in a "by the column" fashion...

It sorts with most of the "special" characters to the top, and a few to the very bottom.. It is case insensitive, and is very close to what I was looking for (..."approximate ASCII"? followed by the remaining normally-sequenced Unicode Codpoint values/characters)..

It is available in Synaptic Package Manager under the name: pcmanfm

share|improve this answer

are your non-alpha-numeric chars unicode? I don't have any unicode chars to test nautilus with, but I could imagine such things causing problems...

share|improve this answer
By default everything in Ubuntu is set to use UTF-8... which is one of the ecnodings to represent Unicode Code-points.... So what is shown in Nautilus is "unicode" (encoded as UTF-8), However, a Unicode collating not used by Nautilus.. .and thats exactly what I want (a Uincode Code-point collating sequence). – Peter.O Nov 2 '10 at 3:45
I just now got the gist of your message... The non.. alpha-numeric characters I mentioned are standard ASCII values from the Latin script ..which I have typed in via a standard US keyboard with no custom input method... ie. !@#$%^&**()_ etc.. The only characters (of this lot) which sort to the bottom of the list, are "." and "#" eg "...fred", "###fred" .. (good point :) – Peter.O Nov 2 '10 at 3:58

Another workaround:

in Krusader (version 2.2.0-beta1),

  • go to Settings > Configure Krusader...
  • Panel > View
  • and choose Sort method: Character code.

Files with the same prefix are grouped.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.