Bug 442470 - konsole often doesn't restore fully recently opened tabs, especialy with mc
Summary: konsole often doesn't restore fully recently opened tabs, especialy with mc
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-15 09:43 UTC by Piotr Mierzwinski
Modified: 2021-09-15 23:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2021-09-15 09:43:38 UTC
SUMMARY
Since some time I had opened in konsole two tabs with bash. Recently I started also tabs defined to start mc (Midhight Commander). Unfortunately when session is restored after relogin / turning off/on of PC, these mc sessions disappear. Left only originally long time ago start bash (default) sessions.
I didn't observer this in last stable version of konsole running on Plasma 5.22, and (after last update) KF 5.86

STEPS TO REPRODUCE
1. in plasma set restore previous session
2. start konsole
3. open another shell session
4. log off and log in
5. in restored konsole define mc session where is running mc instead of shell (i.e. bash))
6. add button with list sessions opening new tab
7. using above button add mc session
8. using above button add shell (default) session
9. log off and log in or turn off and on your PC

OBSERVED RESULT
there is restored only original shell (default bash) sessions (tabs)

EXPECTED RESULT
should be restored all tabs, including mc one

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: YES
(available in About System)
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
konsole 21.11.70
Comment 1 tcanabrava 2021-09-15 09:58:10 UTC
being frank, I have *no* idea how to do that.
I could potentially ask konsole to restore tabs with opened programs (such as midnight commander), but then - you would lose all the history of the apps.

I can't ask konsole to save the mc session and reopen just like it was, I doubt that most terminal applications have this feature.

If you show me a way to implement this in a safe way that will work trough all applications (so I don't need to special-case the code for a single app), I'm all ears.
Comment 2 Piotr Mierzwinski 2021-09-15 23:05:33 UTC
(In reply to tcanabrava from comment #1)
> being frank, I have *no* idea how to do that.
> I could potentially ask konsole to restore tabs with opened programs (such
> as midnight commander), but then - you would lose all the history of the
> apps.

Sorry.  I don't know if we understood each other.
Using Neon Unstable with running konsole and turned on restore session I observed some strange behaviour or new konsole afer it was restored by Plasma.
And reported  that thing what works well in stable version (21.08.1), stopped to work in unstable (21.11.70). I don't know if the issue is placed in konsole or in restoration of session in new Plasma.
As I said it works well in last stable konsole. I don't know if in that version you ask konsole to restore tabs or not, but in Neon Unstable it doesn't work.

> I can't ask konsole to save the mc session and reopen just like it was, I
> doubt that most terminal applications have this feature.
I don't report that konsole dosn't restore mc session, otherwise I would complain that I don't have opened recent directories in both panels of mc. In recent stable version mc is just started (about opened directories takes care mc), if only it is configured as konsole session. And this I expect from new konsole.

Yesterday I turned off konsole and started again and opened couple tabs, including those with mc. Today I started my PC and found that all was correctly restored.
Logged off, and restarted PC. Logged in. All tabs were restored correctly. 
Maybe manual closing of konsole and start it again helped or maybe some recent update. Anyway seems konsole now work as I expected, so I close this ticket.