Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Chapter�15.�Tinkering Under the Hood of KDE

Hand-Editing Configuration Files

Nicolas Goutte

Introduction

In KDE, the configuration files are easy to edit with a simple editor like Kate as the configuration files are text files.

An example of a text file:

[General]
AutoSave=1
LastFile=/var/tmp/test.txt

The user-specific configuration files are stored in .kde/share/config (replace .kde with your $ KDEHOME setting) and the global ones are in the share/config sub-directory of KDE's installation path. (You can find this path by running the command kde-config --prefix .) Their filenames typically end in rc (without an initial period), for example kopeterc.

Warning

Editing configuration files by hand can risk the stability of your KDE installation. Applications usually do not check what they read from the configuration files. This means that they can be disturbed by what they get as configuration and might even crash.

Backups

So the first rule is to make a backup of your file before modifying it. The backup is better stored outside any .kde subdirectory (or the corresponding $ KDEHOME directory). Backups are anyway a good idea in case of a major failure of KDE that would destroy important configuration files (for example your KMail settings, which are in in the file kmailrc). (Such a major failure should not happen but it still can happen.)

Editing

So why would you want to touch the configuration files at all? Well, first you need it when you want to enforce the KIOSK mode. Perhaps a developer has asked you to add an entry to help him to solve a problem with the application. Perhaps you want to recover from a problem without having to remove all the .kde directory. Perhaps you want to learn more about the depths of KDE.

Anyway, whatever your reason, you want to modify by hand a configuration file.

When planning to edit such a file, make sure that the application using it is not running. If it is one of the basic configuration files, consider editing the file while KDE is not running at all.

Ready? So make a backup of the file (Did I tell you this already?), start you favorite editor (let us assume it is Kate), load the file (Be careful to load as UTF-8, Kate displays it as “utf8”).

Now you have a file like:

[Group]
Key1=Value1
Key2=Value2
Key3=Value3

You can now modify it (with care!) and then save it (Be sure that it is as UTF-8 again).

Now you can test the application and if the application does not run correctly anymore, close the application and restore the backup of the configuration file.

Related Information




 
 
  Published under the terms of the GNU General Public License Design by Interspire