KDE 4.1 login fails for new user

David Faure faure at kde.org
Tue Jul 15 16:09:58 BST 2008


On Saturday 12 July 2008, David Jarvie wrote:
> I removed the ~/.kde directory and tried to log in using KDE 4.1 (SVN 
> yesterday). It showed the error message "Could not start kstartupconfig4. 
> Check your installation." before aborting the login. The error code being 
> returned by kstartupconfig4 was 3. Repeating the login attempt resulted in 
> the same error.
> 
> By my reading of the code, kdostartupconfig.cpp calls
> 
>     KStandardDirs::locateLocal( "config", "startupconfigkeys" );
> 
> and then tries to open the resultant file name in read-only mode - hence the 
> error. When you start with an empty ~/.kde, that file won't exist, so AFAICS 
> kstartupconfig4 will inevitably return the error code 3. (The directory 
> ~/.kde/share/config was created with correct user permissions, presumably by 
> that call, so there's no problem with write access.)

So basically this patch should help?

--- kdostartupconfig.cpp        (revision 829274)
+++ kdostartupconfig.cpp        (working copy)
@@ -80,6 +80,8 @@ int main( int argc, char **argv )
     kDebug() << "Running kdostartupconfig.";
     KCmdLineArgs::init( argc, argv, &about ); // for KLocale not to complain about encoding
     QString keysname = KStandardDirs::locateLocal( "config", "startupconfigkeys" );
+    if (!QFile::exists(keysname))
+        return 0; // nothing to do
     QFile keys( keysname );
     if( !keys.open( QIODevice::ReadOnly ))
         return 3;

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list