Score:3

Set default visible columns for Files

in flag

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?

Score:2
cn flag

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 using dconf.

• The names of the available colums are listed in 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 order with a command, for example

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.

k314159 avatar
in flag
Sorry, it still doesn't seem to remember it as _default_ - it only remembers it for the current folder, at least on my machine. Try this: (1) start nautilus (Files) straight after logging in. (2) Set up your favourite columns. (3) Exit nautilus. (4) Restart nautilus. (5) Click on a folder icon to go to another folder. Now, after step 5, I see that the columns are no longer what I chose at step 2.
vanadium avatar
cn flag
OK, I see. I had to overhaul my answer. It becomes technical, but it should work and you need to do it only once.
secretAgent avatar
dk flag
doesn't seem to work for v42.2 in Ubuntu 22.04.1 LTS. the selection of columns is set and loads, but the order of them is mixed. btw those 3 lines about gvfs-metadata service are not necessary - just close& re-open Nautilus/Files. and: gsettings set org.gnome.nautilus.list-view default-column-order "[ <your columns> ]" did set the order.
Score:1
ua flag

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']
$ 
Salim B avatar
tr flag
Thanks, I can confirm this. I've updated the original answer accordingly (must be approved first to be visible).
Score:0
ls flag

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]
secretAgent avatar
dk flag
works for me on v42.2 in Ubuntu 22.04.1 LTS. thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.