konsole configuration files.

Hello.
I would like to configure 3 konsole profiles for any user.
I use also 2 colors definitions files.

I have make a test by copying manually the five files to the folder /home/user_test/.local/share/konsole of a new user ‘user_test’.
It seems that it is not sufficient.

What is the relationship between the profile files in …/.local/share/konsole and what appear in the 'Settings/Manage Profiles …" menu options of a konsole session?
During my test, starting a konsole session with :

konsole --profile "profile_1"

does not give the expected result : wrong color.

Using an existing profile and editing the color, sometimes does not create the color definition files.

When creating a root profile by creating a new profile or editing an existing profile, where is store this new profile : in user home I suppose ?

I suppose that it is the command 'su - ’ which made the profile a root user behaviour ?

I am just interested in configuring konsole from /etc/skel for new user

Any help is welcome.

I am not sure why you want to configure konsole for a new user unless you are thinking of a class of students and you want them to see the same configuration of konsole. The whole philosophy of Linux/Unix is to give the user freedom to configure the desktop to suit their preferences.

That said, the profile names are 1.profile, 2.profile and Shell.profile in my ~/.local/share/konsole directory. So is your syntax correct?

Yes

the command

konsole --profile "profile_1"

use the file profile_1.profile in ~/.local/share/konsole

See example of opensuse application menu for terminal super user.

Here, I have only “Default.profile”

The particular names don’t mean much. It depends on how you setup Konsole.

How did you copy those profiles, by default they’re only read-write for the user. So copying them ( as root ) will provide the test user with profiles he/she is not allowed to read.
FWIW: my /etc/skel is empty. I do have a lot of defaults though in /etc/default

It should be the prerogative of the admin to choose the starting points, overriding upstream and/or distro when desired, hence, /etc/skel/, and whatever is required to answer OP’s request.

That’s is my prerogative.

I copied “.config/konsolerc” to “/etc/skel/.config/”
and “/.local/share/konsole/*” to “/etc/skel/.local/share/”
(had to also create “/etc/skel/.local/share” since that did not exist).

I changed the ownership of those files to root.

I then tried with a new user login to KDE. And those files were not copied to the new user setup.

So it looks as if this idea isn’t going to work anyway.

I may misunderstand what you say here, but these things in /etc/skel, etc. are only used at the creation of a new user. Not as (s)he logs in.

Aha, you are right. It works for a user created after I made changes to “/etc/skel”. But not for a user created before that change and logging in for the first time.

And yes, for the newly created user, “konsole” does start out with the settings that I defined in “/etc/skel”.

It is simple, /etc/skel is a configuration for useradd. Nothing more, nothing less.
It only influences the creation of a user with useradd (YaST has a ncurses/man skel
GUI interface for it).

-k, --skel SKEL_DIR
The skeleton directory, which contains files and directories to be copied in the user’s home directory, when
the home directory is created by useradd.

       This option is only valid if the -m (or --create-home) option is specified.
       If this option is not set, the skeleton directory is defined by the SKEL variable in /etc/default/useradd or,
       by default, /etc/skel.
       If possible, the ACLs and extended attributes are copied./

NOTES
The system administrator is responsible for placing the default user files in the /etc/skel/ directory (or any
other skeleton directory specified in /etc/default/useradd or on the command line).

Hello.

In hurry, I made a big mistake in my script, the permission was correct but the ownership of the files relative to the user been configured was incorrect.
After correction all is working.

Thank you everybody for helping.