<div dir="ltr">Hello,<br><br>As a continuation of this bug.<br><a href="https://bugzilla.xfce.org/show_bug.cgi?id=12958">https://bugzilla.xfce.org/show_bug.cgi?id=12958</a><br><br>I've always wanted xfce4-terminals to preserve scrollback history across reboots/logouts.<br>Sometimes I omit powering off my machine only due to the fact that I will lose history across terminals as I have many of them. Unfortunately this is not green at all. Moreover if I do shutdown my machine the next day it's pretty hard to restart my work the way it was prior to shutdown. Yes, there are instruments like tmux/screen (and yes I use them myself) but they may be a burden for ordinary users.<br><br>Please consider the following patch. It basically does:<br>1) Scrollback history is saved across logouts/reboots if enabled via xfce4-terminal's preferences and if 'Save session for future logins' is checked.<br>2) Environment variable TAB_ID is exported in every terminal screen. It's a 16 character version of a SHA256 checksum. A seed identical to role-id is used for the generation of the checksum.<br>3) Scrollbacks are private to the user itself. They're stored in ~/.cache/xfce4/terminal/. They're GZIP compressed as well. Saving is done immediately on logging out which is tied to the 'save-session' event.<br>4) On logging in and after restoration scrollback files are deleted.<br>5) Since such histories may expose sensitive data everything is configurable and can be disabled thus no scrollback files will be saved at all.<br>6) It's up to the user to decide what fits him/her best and if this violates security or other implications user can omit using it.<br><br>As a future work, I think shell history may be tied per terminal. When time permits I can go and investigate this idea further. I think this will be a nice add-on to this feature.<br><br>Please share your opinions and provide some code review if you're positively inclined to incorporating this feature.<br><br>Regards,<br>Boris</div>