[Howto] pre-compile KHelpCenter index

kde-logo-official
The KDE help center contains the handbooks of all KDE programs. Unfortunately, the index is compiled for each user which is sub-optimal in larger deployments.

The Problem

The KHelpCenter is the central place to access the KDE program handbooks. It also offers an option to index all these data to quickly search through them. However, currently this is done on a per-user base and is offered as a dialog once the KHelpCenter is started the first time.

In larger deployments with several users per machine/server or where you have central login servers you might not want your central server to do the same task again and again, for each new user. Therefore it makes sense to a) pre-compile the data and b) configure all your KDE users to access a central directory.

The Solution

The first task can be accomplished by starting the index process manually and let it write to a system-directory:

khc_docbookdig.pl --indexdir=$SYSTEMDIR --docpath=khelpcenter:kde_application_manuals --identifier=kde_application_manuals

Of course $SYSTEMDIR must be replaced with your preferred system directory which is for example on a NFS/Samba server.

Now the user-KDE configuration need to know about the new index files. Since it might even be that some users have already created an index and some not, so the best is to overwrite their configuration without actually modifying anything in their configuration files – which is not a problem with KDE’s Kiosk. Depending on your distribution, your KDE system configuration is somewhere in /etc/kde/ or similar. There the file khelpcenterrc must be created/modified with the following content:

[Search][$i]
IndexDirectory=$SYSTEMDIR
IndexExists=true
ScopeSelection=0

From now on all users will automatically access the index of the system repository – even if they already have created their own KHelpCenter index.

Closing Words

The KHelpCenter is a ncie program – but needs quite some love. Recently apacheLog identified several problems and was only able to fix some of them. Some slightly larger tasks are an integration with Nepomuk/Strigi and the inclusion of the online documentation: Userbase and Techbase. Last but not least it might be worth a look if KHelpCenter could take advantage of QtAssistant.

Finally a last word about the command mentioned above: it only include the KDE handbooks, the man pages might not be included.

About these ads

4 thoughts on “[Howto] pre-compile KHelpCenter index

  1. Not entirely on topic, but I think it’s informative and not entirely irrelevant here, so:

    > Depending on your distribution, your KDE system
    > configuration is somewhere in /etc/kde/ or similar.

    In Fedora, there are 2 ways to customize settings on a per-system basis:
    1. You can use /etc/kde.
    2. You can use kiosktool to clone the default profile (which contains Fedora’s KDE defaults) and make your edits in the cloned profile.

    It is strongly recommended NOT to edit the files in /usr/share/config or /usr/share/kde-settings/kde-profile/default/ as those are not marked as config files and will thus be replaced by package updates (so they should be considered read-only). /etc/kde or custom profiles will not be overwritten by package updates and will take precedence over the read-only settings.

    The files in /usr/share/config are the defaults upstream KDE ships, the default profile in /usr/share/kde-settings/kde-profile/default/ contains Fedora’s customizations. /etc/kde is reserved for site-specific configuration.

  2. The kiosktool is available on all other distributions as well. However, it is for KDE3 only, so changes to the menu or the taskbar won’t affect anything.

    But thanks for highlighting the different directories and their functions, I missed that :)

  3. There’s actually a KDE 4 version of the kiosktool under websvn.kde.org/trunk/extragear/sysadmin/kiosktool/ (grrr, what’s that filter which eats comments containing URLs without even telling why it filtered them?), but it hasn’t made its way into Fedora yet. I also don’t know how well it works, I’ve just read some time ago that they got it compiling. :-) I guess this is worth investigating.

Comments are closed.