Why...
In this answer I'm concentrating on evince since you mentioned this as your key application in the question.
Looking at the source-code, the Save-As dialog only sets the default filename. Since no folder is defined, the GTK3 libraries assume that the Recently Used folders is the first folder to be displayed in the dialog.
GTK3 applications have to explicitly set the folder to first search in.
Personally I think the default folder for evince should be defined - as such you should file this on bugzilla as a bug/wish-list request.
How...
The following is one way way to force evince to default to the Documents folder rather than the previous recently used.
In summary, the source is changed to obtain the default Document folder and set this as the default folder for the Save-As dialog.
install the basic development tools
sudo apt-get install devscripts build-essential fakeroot
get the source
cd ~/Downloads
mkdir build
cd build
apt-get source evince
cd evince*
make the change
Open ev-window.c
gedit shell/ev-window.c
Copy and paste the following into the file at the position shown in the image
const gchar *folder;
folder = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (fc),
folder ? folder : g_get_home_dir ());
Save and close gedit
give it a unique package name
OK, we need to give the package a unique name to prevent repository updates from overwriting your changed package
gedit debian/changelog
now append +yourname
to the top line version and save
i.e. evince (3.2.1-0ubuntu2+fossfreedom)
build the package
sudo apt-get build-dep evince
debuild -us -uc
N.B. this will download 161Mb of dependencies
Go for a coffee... and probably lunch!
cd ..
sudo dpkg -i evince_3.2*.deb
As an aside - to keep this new version of evince from being upgraded in the future, use synaptic to pin this version of evince.
In /etc/mozpluggerrc.d
edit the 40-global_defs.conf
and add
### Evince
define(EVINCE, [repeat swallow(evince) fill needs_xembed: evince "$file"])
Now in /etc/mozpluggerrc.d/62-documents.conf
, the GV() & ACROREAD() (not necessary though) needs to be replaced with EVINCE() as
application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file
EVINCE() << previously ACROREAD()
repeat noisy swallow(Xpdf) fill needs_xembed: xpdf -g +9000+9000 "$file"
repeat noisy swallow(okular) fill needs_xembed: okular "$file"
repeat noisy swallow(epdfview) fill needs_xembed: epdfview "$file"
EVINCE() << previously GV()
repeat noisy swallow(evince) fill needs_xembed: evince "$file"
Save and try opening PDF files in Chromium , it will open with evince.
Thanks to this Original Source
Best Answer
This is no longer a problem - I am now using the version from the 11.04 repositories (Chromium 11). I assume this was a bug that was fixed. A solution for people on Ubuntu 10.10 who are having this problem would be to use a PPA to upgrade to a later stable release.