Message: previous - next
Month: September 2010

Annoying Bug with kde-config

From: Darrell Anderson <humanreadable@...>
Date: Wed, 22 Sep 2010 14:43:09 -0700 (PDT)
I discovered an annoying bug with /usr/bin/kde-config.

Because I am maintaining multiple KDE desktops in my testing, I am running a simple test to ensure I have the correct startkde script installed.

When I run the test in interactive mode (logged in) the test functions as expected. When I run the test in non-interactive mode, such as in an rc.local or rc.shutdown script, then kde-config misbehaves.

The annoying behavior is creating a .kde* home directory in the top level root directory. The bug is a carry-over from KDE because the same behavior occurs in 3.5.10. The only difference is that the 3.5.10 kde-config creates a /.kde directory while Trinity create /.kde3.

The directory gets get created there because in non-interactive mode the current working directory of a script usually is the top level.

To verify run this little snippet in an rc.local or rc.shutdown script:

/bin/ls -la /
sleep 2
/usr/bin/kde-config --help
/bin/ls -la /
sleep 2

Change the kde-config parameter to --version. Same results. You should see a /.kde3 directory get created.

Temporarily changing directories to /root in the test snippet does not help. Probably because kde-config sees no login name or ID. My only workaround at this point is to run my test snippet and then test for the existence of the new root directory.

The bug will affect anybody who runs kde-config in a script in non-interactive mode.

I believe kde-config is supposed to be informational and not pro-active. Hence, the tool should not presumptively be creating directories.