Bug 365413

Summary: Session restore of Konsole does not work if a tab's shell was in a folder not yet re-mounted
Product: [Applications] konsole Reporter: John E <john.ettedgui>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: CLOSED FIXED    
Severity: minor CC: bjohnson655, martin.sandsmark, piotr.mierzwinski
Priority: NOR Keywords: investigated, triaged
Version: 16.04.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 18.08.2
Sentry Crash Report:

Description John E 2016-07-11 20:22:25 UTC
Hello,

For about a year konsole has not been restarting when restarting plasma and I didn't know why, till yesterday I saw post #67 in https://bugs.kde.org/show_bug.cgi?id=343518.

I have some local partitions that somehow take a long time to mount (btrfs...) and so I mount them outside of fstab. They are still mounting when Plasma starts.
If before restarting Plasma a konsole tab's shell is in a folder from one of these partitions, the konsole will not be restored on Plasma's session restart. konsole is not even started (well at least I don't see it..., I guess it started and fail somehow).

It would be nice to have a different behavior:
- If it has to fail, at least explain to the user what's happening.
- Failing only the problematic tabs and maybe defaulting them to ~ would be an option.
- Retrying till a certain configurable timeout.
- Allowing the session restore to depend on a systemd service.

An example of something that supports my scenario is KTorrent.
When it gets auto restarted by Plasma it may complain about certain torrents' files that are not available anymore (because of the facts that the partition are not mounted) and it allows me to retry by simply pressing a button. This is not transparent but it works well enough.


Please re-assign if I was wrong.

Thank you,
John

Reproducible: Always

Steps to Reproduce:
1. Have a shell in Konsole in a mounted folder
2. Make sure that folder is not mounted by the time Plasma's session starts


Actual Results:  
See no Konsole auto-reloaded.

Expected Results:  
See Konsole auto-reloaded (not sure about the problematic tabs).
Comment 1 Kurt Hindenburg 2016-07-17 18:09:03 UTC
Can you clarify what you have on the mounted folders?  It is your home folder, /usr, kde binaries, etc...
Comment 2 John E 2016-07-17 21:20:09 UTC
Hello,

None of these, just media files, so no script or executable that should run.
Comment 3 Piotr Mierzwinski 2016-07-18 20:14:46 UTC
From my end I can confirm this issue. 
I experienced randomly not restored session of konsole. I wondered what is wrong, but one day I discovered the issue.

Very often I run konsole with  pure bash shell and two mc sessions. Sometimes I mount (manually - using tool from taskbar) external hard disk and open in mc some directory from this disk. I shut down system not changing this directory. Next day I power on computer and login into Plasma. Konsole is not restored. To be sure I did some tests with automatically mounted my external hard disk. In this case konsole was restored. In this moment this is my work around for this issue.

I use Antergos, with: Plasma 5.7.1, KF 5.24, KApplications 16.04.3, Qt-5.7.0
Comment 4 Martin Sandsmark 2016-08-13 16:52:13 UTC
might be related to https://bugs.kde.org/show_bug.cgi?id=364779
Comment 5 John E 2016-08-13 17:10:44 UTC
It seems related yes.
Comment 6 Blase Johnson 2018-10-30 18:44:54 UTC
(Bugsquad test)

I tried to reproduced this bug by mounting an external USB drive, opening Konsole and changing to the drive directory, logging out, unmounting the drive, and logging back in. Konsole starts in the home directory without issues.

Application Version: 18.08.2
KDE Plasma Version: 5.14.2
KDE Frameworks Version: 5.51.0
Qt Version: 5.11.2