Bug 440885 - Edit Current Profile opens the editing of a new profile when attempting to edit the Built-in (ex: fallback) profile
Summary: Edit Current Profile opens the editing of a new profile when attempting to ed...
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: kpart (show other bugs)
Version: master
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-12 04:03 UTC by Javier O. Cordero Pérez (Cuperino)
Modified: 2022-10-10 10:48 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.12


Attachments
multiple default profiles appear out of nowhere (198.54 KB, image/png)
2021-08-19 08:06 UTC, Stefan Champailler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Javier O. Cordero Pérez (Cuperino) 2021-08-12 04:03:37 UTC
SUMMARY
When "Default" profile is selected "Edit Current Profile..." opens the Edit Profile window set to create a new profile instead of allowing to edit "Default" profile.

STEPS TO REPRODUCE
1. Make sure "Default" is the currently active profile.
2. Right click on the terminal emulator and choose "Edit Current Profile...".

OBSERVED RESULT
Edit Profile window opens, but it is set to edit a new (non-existent) profile. Attempting to name this profile like any pre-existing profile, including "Default", results in the following error:
`A profile with the name "{{profile_name}}" already exists.`

EXPECTED RESULT
Edit Profile window opens set to edit "Default" profile.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon Testing Edition
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Similar to bug 396808 from 2018. This may be a regression.
Comment 1 Ahmad Samir 2021-08-12 09:35:27 UTC
That's working as intended. The "default"/built-in profile is special, it can't be edited (because it's created on demand from C++ code, i.e. it doesn't have a .profile file on disk). And the name "Default" is reserved.
Comment 2 Nate Graham 2021-08-13 14:38:41 UTC
Yeah. In this case we should probably disable the "Edit Current Profile" menu item though, so the user can't attempt to take a known-invalid action.
Comment 3 Javier O. Cordero Pérez (Cuperino) 2021-08-19 00:28:13 UTC
Interesting... This means there's no longer a way to change the default shell in Konsole without changing the shell system wide.

There should be a way to either edit the Default profile to use a different shell, or set custom profile as the default.
Comment 4 Stefan Champailler 2021-08-19 08:06:28 UTC
Created attachment 140831 [details]
multiple default profiles appear out of nowhere
Comment 5 Stefan Champailler 2021-08-19 08:10:00 UTC
So in the previous comment with the screenshot.... The situation is this. I opened konsole, there no specific profile created (it was the first time after having deleted all config files). Then I edited the "current profile" several times to get my preferred settings. Then, to my surprise I saw the "default profile" duplicated tons of times (see screenshot) :-) I report my bug here because I think it's related to this report...

Operating System: Debian GNU/Linux 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
OS Type: 64-bit
Comment 6 Ahmad Samir 2021-08-19 12:16:28 UTC
(In reply to Stefan Champailler from comment #5)
> So in the previous comment with the screenshot.... The situation is this. I
> opened konsole, there no specific profile created (it was the first time
> after having deleted all config files). Then I edited the "current profile"
> several times to get my preferred settings. Then, to my surprise I saw the
> "default profile" duplicated tons of times (see screenshot) :-) I report my
> bug here because I think it's related to this report...
> 

