After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673453 - epiphany restores session on every startup
epiphany restores session on every startup
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-03 18:30 UTC by Adam Dingle
Modified: 2012-04-12 15:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
session-restore.diff (6.88 KB, patch)
2012-04-12 11:37 UTC, Xan Lopez
none Details | Review

Description Adam Dingle 2012-04-03 18:30:58 UTC
Epiphany built from git master restores my session (all previously open windows) every time it starts up. This is a change from 3.4, and was presumably caused by

http://git.gnome.org/browse/epiphany/commit/?id=87131a9bef82b5ec84bcd4bd3bf9471d6325f7cd

I'm not sure whether this new behavior (restoring on every start) is a bug or was intentional.  The comment in the change above seems to imply that the intention was to autorestore the session only after a crash.  If that's so, this new behavior is a bug and should be fixed.

On the other hand, the comment at https://bugzilla.gnome.org/show_bug.cgi?id=666601#c1 seems to imply that the intention is to always restore the session on startup.  If so, I would strongly prefer that we not do this, because

- It makes Epiphany start more slowly.
- The site I was on the last time I ran Epiphany is usually not where I want to go now.
- It's potentially a privacy concern: if I run Epiphany when someone else is sitting beside me, I may not want them to see the last site I visited.
- The behavior is especially annoying when I open Epiphany by clicking a link in another program such as a mail client, since then a couple of windows open (the destination I clicked plus the old session window), which is distracting.

So if the goal here was to restore on every startup, please add a preference which the user can use to get the old behavior, i.e. a blank window on startup every time.
Comment 1 Xan Lopez 2012-04-03 22:42:08 UTC
This is indeed intentional, see http://git.gnome.org/browse/epiphany/commit/?id=f1c478dc347b8e59dab6e4d23095b44c33515be7 and http://git.gnome.org/browse/epiphany/commit/?id=381ce4af310607cc84ac1e84abbecda2d7d3e7d9

I think a preference here probably makes sense, at the very least I was planning to add a dconf key for this. Not sure whether it will show up in the UI, but I think we probably want to do that too.

> - The behavior is especially annoying when I open Epiphany by clicking a link
in another program such as a mail client, since then a couple of windows open
(the destination I clicked plus the old session window), which is distracting.

I'll have to think if this is a bug or not :D It is annoying, but otoh losing the session state would be bad. Perhaps we should recover the infobar asking whether we want the session restored in this case. Of course if we add a setting and the user chooses not to restore the session this would simply not happen at all.
Comment 2 Adam Dingle 2012-04-03 22:50:31 UTC
OK, thanks for letting me know.  Glad to hear there will be a dconf setting at least.  I think this should also be a setting in the preferences dialog.
Comment 3 Xan Lopez 2012-04-12 11:37:38 UTC
Created attachment 211920 [details] [review]
session-restore.diff
Comment 4 Claudio Saavedra 2012-04-12 12:04:09 UTC
> For 3), the process will die with the state saved up to that point,
> there's nothing we can do. For that reason, on startup also check the
> new setting; if it's set to 'never' ignore the session state, open a
> window in the homepage, and delete the old state file.

Shouldn't (3), when set to 'never', ask the user whether he wants to restore the session, considering that there was a crash and most likely the user would like to get back to what they were doing?
Comment 5 Xan Lopez 2012-04-12 13:10:01 UTC
(In reply to comment #4)
> Shouldn't (3), when set to 'never', ask the user whether he wants to restore
> the session, considering that there was a crash and most likely the user would
> like to get back to what they were doing?

Well, never is never ;)

My idea is to add a new option, 'crashed', that does what Epiphany used to do before.
Comment 6 Xan Lopez 2012-04-12 15:20:11 UTC
I've pushed this to master, plus another commit with the 'crashed' option. Closing.
Comment 7 Adam Dingle 2012-04-12 15:36:53 UTC
Great to have this setting.  Thanks!