6

I've seen this question:

How to set visible columns default for the 'Files' file manager?

and would like to ask how to do it now in Ubuntu 21.10 (Files 40.2) because the Preferences dialog no longer has the tabs that previous versions had; i.e. now that the set of columns to use as default is no longer shown as a tab in Preferences, how can we set the default?

k314159
  • 523

3 Answers3

11

The option to set the default view unfortunately is not anymore exposed in the user interface starting with Files 40. It can however be set directly in the dconf database via the GSettings configuration tool on a terminal.

  • To get the currently configured default list view columns, run

    gsettings get org.gnome.nautilus.list-view default-visible-columns
    
  • The set of all available column names can be retrieved from another setting:

    gsettings get org.gnome.nautilus.list-view default-column-order
    
  • Knowing available column names, you can then define your custom default list view columns. To set them to ['name', 'size', 'date_modified'] for example, run:

    gsettings set org.gnome.nautilus.list-view default-visible-columns "['name', 'size', 'date_modified']"
    

Custom settings are remembered per folder using the gvfs-metadata system. You therefore eventually need to manually adjust any folder that you have set differently from the defaults. However, there is a way to reset gvfs-metadata:

nautilus -q
systemctl --user stop gvfs-metadata.service
rm ~/.local/share/gvfs-metadata/home*

This stops nautilus, the gvfs-metadata service, and then selected metadata that gets updated when you change the column view is deleted.

When you restart nautilus, the service will also be restarted. Now, any of the folders on your file system should adopt the default settings you defined before.

Salim B
  • 135
vanadium
  • 97,564
2

You can set the defaults using the command line:

$ gsettings get org.gnome.nautilus.list-view default-visible-columns
$ gsettings get org.gnome.nautilus.list-view default-column-order

Check the current values, then change them using

$ gsettings set org.gnome.nautilus.list-view default-visible-columns [new values]
$ gsettings set org.gnome.nautilus.list-view default-column-order [new values]
2

The answers here didn't work for me on Ubuntu 20.10:

$ gsettings set org.gnome.nautilus.list-view default-visible-columns ['size', 'date_modified', 'name', 'type']
Usage:
  gsettings [--schemadir SCHEMADIR] set SCHEMA[:PATH] KEY VALUE

Set the value of KEY to VALUE

Arguments: SCHEMADIR A directory to search for additional schemas SCHEMA The name of the schema PATH The path, for relocatable schemas KEY The key within the schema VALUE The value to set

However, if I added quotation marks around the options, it works:

$ gsettings set org.gnome.nautilus.list-view default-visible-columns "['size', 'date_modified_with_time', 'name', 'type']"
$ gsettings get org.gnome.nautilus.list-view default-visible-columns
['size', 'date_modified_with_time', 'name', 'type']
$