Summary: | Allow saving session output to file automatically without user interference | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Liang Guo <bluestonechina> |
Component: | history | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | 4wy78uwh, adaptee, nate, venkat.boddu |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/utilities/konsole/-/commit/ae222d8eb5826169dbe0626461156fb4f7f5fb70 | Version Fixed In: | 24.12.0 |
Sentry Crash Report: |
Description
Liang Guo
2009-09-26 18:10:08 UTC
Please note that the terminal area in Yakuake, along with its context menu, is provided by Konsole as a KPart component which Yakuake merely embeds. Reassigning to Konsole. Have you checked the ability to save the scrollback to a file? (In reply to comment #2) > Have you checked the ability to save the scrollback to a file? I can save the scrollback to a file in konsole, It works fine. but each time I want log my session, I need explicitly use "scrollback -> save scrollback" to save my session, if I exit session without saving scrollback, all my session log dissappear. I hope Konsole /Yakuake can add a new feature, when Konsole/Yakuake is started, all my input and session output are saved to a logfile automatically, without my interference. Thanks (In reply to comment #1) > Please note that the terminal area in Yakuake, along with its context menu, is > provided by Konsole as a KPart component which Yakuake merely embeds. > > Reassigning to Konsole. Hi, Eike Hein In Konsole I can use "scrollback -> save output" to save all output to a file, but I cannot find a corresponding menu or methord to save all scrollback. Thanks. This request sounds similar to #111691, although not the same. This might be a valid request although no one has worked on in 13 years. A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/1007 Git commit ae222d8eb5826169dbe0626461156fb4f7f5fb70 by Kurt Hindenburg, on behalf of Theodore Wang. Committed on 21/07/2024 at 18:26. Pushed by hindenburg into branch 'master'. Added autosave functionality The autosave functionality is contained in a SaveHistoryAutoTask class, which inherits from SessionTask. The autosave mechanism hinges on two pieces of information regarding the autosave file: the number of bytes used to store the contents of dropped lines (represented by SaveHistoryAutoTask::_droppedBytes) and a list of byte offsets corresponding to the start of the contents of lines on the screen (represented by SaveHistoryAutoTask::_bytesLines). Everytime a line is dropped, SaveHistoryAutoTask::_droppedBytes is updated using _bytesLines. Everytime the output is read and saved to file, the autosave file is resized to _droppedBytes and the current screen output is appended. Everytime the output is read or the screen is resized, _bytesLines is updated. The autosave can be started using an "Auto Save Ouput As" button in the "File" tab of the toolbar. Once the autosave is started, said button is replaced by a "Stop Auto Save" button which allows the user to stop the autosave. Internally, any errors encountered by the program would result in an KMessageBox reporting the details of the error and stopping the autosave as well. Clicking on the stop button reveals the start button again. Similar to SaveHistoryTask, there is a file dialog which allows the user to choose which file they would like the autosave contents to be stored in. Apart from errors involving reading session output and writing to file, modifying the file externally, renaming the file and deleting the file will also result in an error. Emulation::_currentScreen being changed will also result in an error. The autosave is conducted at a fixed time interval, apart from an edge case where an autosave is required immediately due to internal constraints. Said fixed time interval can be set by the user in the settings of their current profile, specifically the "Advanced" tab. Details on the internals of the autosave functionality is documented in the source files. GUI M +2 -0 desktop/sessionui.rc M +1 -0 src/CMakeLists.txt M +10 -0 src/Emulation.cpp M +9 -0 src/Emulation.h A +259 -0 src/SaveHistoryAutoTask.cpp [License: GPL(v2.0+)] A +119 -0 src/SaveHistoryAutoTask.h [License: GPL(v2.0+)] M +84 -2 src/Screen.cpp M +5 -0 src/Screen.h M +2 -0 src/Vt102Emulation.cpp M +1 -0 src/profile/Profile.cpp M +3 -0 src/profile/Profile.h M +36 -0 src/session/SessionController.cpp M +7 -0 src/session/SessionController.h M +20 -0 src/widgets/EditProfileAdvancedPage.ui M +8 -0 src/widgets/EditProfileDialog.cpp M +1 -0 src/widgets/EditProfileDialog.h https://invent.kde.org/utilities/konsole/-/commit/ae222d8eb5826169dbe0626461156fb4f7f5fb70 |