I think this is fixed in master https://invent.kde.org/utilities/konsole/-/commit/4cab54d2bb26f23a1e17d847fe581867c0576785 , could you test?
Comment 7 Ahmad Samir 2021-08-19 12:20:06 UTC
(In reply to Javier O. Cordero Pérez (Cuperino) from comment #3)
> Interesting... This means there's no longer a way to change the default
> shell in Konsole without changing the shell system wide.
> 
> There should be a way to either edit the Default profile to use a different
> shell, or set custom profile as the default.

You can still use the Settings -> Konsole Settings -> Profiles dialog, but it's a bit hidden.

I think instead of removing "Edit current profile" from the menu, we could detect that this is the default/immutable/built-in profile and change the text to "Create new profile", not sure how simple that would be, but it's worth looking into IMHO. Note that this is what already happens, i.e. when you are using the built-in profile and select "Edit current profile" a new profile is created, and that's what you actually edit (and the title of the edit profile dialog does mention "new").
Comment 8 Bug Janitor Service 2021-08-20 12:09:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/462
Comment 9 Javier O. Cordero Pérez (Cuperino) 2021-08-22 04:13:33 UTC
(In reply to Ahmad Samir from comment #7)
> (In reply to Javier O. Cordero Pérez (Cuperino) from comment #3)
> > Interesting... This means there's no longer a way to change the default
> > shell in Konsole without changing the shell system wide.
> > 
> > There should be a way to either edit the Default profile to use a different
> > shell, or set custom profile as the default.
> 
> You can still use the Settings -> Konsole Settings -> Profiles dialog, but
> it's a bit hidden.

Yes, I can access the "Profiles" management dialog from Konsole, although not from Yakuake. I was able to remove all the redundant profiles from there. Thank you for sharing that information!
Comment 10 Stefan Champailler 2021-08-22 12:11:11 UTC
(In reply to Ahmad Samir from comment #6)
> (In reply to Stefan Champailler from comment #5)
> > So in the previous comment with the screenshot.... The situation is this. I
> > opened konsole, there no specific profile created (it was the first time
> > after having deleted all config files). Then I edited the "current profile"
> > several times to get my preferred settings. Then, to my surprise I saw the
> > "default profile" duplicated tons of times (see screenshot) :-) I report my
> > bug here because I think it's related to this report...
> > 
> 
> I think this is fixed in master
> https://invent.kde.org/utilities/konsole/-/commit/
> 4cab54d2bb26f23a1e17d847fe581867c0576785 , could you test?

Tested on today's neon developper (plasma 5.22.80, Frameworks 5.86) build. Issue still there. Steps to reproduce :

1. Run Neon from ISO (no need to install on a HDD)
2. Start konsole
3. Edit current profile
4. Change some settings, making sure to "Apply" for each change.
5. Open a new tab : you're given a list a n times "Profile 1" (+ default profile). That's (n-1) too many "profile 1" :-)
Comment 11 Ahmad Samir 2021-08-22 12:15:39 UTC
I don't use Neon so I don't know for sure if the ISO would include a git master snapshot or the latest stable release of konsole.
Comment 12 Stefan Champailler 2021-08-22 14:52:28 UTC
(In reply to Ahmad Samir from comment #11)
> I don't use Neon so I don't know for sure if the ISO would include a git
> master snapshot or the latest stable release of konsole.

Will try to build from master. But that'll take a significant amount if time. I've already done that in the past to fix some bugs but I forgot a bit :-)
Comment 13 Kurt Hindenburg 2021-08-31 23:58:24 UTC
Git commit 40cf8519d7347828113f6bd25e0943f874ae5cb1 by Kurt Hindenburg, on behalf of Ahmad Samir.
Committed on 31/08/2021 at 23:47.
Pushed by hindenburg into branch 'master'.

For the fallback profile change the menu text to "Create New Profile"

This is less confusing; also matches what the code actually does.
FIXED-IN: 21.12

M  +20   -4    src/session/SessionController.cpp
M  +2    -0    src/session/SessionController.h

https://invent.kde.org/utilities/konsole/commit/40cf8519d7347828113f6bd25e0943f874ae5cb1
Comment 14 ratijas 2021-09-02 19:48:22 UTC
For future reference: default/fallback profile is in the process of being renamed to "built-in", because the concept of user-selected "Default" profile is not the one we are talking about here.

See https://invent.kde.org/utilities/konsole/-/merge_requests/428
Comment 15 Chris Gidden 2022-10-10 10:43:19 UTC Comment hidden (spam)
Comment 16 Chris Gidden 2022-10-10 10:48:03 UTC Comment hidden (spam)