-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong tabs are restored after a system restart #1294
Comments
The only explanation for this I can think of is that, for some reason the last in use tabs are not being saved to settings when Files closes (they are not updated on the fly). How do you close Files? I am not finding this problem using the latest version of Files. |
If you have turned off "Remember History" for the last 3 - 4 weeks and just turned it back on then on the first start up the tabs you were using 3 - 4 weeks ago will be restored. However Files should subsequently restore the latest tabs, unless you have turned off the "restore-tabs" setting, in which case it will start at your home directory. |
It seems that if you log out without closing Files then the current tabs are not saved either. Looks like the system force closes the apps without allowing them to clean up :-( |
Looks like Code get around this by inserting a handler for the Unix SIGTERM and SIGINT signals that calls the "quit" action of the app. I guess this should be replicated in Files. |
Correction: Code saves open tabs on the fly. Handling SIGTERM/SIGINT does not work for logging out - uses SIGKILL (which cannot be caught)? |
Looks like all apps failed to save their state if closed (killed) by logging out - so the only solution is saving state on the fly. Files is different from Code in that it is possible to navigate to different locations in the same tab but there is a 1:1 relation between documents and tabs in Code so there is less change. Seeking design input on whether we want Files to save tab/location state on the fly. |
I believe Terminal also saves states on the fly. Even if I restart abruptly i.e by not closing the apps first, it always restores my tabs correctly. Files, however, doesn't seem to do that. |
Even if all elementary apps save state on the fly, it is probable that many (most?) 3rd party apps won't so its always going to be safer to close all windows before logging out. Unless the logout code can be changed to close the windows properly? |
Just noticed that there is already an (elderly) issue about this at elementary/quick-settings#42 |
Also related: Also, if I recall correctly, another variant of this issue is that tabs in multiple Files windows are not handled correctly--which ever window is closed last overwrites the state. time passes Actually, from looking at the code it seems the only saving tabs for one window behaviour is...intentional? Lines 906 to 910 in 1e6842f
(Although I am curious if how "first window" is determined has changed over time...) Maybe saving tabs for all open windows on quit (+restore) needs a separate issue? To me, not saving tabs in all windows on application exit is both non-obvious and non-useful behaviour. Related commits:
Also: Lines 976 to 980 in 1e6842f
|
Prerequisites
Describe the bug
After I restart my computer, the wrong tabs are restored. It seems to restore tabs that I was using about 3 or 4 weeks ago and this occurs after every restart (i.e. after very restart, the exact same set of tabs are restored)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The correct tabs i.e tabs that were being used right before the restart must be restored.
Platform Information
The text was updated successfully, but these errors were encountered: