Bug 416752

Summary: System-wide installed profiles cannot be modified
Product: [Applications] konsole Reporter: Wolfgang Bauer <wbauer1>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: normal CC: a.samirh78, auxsvr
Priority: NOR    
Version: 19.12.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Wolfgang Bauer 2020-01-25 14:57:05 UTC
SUMMARY
openSUSE ships a system-wide "Root Shell" profile since ages (installed to /usr/share/konsole/Root Shell.profile).
In current konsole versions, it's not possible to edit it anymore in "Manage Profiles", if you try to save the changes you get an error dialog:
Konsole does not have permission to save this profile to:
"/usr/share/konsole/Root Shell.profile"
To be able to save settings you can either change the permissions of the
profile configuration file or change the profile name to save the settings to a
new profile.

It should probably create a copy in ~/.local/share/konsole/ in this case.

The problem probably exists for a while already, but I think it worked fine years ago (no idea when it broke though).
Comment 1 Wolfgang Bauer 2020-01-25 15:05:18 UTC
(In reply to Wolfgang Bauer from comment #0)
> It should probably create a copy in ~/.local/share/konsole/ in this case.

Btw, the last KDE4 version (4.14.3) does exactly this, it creates a modified profile in ~/.kde4/share/apps/konsole/.
Comment 2 Ahmad Samir 2020-01-26 16:15:35 UTC
I don't know which commit changed the behaviour, but the one that added the error message was: https://phabricator.kde.org/R319:1adc69e39a92d25a2b5192c5cc9efe420075c717

IIRC, I based this on the behaviour of systemsettings -> colors kcm, it doesn't allow changing the read-only/system-wide schemes, and asks the user to choose a different name if he wishes to save the changes. Having two profiles with the same name, one in the system-wide location and one in the user's home, the latter hiding the former, is a bit problematic, e.g. if you want to restore the default system-wide profile you'll have to delete the .profile in your home manually; I don't remember exactly, but you could end up with two profiles with the same name shown in the profile manager... etc.
Comment 3 Wolfgang Bauer 2020-01-26 16:47:11 UTC
(In reply to Ahmad Samir from comment #2)
> Having two
> profiles with the same name, one in the system-wide location and one in the
> user's home, the latter hiding the former, is a bit problematic, e.g. if you
> want to restore the default system-wide profile you'll have to delete the
> .profile in your home manually
FTR, konsole's Color Scheme editor (which does allow to edit system-wide color schemes) supports this by having a "Defaults" button that basically just deletes the user-specific file.
Comment 4 Wolfgang Bauer 2020-01-26 16:53:48 UTC
Btw:
(In reply to Ahmad Samir from comment #2)
> I don't remember exactly, but you could end
> up with two profiles with the same name shown in the profile manager... etc.
This is exactly what happens currently if you copy a profile from /usr/share/konsole/ to ~/.local/share/konsole/ (i.e. have a file with the same name in both locations).