Is there a way to completely remove "recently used" from open and save dialogs?
I never use Recently Used file lists; I have a filing system so I know where I want to open and save files.
I've read this question:
Can I stop apps from selecting "Recently Used" by default in file chooser dialogs?
However, I just want this option completely removed.
It's an annoyance to have to keep navigating away from the default.
Failing the above is there a way to make my home directory the default?
Thanks to saji89 for linking to the affected files. In case anyone still cares about this (and also for myself, because a recent upgrade allowed it to slip back in), I've created a patch (http://pastebin.com/VE4STB6M) to fix this annoying misfeature. The patched gtk will still show "Recently Used" in dialogs, but it will not be selected in the dialogs by default (it will default to the last directory used or to your home directory). For me, this fixes the problem, because my main gripe was having it pop up in my face, especially when trying to save something.
Step by step instructions:
1) Open a terminal window and enter the following commands:
mkdir recently_used_fix
cd recently_used_fix/
sudo apt-get build-dep gtk+2.0
apt-get source gtk+2.0
wget -O deselect_recently_used.patch http://pastebin.com/download.php?i=VE4STB6M
patch -p0 < deselect_recently_used.patch
cd gtk+2.0-2.24.10/
echo jlj | dpkg-source --commit
sudo dpkg-buildpackage
cd ..
2) Close any package managers (such as Synaptic) and enter the following command in the terminal window:
sudo dpkg -i *.deb
3) If the dpkg -i
command gives errors about overwriting a handful of existing files (changelogs and such), use sudo rm FILENAME
to delete each file it complained about, then repeat step 2. I noticed --force-overwrite
doesn't seem to work for that, for whatever reason.
4) Optional: Once the packages are successfully installed, use Synaptic to pin/hold (Package > Lock Version
) each installed package, to avoid having to go through all this again (of course you would also miss any security updates).
5) Close and re-open any affected apps (pluma, gedit, gimp, etc) and enjoy your annoyance-free open/save dialogs!
6) Optional: Enter the following commands in the terminal window to remove the files and directories we created (the fix will remain installed):
cd ..
sudo rm -rf recently_used_fix/
In case the patch cannot be downloaded, here is a backup copy:
--- gtk+2.0-2.24.10/gtk/gtkfilechooserdefault.c 2011-11-08 10:20:20.000000000 -0700 +++ Downloads/gtk/gtk+2.0-2.24.10/gtk/gtkfilechooserdefault.c 2012-07-10 17:20:38.000000000 -0700 @@ -5971,10 +5971,18 @@ gtk_file_chooser_default_map (GtkWidget if (impl->operation_mode == OPERATION_MODE_BROWSE) { + GFile *folder; + switch (impl->reload_state) { case RELOAD_EMPTY: - recent_shortcut_handler (impl); + /* The user didn't explicitly give us a folder to display, so we'll + * use the saved one from the last invocation of the file chooser + */ + folder = get_file_for_last_folder_opened (impl); + gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (impl), folder, NULL); + g_object_unref (folder); + /* recent_shortcut_handler (impl); */ break; case RELOAD_HAS_FOLDER: @@ -6005,8 +6013,8 @@ gtk_file_chooser_default_unmap (GtkWidge settings_save (impl); - cancel_all_operations (impl); - impl->reload_state = RELOAD_EMPTY; + /* cancel_all_operations (impl); + impl->reload_state = RELOAD_EMPTY; */ GTK_WIDGET_CLASS (_gtk_file_chooser_default_parent_class)->unmap (widget); }
It is literally impossible to do it, as the code related to that is hard-coded into the gedit codebase.
This is the relevant gedit commit message related to this change in the Gedit code- http://git.gnome.org/browse/gtk+/commit/?id=ca74dc6a873bb375bb2abc3ea7642ed41e9f6e79
Courtesy:http://tstarling.com/blog/2011/11/file_chooser_recent/
So, unless someone changes the code for this and alter it to a user settable setting, I'm sorry to say that there seems no direct way out.