I'm not being able to sort files the way I want with my file manager on Linux Mint and I would like to know if there's any hidden config to change that.

For example, I'm sorting: "a.txt", "(b).txt", "c.txt" >> It shows a symbol in the middle of the list.

For some reason the sorting done is like that instead of the desired: "(b).txt, "a.txt", "c.txt" >> I want the symbols at the beginning.

How do I tweak my file manager or my Linux to sort files the way I like/want/need? Could it be done through dconf-editor?

  • 1
    It's a (mis)feature of locale settings. The "fix" would be to use POSIX locale, but at the cost of losing Unicode... Jan 1 '19 at 12:13
  • Dolphin file manager sorts the three files like this: (b).txt first, a.txt second, and c.txt third. I didn't mess with locale settings.
    – DK Bose
    Jan 1 '19 at 13:29
  • What file manager are you using?
    – terdon
    Jan 1 '19 at 19:11
  • It's true, Dolphin works that way, but I don't know how to make it use a dark theme. I think I'm going to give it a try to create a new locale.
    – user329296
    Jan 8 '19 at 14:17

It can be done by creating your own locale and tweaking it until it becomes exactly like you want it to be, but it's going to be a lot of work! Possible: yes, practical: no.
Having said that, it involves the following steps and as you're using Linux Mint, you should follow the Ubuntu rules:

  1. Choose the name of the locale in the format of LL_RR@MM, where LL is the language, RR is the region and MM is a modifier that you probably won't need (unless you want it to include non-western characters like Cyrillic or Greek or worse ;-).)
  2. Create a file with that name. (or copy an existing one, depending on your needs)
  3. Define the locale.
    This is where the lots of work comes in. You should pay special attention to the collating sequence.
  4. Deploy the locale: Once your locale file or files are ready, you should test them locally to ensure they are correct. The basic steps are:

    • copying the file to /usr/share/i18n/locales/
    • Generating a binary file to be used by applications

      localedef -i inputfile -c -f <charset> <locale>

For more information, see the official Ubuntu documentation except the bit where it tells you to 6. Submit the locale to glibc. Thats not necessary in your case as you're not creating a new country / language. 0:-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy