Bug 435537

Summary: Opening Konsole each time from Dolphin temporarily creates an unnamed profile
Product: [Applications] konsole Reporter: Om <ombrophile>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal CC: a.samirh78, bugseforuns, mcpain, nate
Priority: NOR    
Version: 21.04.1   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: (a) visible unnamed profile after konsole is opened from dolphin, (b) another unnamed profile upon opening a second terminal from dolphin, and (c) no unnamed profiles by default
screeen recording

Description Om 2021-04-09 08:43:50 UTC
Created attachment 137447 [details]
(a) visible unnamed profile after konsole is opened from dolphin, (b) another unnamed profile upon opening a second terminal from dolphin, and (c) no unnamed profiles by default

SUMMARY

Whenever a new terminal is opened through dolphin (by pressing the Shift+F4 key), an unnamed profile can be seen under the "switch profile" sub-menu [See: Screenshots.png;fig(a)]. The number of unnamed profiles keep on increasing as more and more terminals are opened through dolphin [See: Screenshots.png;fig(b)]. These temporary profiles are deleted only after all running konsole instances are closed [See: Screenshots.png;fig(c)].


STEPS TO REPRODUCE

1. Open dolphin
2. Open a terminal by pressing Shift+F4; unnamed profile visible under terminal profiles
3. Open a second terminal from dolphin by pressing Shift+F4 again; another unnamed profile visible in terminal profiles
4. Close all opened terminals and then open a new terminal window (by pressing Ctrl+Alt+T); no unnamed profiles should be visible

OBSERVED RESULT

Unnamed profiles being created in konsole profiles as more and more terminal windows are opened from dolphin


EXPECTED RESULT

No unnamed profile should appear upon opening konsole from dolphin. (And even if it does, its count should not keep on increasing as more and more terminals are opened from dolphin.)


SOFTWARE/OS VERSIONS

KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2


ADDITIONAL INFORMATION

Dolphin version: 20.12.3
Comment 1 Patrick Silva 2021-06-01 23:57:46 UTC
humm, on my neon unstable unnamed profile is only created when I open Dolphin
with shift+F4 by the first time.
Comment 2 Patrick Silva 2021-06-01 23:59:33 UTC
(In reply to Patrick Silva from comment #1)
> humm, on my neon unstable unnamed profile is only created when I open Dolphin
> with shift+F4 by the first time.

ops, I meant "...when I open Konsole", obviously.
Comment 3 Om 2021-06-08 08:27:36 UTC
(In reply to Patrick Silva from comment #2)
> (In reply to Patrick Silva from comment #1)
> > humm, on my neon unstable unnamed profile is only created when I open Dolphin
> > with shift+F4 by the first time.
> 
> ops, I meant "...when I open Konsole", obviously.

Right. But did you check whether the number of unnamed profiles keeps on increasing (as shown in Fig_b of the attachment) or does it remains constant when more and more Konsole instances are opened from Dolphin (by pressing Shift+F4) while at least one of the previous Konsole instances is still running?
Comment 4 Patrick Silva 2021-06-08 11:00:36 UTC
Created attachment 139102 [details]
screeen recording

On my system the number of unnamed profiles remains constant when more and more
Konsole instances are opened from Dolphin while at least one of the previous
Konsole instances is still running.
Konsole launched via apps menu does not have the unamed profile.
I have recorded a video.
Comment 6 Om 2021-06-08 20:26:22 UTC
(In reply to Om from comment #3)
> (In reply to Patrick Silva from comment #2)
> > (In reply to Patrick Silva from comment #1)
> > > humm, on my neon unstable unnamed profile is only created when I open Dolphin
> > > with shift+F4 by the first time.
> > 
> > ops, I meant "...when I open Konsole", obviously.
> 
> Right. But did you check whether the number of unnamed profiles keeps on
> increasing (as shown in Fig_b of the attachment) or does it remains constant
> when more and more Konsole instances are opened from Dolphin (by pressing
> Shift+F4) while at least one of the previous Konsole instances is still
> running?

Strange, given that just now I updated to KDE 5.22 with Konsole 21.04.1 and, in spite of that, I still see an increase in the number of unnamed profiles.

Anyway, let us hope that Ahmad's fixes work and, if so, are implemented in the next Konsole update.
Comment 7 Ahmad Samir 2021-06-08 20:32:12 UTC
My guess is that the difference in behaviour you're both seeing has to do with "run all konsole windows in the same process" (Settings -> Configure Konsole -> General).
Comment 8 Om 2021-06-09 05:33:49 UTC
(In reply to Ahmad Samir from comment #7)
> My guess is that the difference in behaviour you're both seeing has to do
> with "run all konsole windows in the same process" (Settings -> Configure
> Konsole -> General).

You are correct! I had that setting turned on. Repeating the steps with the setting turned off, I found that only one unnamed profile was being created (BTW this somehow feels counter-intuitive). So thank you for figuring that out.
Comment 9 Ahmad Samir 2021-07-21 11:47:48 UTC
*** Bug 440102 has been marked as a duplicate of this bug. ***
Comment 10 Kurt Hindenburg 2021-07-23 16:06:33 UTC
Git commit 512ce4403d0f7fa696cdfe41256afe35398c4f87 by Kurt Hindenburg, on behalf of Ahmad Samir.
Committed on 23/07/2021 at 16:06.
Pushed by hindenburg into branch 'master'.

Don't create a new temp profile when --workdir is used to launch Konsole

Instead set the Session initial working directory.
Related: bug 419859, bug 433160

M  +14   -18   src/Application.cpp

https://invent.kde.org/utilities/konsole/commit/512ce4403d0f7fa696cdfe41256afe35398c4f87