[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    Bug#38760: KDEHOME='~/kde3', startkde, kpersonalizer, kstandarddirs, KDEROOTHOME
From:       "D.L.C.Burggraaff" <burdi () kabelfoon ! nl>
Date:       2002-02-27 20:55:27
[Download RAW message or body]

Package: kdelibs
Version: KDE 3.0 beta 2 (KDE 2.9.2)
Severity: bug
Installed from: compiled from sources
Compiler: gcc 2.95.3
OS: Linux
OS/Compiler notes: Slackware 8.0, glibc 2.2.3, bash 2.05(1)-release

LS,
As I am running several KDE versions, I have as KDEHOME $HOME/.kde2,
$HOME/.kde3 etc.
As per bug #22414 I set these as e.g. KDEHOME='~/.kde3'    # note the '...'.

When running as a non-root user (burdi01) I indeed get a /home/burdi01/.kde3
directory. Funny thing is that kpersonalizer pops up every time KDE3 is
started.

When running as root however I get TWO directories: a /root/.kde with
Autostart, share, socket-<hostname> and tmp-<hostname> as well as a
/root/.kde3 with socket-<hostname> and tmp-<hostname> as symlinks.
And here kpersonalizer pops up every time KDE3 is started too.

As an experiment I set KDEHOME as export KDEHOME=$HOME/.kde3 - ignoring the
su problems as described in bug #22414 for the time being.
This resolved the kpersonalizer problem for the non-root user, but had no
effect on the two problems for root.

By tracing the startkde script I found the kpersonalizer problem: with
KDEHOME='~/.kde3' the grep 'FirstLogin=false' line expands to ...
'~/.kde3/share/config/kpersonalizerrc', which causes grep to return code 2
(file not found). With KDEHOME=$HOME/.kde3 it expands to
home/burdi01/share/config/kpersonalizerrc (Ok !!!) and
/root/.kde3/share/config/kpersonalizerrc (not Ok, as kpersonalizerrc is in
/root/.kde/share/config).

In my opinion the fact that bash does not expand the tilde is a (bash) bug -
according to the documentation it should expand it.
The workaround is to change the test -n "$KDEHOME" && kdehome=$KDEHOME line to
test -n "$KDEHOME" && eval kdehome=$KDEHOME   # note the eval.

Scanning the sources for "KDEHOME" gave a lot of hits. In kdelibs/kstandarddirs
I found a KDEROOTHOME environment variable ("We treat root different to prevent
root messing up the file permissions in the users home directory"). I invoked
KDE with KDEHOME='~/.kde3' ; KDEROOTHOME='~/.kde3' and lo and behold: all
problems were gone !!!

This raises the following questions/remarks:
1) It would have been nice if the new KDEROOTHOME environment variable would
have
been mentioned in e.g. the announcement.
2) KDEROOTHOME has the look and feel of a solution to a problem that already was
solved (refer to bug #22414). Furthermore KDEHOME='~/.kde3' feels better -
KDEROOTHOME may solve problems with su's from root to non-root or vice versa,
but what about su's from non-root to non-root ?
3) Should not startkde take the KDEROOTHOME into account as well ?

Kind regards,
Dick Burggraaff
mailto:burdi@kabelfoon.nl



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic