[KDE-India] Tip: Easy KDE Profiles

subbukk subbukk at gmail.com
Tue Dec 5 10:16:49 CET 2006


Hi,

Browsing through the code for kstandarddirs.cpp, I discovered the 
profileDirsPrefix config key that should simplify KDE profile 
maintenance. The procedure in KDE user admin guide suggests using 
prefixes key in Directories-<profile> group for every profile. Instead, 
we could use profileDirsPrefix key and let the system figure out the 
prefixes for each profile.

E.g. to support profiles for staff, contractors and employees, create 
these unix groups and then

alias profreg='kwriteconfig --file /etc/kde3/system.kdeglobals --group 
Directories'
alias mapreg='kwriteconfig --file /etc/kde-profiles/MAP'

PROFS="staff employees contractors"
profreg --key userProfileMapFile /etc/kde-profiles/MAP
profreg --key profileDirsPrefix /etc/kde-profiles

mapreg --group General --key groups ${PROFS// /,}
for i in $PROFS; do
	mapreg --group Groups --key $i $i
	mkdir -p /etc/kde-profiles/$i/share/config
done

Now the profiles themselves will be picked up 
from /etc/kde-profiles/{staff,employees,contractors}

Hope this helps .. Subbu


More information about the KDE-india mailing list