Home Directory KDE config files

Stephen Dowdy sdowdy at ucar.edu
Wed Oct 26 23:29:00 BST 2011


Bogus Zaba wrote, On 10/26/2011 01:49 PM:
> On 10/26/2011 07:11 PM, Duncan wrote:
>> Bogus Zaba posted on Wed, 26 Oct 2011 13:02:56 +0100 as excerpted:
>>
>>> On 10/26/2011 11:38 AM, Bogus Zaba wrote:
>>>> Slackware 13.37, KDE4.5.5.
>>>>
>>>> Is there another location (other than the .kde folder) where kde config
>>>> files are kept?
,,,

>> You got the hang of kde's "errors" and how to debug them -- STDOUT/STDERR
>> is so noisy the only effective way to get any reasonable debugging info
>> out of it is to diff it against the output from a working setup.  (I
>> guess they don't expect actual users to run the app with STDERR/STDOUT
>> open, only devs, for whom the info is probably useful.)

File $(kde-config --path config | cut -d: -f1)/kdebugrc contains the debugging controls.

Using:

    kwriteconfig --file kdebugrc --group '' --key DisableAll true

will quiet things down nicely ;)  (though with still loads of KDE
output, at least in KDE 4.4.5)

kdebugdialog --fullmode
presents you with a somewhat unwieldy interface for redirecting
KDE debug messages into one of several places (file, shell (std{out,err}),
syslog, message-box, none)

It might be useful to redirect everything to file in /dev/shm/kdebug-${USER}.dbg
(keep it in memory to avoid disk i/o)

Might be possible to default that all with:
(presuming Group [0] is the "Default" group)

for level in Info Warn Error Fatal; do
  kwriteconfig --file kdebugrc --group '0' --key ${level}Output 2
  kwriteconfig --file kdebugrc --group '0' --key ${level}Filename "/dev/shm/kdebug-${USER}.dbg"
done
kwriteconfig --file kdebugrc --group '' --key DisableAll false

(won't change any existing defaults with that, though).

substitute "4" (none) for "2" (file) above to disable messages by default.
Then only enable them at the application/service level.  But, there may be
related services generating messages you might miss...

>> Do note that especially the data dir often contains user data, mail, etc,
>> as well, so don't just go blowing it away.  Move it out of the way for
>> testing, and selectively move stuff back (bisecting the problem) if that
>> dir is found to be the problem.  Again, this is very likely to become
>> even more the case over time...
> Duncan

Good advice.  Things get more and more inter-dependent and complicated all
the time :-(

> Thanks for this. I think it may well be connected with XDG_CONFIG_HOME etc variables, but
> can you tell me where these are normally set up?

My Debian Squeeze default KDE environment doesn't configure any XDG variables by default,
so it should all be reference by the base-spec at:

# Ref: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

and the KDE4 environment variables reference:
# Ref: http://techbase.kde.org/KDE_System_Administration/Environment_Variables


This bit of script will show you the current settings or default XDG values if not set

echo "[XDG Environment]"
while read var default; do
    printf "%24s = %s\n"  "${var}" "$(eval echo \${$var-${default}\(\*\)})"
done<<"EOF"
XDG_DATA_HOME       ${HOME}/.local/share
XDG_CONFIG_HOME     ${HOME}/.config
XDG_DATA_DIRS       /usr/local/share/:/usr/share/
XDG_CONFIG_DIRS     /etc/xdg
XDG_CACHE_HOME      ${HOME}/.cache
XDG_RUNTIME_DIR     
EOF
echo "(*) indicates variable unset and a default value substituted"


Equivalently, this'll give you the KDE4 environment values and defaults, including
paths for XDG stuff that KDE4 uses that are more specific than the FreeDesktop.org
variable refs above.

---------------------------------------------------------------------------------------
echo "[VersionInfo]"
#kdeconf() { kde3-config "$@" ;}   # KDE3
kdeconf() { kde4-config "$@" ;}   # KDE4

kdeconf --version

# http://techbase.kde.org/KDE_System_Administration/Environment_Variables
echo ""
echo "[Environment]"
while read var default; do
    printf "%24s = %s\n"  "${var}" "$(eval echo \${$var-${default}\(\*\)})"
done<<"EOF"
KDE_FULL_SESSION 
KDE_SESSION_UID 
KDE_SESSION_VERSION 
KDEWM                       kwin
KDE_DISPLAY 
KDE_MULTIHEAD 
KDEDIRS
KDEHOME                     ${HOME}/.kde
KDE_HOME_READONLY 
KDEROOTHOME                 ~root/.kde
KDESYCOCA
KDETMP                      /tmp
KDEVARTMP                   /var/tmp
KDE_LANG
KDE_UTF8_FILENAMES
KDE_NO_IPV6
KDE_USE_IDN                 at:ch:cn:de:dk:kr:jp:li:no:se:tw
KDE_IS_PRELINKED
KDE_MALLOC
KDE_NOUNLOAD
KDE_DOUNLOAD
KDE_DEBUG
KDE_DEBUG_NOPROCESSINFO
KDE_DEBUG_NOAREANAME
KDE_DEBUG_NOMETHODNAME
KDE_DEBUG_FILELINE
KDE_DEBUG_TIMESTAMP
KDE_COLOR_DEBUG
KDE_FORK_SLAVES
EOF
echo "(*) indicates variable unset and a default value substituted"
echo ""
echo "[Configuration]"
while read option; do
    printf "%18s = %s\n" "${option}" "$(kde4-config --${option})"
done<<"EOF"
prefix
exec-prefix
libsuffix
localprefix
qt-prefix
qt-binaries
qt-libraries
qt-plugins
EOF
#  --kde-version             Compiled in version string for KDE libraries
#  --locate filename         Find filename inside the resource type given to --path

echo ""
echo "[UserPaths]"
#KDE3#for upath in desktop trash autostart document; do
for upath in desktop autostart document; do
  printf "%18s = %s\n" "${upath}" "$(kdeconf --userpath ${upath})"
done

echo ""
echo "[Paths]"
while read ktype ksep kdescription; do
#  printf "PATH(${ktype}) [${kdescription}]\n  $(kdeconf --path ${ktype})\n"
  printf "%18s = %s [%s]\n" "${ktype}" "$(kdeconf --path ${ktype})" "$(kdeconf --install ${ktype})"
done <<EOF
$(kdeconf --types)
EOF
echo "values in []'s are application install paths"

---------------------------------------------------------------------------------------


--stephen


-- 
Stephen Dowdy  -  Systems Administrator  -  NCAR/RAL
303.497.2869   -  sdowdy at ucar.edu        -  http://www.ral.ucar.edu/~sdowdy/

___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list