Applications can't set selections

I have a problem with applications not be able to “set” their last state. An example is the Arduino IDE which automatically loads the last sketch saved when the program is reloaded. This does not happen, it just loads the deafault sketch. Another is when I try to save a new homepage for Firefox, it keeps on falling back to the installation default.
There will be a file or a folder (or two?) that probably need permissions being reset, but I reluctant to start changing these (by guesswork?) in my home folder without some good advice to guide me? Help please?

Cheers Rob

This is a bug affecting 16.10 and later versions that's likely unrelated to the other issue you're experiencing: