Nautilus: Make "Show folders before files" option persist?

Running Nautilus 3.10.1 on a DE-less install of Ubuntu 14.04. Running Nautilus as my regular user account, I can't even set the "show folders before files" option in Preferences - as soon as I toggle the checkbox, the checkmark disappears again. Running Nautilus as root, I can toggle the checkbox just fine but it's toggled back off when I switch between list and grid view. What's the deal with that, and how do I make that option stay enabled?


Solution 1:

This worked for me on Ubuntu 16.04:

dconf write /org/gnome/nautilus/preferences/sort-directories-first true

Solution 2:

Looking at the terminal output for gedit (which also showed similar behavior), I noticed this error:

(gedit:12801): dconf-WARNING **: failed to commit changes to dconf: 
GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code2:
Failed to create file '/home/username/.config/dconf/user.FV01IX': Permission denied

Turns out ~/.config/dconf was owned by root. Chowned it back to username:username and everything's fixed now.