The site uses cookies that you may not want. Continued use means acceptance. For more information see our privacy policy.

Nautilus and Hidden Files

Why an application might toggle showing hidden files in nautilus (Gnome Files) when you don’t want it to.

Awhile back I updated Gnome and wasn’t seeing hidden files in nautilus (“Gnome Files”) anymore. I went into dconf-editor and looked around and found the old preference for it set correctly, so I dug around online and found they now use org.gtk.settings.file-chooser.show-hidden instead of the old preference. So I set that and went on, only to find sometime later it wasn’t working again.

Something was changing that setting, but in the meantime I discovered the “Ctrl + h” keyboard shortcut to toggle it, and would just use that. Still, who wants to toggle something like that frequently?

Eventually, I looked at some code of a non-packaged GTK+ application I use. Lo and behold, its file open dialog included a call to gtk_file_chooser_set_show_hidden, which apparently doesn’t just set it for the current file chooser, but sets the preference, too.

I’m not sure if that’s a bug or a feature (in GTK+), but Gnome Bugs: 610925: “GtkFileChooserDialog won’t pick show-hidden setting from a GtkBuilder File”: Comment 4 suggests it’s semi-expected behavior (the idle bug Gnome Bugs: 710258: “File chooser dialog saves show-hidden on closure” suggests others found it as a bug, though). Weird. I even tried replacing the above with something that used g_object_set_property to directly change the ‘show-hidden’ property. No dice, it still persists to the setting (when the dialog is closed, as the second bug suggests).

Anyway, I just commented it out in the end since I don’t care if the application file chooser shows hidden files, but do care if nautilus does. The moral of the story is that sometimes the bug is in some other piece of software for no particular reason.

If you find your file browser sometimes showing and sometimes hiding, it’s likely some application you use is toggling it back on you.

Add a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post navigation