1

I'm using KDE and I want to change system sleep timeout. It should be a part of a system bootstrap script (i.e. I want to automate it), so I'd like to know how can I manipulate KDE configs from command line.

I've found this question, but the answer only works inside an X session, and I'd like to execute the script over ssh.

I suppose the config files are there somewhere, but I only found screen locking config in .config.

3
  • 1
    These are regular text files, so any text editor will do (sed from a script, or vim/nano in a terminal).
    – xenoid
    Commented Oct 2, 2018 at 20:09
  • @xenoid ok, but I have trouble finding appropriate ones. I've updated question. Commented Oct 3, 2018 at 12:09
  • I listed 3 in my comment, available in the repos of any distro.
    – xenoid
    Commented Oct 3, 2018 at 16:32

2 Answers 2

2

You did not state which version of KDE you are using. User config files have been moved around between releases. In earlier releases, a lot was in ~/.kde or ~/.kde4 while more recently ~/.config is the standard directory.

With plasma 5.13 from KDE Neon, Power devil uses ~/.config/powermanagementprofilesrc.

A general solution to find a config file:

  1. Make a git repo (git init) in the directory you suspect the config files might be in (including its children)
  2. Add everything to the repo (git add .)
  3. Make a commit (git commit)
  4. Make the change you want via GUI (e.g. System Settings)
  5. Check where and what has changed (git diff)

You can remove the git repo with rm -rf .git when you are done. If you added a very big directory (like homedir) in step 1, then you might want to add some cache directories or other spontaneously changing false leads to the .gitignore file.

Also, you might want to bookmark https://userbase.kde.org/KDE_System_Administration for help on the location and syntax of config files.

0

Though this question was already answered well by @Hmpf, there is one thing I'd like to add as an option for those who do not wish to use Git as the method to find the config file.

Step 1: Modify the setting you want to find & note the time you made the modification at
Step 2: Open a terminal and cd to ~/.config (that is, for current versions of KDE)
Step 3: Run the list files command with the -l flag and grep for the current date

ls -l | grep "MMM DD"

Then just look for the timestamp that matches when you modified the setting.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .