Description: When I start LibreOffice, restore the last session: reopen all documents that were open when I quit. Once the documents reopen on start, go on to restore the geometry of each window (size and position) as well as the position within the document. Steps to Reproduce: 1.Quit LibreOffice 2.Open LibreOffice 3. Actual Results: The previous session is not restored Expected Results: Desired results: when starting LibreOffice, all documents from the last session are restored. They are reopened with the same geometry (screen position, window size) in the same virtual workspace with the document scrolled to the same position, on the same tab, etc Reproducible: Always User Profile Reset: No Additional Info: cf Firefox, Chrome
Sounds like a recipe for ODF file corruption. Clean close when the last document has been closed, before that prompt to save or close w/o save any open documents. Reopening previous document(s) from previous launch is of questionable utility. -1
Recent documents are listed in the start center and in File > Recent documents. I'm against automatically open them. The document starts already in the previous size and at the previous position. The only precondition is, that you have set user name.
Also -1 in the context given here.. --- The desire sounds more like some kind of session restore system. Restoring a session after shutdown did/does happen on macOS. I assume something similar being possible under Linux. No clue if there is some 'restore desktop' app for Windows.
Vis-a-vis comments about limited utility: between systems updates and such, my machine reboots has to reboot, generally, weekly. Re-opening what I was working on automatically is of immense value based on time-saved alone. The process to manually restore things --120-150 browser tabs, 6+ libreoffice docs, another 6-10 text documents, etc., etc-- takes an hour. Firefox and Chrome adding the option to restore last session saves an immense amount of time. Vis-a-vis those questioning doing it automatically, I can certain understand that concern. It would certainly be worth offering it as a configuration option. The "Also -1 in the context given here..." is a bit bizarre. I'm not sure if that's the request as a feature enhancement (as opposed to a bug request?) or the idea that restoring the prior session at start up is the wrong time.
No bug involved, it is clearly an enhancement, and the -1 is for a use case that can not be justified (from development or maintenance or UX perspective). Having that count of application frames enabled on launch is abusive of system resources. Web browsers get away with-it bcz most sessions are static with minimal impact as system fires up. Trying to force other applications to do the same with documents and data connections is a recipe for instability and corruption. Otherwise as noted, the MRU list is available from main menu or the StartCenter thumbnail views. Out of scope for project, and IMHO a clear won't fix => WF.
Yes, Stuart, please stop describing my report as something it is not. It is NOT A BUG REPORT. I marked it "ENHANCEMENT" (under importance). It is still clearly marked "ENHANCEMENT". Telesto: it sounds like a system restore because that's what it is on an application basis. Linux (at least the flavor of Ubuntu I run) does not currently offer such a feature. Individual apps have certainly rolled in some version of a restore. Browsers, Text Editors, Development environments all offer it. You point actually addresses Foote's obsession with abusing system resources and corruption. Mac's have offered system restore for years without problems with either.
I think, that you can get such behavior using a macro. You can bind a macro to the event "Start application". A possible place for such macro could be the library 'Gimmicks' which if delivered with every installation. Or something for an extension?
Regina, thanks for the suggestion. My programming background doesn't include LibreOffice macros. From the online material, it doesn't look too complicated grammatically and I figured out where the events and such were. But, the API that's documented in help doesn't seem to have a mechanism for checking to see what docs are open. I didn't see an obvious reference to extensions or gimmicks. For someone who's already experienced in these thing it sounds like a workable solution. Without that background, it would be far easier to craft a bash script that took ps waux | grep libreoffice and piped it through gawk/awk to update a file. Run that script with crond every five minutes-ish. Then add a startup script that would open those files in libre. But... I think all that's besides the point. The reason for a feature enhancement request is that this is a feature offered by a large number of applications (as well as OS X). Such feature consistancy across user applications is one of the basic application design principles that was introduced by the modern GUI.
Basically I agree with the request. It's annoying to always restore a session. How about a function / button on the start center as a compromise that restores on click, alternatively to the extensions idea? The restore function would run on exit / ctrl+Q before the close / ctrl+W or alt+F4 event is fired. What do you think, Samuel?
I think we definitely can improve in this area. When the OS shuts down, we need to make sure all opened files are auto-saved (probably to the LO user profile) and then reopen all those files when LO is opened again. This somehow already works. When LO exits abnormally, it tries to restore the last auto-saved version of each document and suggests to restore the unsaved documents on the next start. This could be improved to integrate with the OS session management to do the auto-save before shutting down the OS (even before exiting LO), and just restoring all saved documents when opening LO again. Of course this should be made configurable (as it is in Firefox e.g.). Users who always want to start with a clean session, should be able to do so. Manually restoring the last session (via menu or start center) should also be an option.
So we have different ideas for solution. To consider the hesitation in c1..3 I'd prefer a manual execution but developers may cover for eventualities.
*** Bug 56132 has been marked as a duplicate of this bug. ***
Duplicate of bug 141400 with the aspect of multiple documents.
*** Bug 150898 has been marked as a duplicate of this bug. ***
*** Bug 154962 has been marked as a duplicate of this bug. ***
From a code read, it sounds like OP's request happens if you do an OS shutdown WITHOUT first shutting down LibreOffice. (So save all your work first, but just leave the documents open.) From what I have read, this at least works with KDE. Of course this doesn't handle everyone's wishes, so someone could build a command that somehow calls a VCLSession save manually. vcl/source/app/session.cxx framework/source/services/autorecovery.cxx implts_doSessionSave
A patch that re-purposes SID_LOGOUT to "Exit with session save" is at https://gerrit.libreoffice.org/c/core/+/155460. I'm not yet ready to propose it for submission though, since I took a lot of liberties.
*** Bug 157058 has been marked as a duplicate of this bug. ***
*** Bug 157899 has been marked as a duplicate of this bug. ***
(In reply to Justin L from comment #17) > A patch that re-purposes SID_LOGOUT to "Exit with session save" is at > https://gerrit.libreoffice.org/c/core/+/155460. Abandoned, as well as abandoning https://gerrit.libreoffice.org/c/core/+/155720
*** Bug 158665 has been marked as a duplicate of this bug. ***
I personally tend to agree with all of Stuart's points. Obviously many people disagree with us, so I have worked on a solution for this even though I never intend to use it myself. https://gerrit.libreoffice.org/c/core/+/155460 Comment 10's discussion about what happens when the OS shuts down or logs out is dealt with in separate bugs. While related, that is an entirely different topic. I see two possible levels of implementation from the user-action point of view. One is brand new development of an entire session management system - where multiple, named groupings of files can be opened together - which is bug 117237. (Comment 11's manual solution) [I have no intention of working on this.] The second implementation level is to always keep track of the "currently open files" and automatically reload them. This is _complementary_ to the first level. It simply ties in with existing AutoRecovery code, and always maintains a RecoveryList of open documents. (duplicate bug 56132, bug 150898, bug 157899, bug 158665) Level #2 should be easy to implement (see proposed code). Timed backup already creates this RecoveryList, so we already have SessionSave in the case of a crash (both a hard crash, and a soft EmergencySave). Thus we only need to add a config option to tell "Quit" that it should trigger a SessionSave. I guess the biggest question is whether the existing code is robust enough to handle being more intentionally used. Plus not EVERY path that allows LO to restart or quit is guaranteed to be covered.
(In reply to Justin L from comment #22) > I see two possible levels of implementation from the user-action point of > view. One is brand new development of an entire session management system - > where multiple, named groupings of files can be opened together - which is > bug 117237. (Comment 11's manual solution) [I have no intention of working > on this.] Your patch seems to get close to what is expected for sessions. Wouldn't it be easier to not track what files are open on close but allow users to add documents to a session, as known from IDEs for example. It means to have a manage session dialog (create new, add/delete current document) and to have a dedicated section in the start center and the file menu that lists those sessions. Almost easyhackable :-)
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/893f055c75393e9f0a08823e25ca7ee6703e7ffa tdf#146769 menuBarManager: dispatch with KeyModifier Shift/Ctrl/Alt It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.