Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Can I completely disable "Recently Used" feature in GTK's file / directory selector?

Recently Used

Sometimes programs default to this but since it's not useful in my work-flow and with the way I organize my files, it only adds confusion:

  • I usually just expect to start from my $HOME, so I get surprised by the list of folders

  • Also in case of file saving, I'm annoyed by the fact that you can't just type in the name and hit Enter--you have to type a path or select one

I'm using Xfce 4.8 on Debian Wheezy and this feature was not available in older Xfce (in Squeeze). I found a post on Xfce-users' mailing list regarding this feature, but without any useful output.

Is it possible to simply turn this off and default to $HOME?

share|improve this question
    
AFAIK this is a gtk+ 3 feature and it's hard-coded in gtkfilechooserdefault.c. As a result, patching the source code seems the only way to completely get rid of recently used and default to something like $HOME or $CWD. –  don_crissti Apr 29 '13 at 16:22
2  
Sadly it seems you're right. Although this is really a nasty thing to hard-code since it obviously breaks workflows like "Hit Ctrl+S, type filename, hit Enter". Hopefully one day it will change and we'll have answer... –  Alois Mahdal Apr 30 '13 at 14:56
3  
I wouldn't hold my breath... GTK/Gnome devs are known to be really stubborn (a classic example being the CTRL+DEL stupidity implemented in Nautilus). FWIW, wrt file chooser, I usually hit Ctrl+S, type filename then Ctrl+Tab then arrows (as many times as needed) then Enter. –  don_crissti Apr 30 '13 at 16:50

2 Answers 2

up vote 1 down vote accepted

@MartinVegter

There is a file ~/.config/gtk-2.0/gtkfilechooser.ini. It should look like Stefano wrote:

[Filechooser settings]
LocationMode=path-bar
ShowHidden=false
ShowSizeColumn=true
GeometryX=377
GeometryY=132
GeometryWidth=612
GeometryHeight=528
SortColumn=name
SortOrder=ascending
StartupMode=recent

There was no DefaultFolder variable in this file, but I found the StartupMode=recent var which I changed to StartupMode=cwd. This only works on GTK 2 applications like mousepad.

I don't know there is settings file for GTK 3 apps like gedit, but it seems that GTK 3 filechooser already sets the location to the current folder by default.

share|improve this answer

Actually you can disable it: open or create ~/.config/gtk-2.0/gtkfilechooser.ini and add these lines to it:

[Filechooser Settings]
DefaultFolder=cwd

Replace cwd with last if you prefer to start with last selected folder instead.

I think this hidden option should also work for gtk3, but I did not test it.

share|improve this answer
    
Sorry, but did not work for me--still Recently Used is offered and pre-selected. I tried even logging in/out and using mousepad, which depends on libgtk2.0-0. –  Alois Mahdal May 9 '13 at 9:46
    
It worked for me, but I had to change the variable StartupMode from recent to cwd in the same file. –  jeremija Oct 23 '13 at 17:00
    
@jeremija - could you please post the config that works? What exactly do I have to add? –  Martin Vegter Jun 1 at 21:54
    
@MartinVegter see the answer I just posted –  jeremija Jun 2 at 6:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.