File kdm-path.diff of Package kdebase3

--- kcontrol/kdm/background.cpp
+++ kcontrol/kdm/background.cpp
@@ -51,7 +51,7 @@
 		" This is done by running some program (possibly xsetroot) in the script"
 		" specified in the Setup= option in kdmrc (usually Xsetup).") );
     config->setGroup( "X-*-Greeter" );
-    m_simpleConf=new KSimpleConfig(config->readEntry( "BackgroundCfg",KDE_CONFDIR "/kdm/backgroundrc" ) );
+    m_simpleConf=new KSimpleConfig(config->readEntry( "BackgroundCfg", "/etc/opt/kde3/share/config/kdm/backgroundrc" ) );
     m_background = new BGDialog( this, m_simpleConf, false );
 
     connect(m_background, SIGNAL(changed(bool)), SIGNAL(changed(bool)));
--- kcontrol/kdm/main.cpp
+++ kcontrol/kdm/main.cpp
@@ -24,6 +24,7 @@
 #include <config.h>
 
 #include <qlayout.h>
+#include <qfile.h>
 
 #include <kaboutdata.h>
 #include <kgenericfactory.h>
@@ -173,7 +174,11 @@
     kdWarning() << "user(s) '" << tgmapci.data().join(",")
 	<< "' have unknown GID " << tgmapci.key() << endl;
 
-  config = new KSimpleConfig( QString::fromLatin1( KDE_CONFDIR "/kdm/kdmrc" ));
+
+  if ( QFile::exists("/etc/opt/kde3/share/config/kdm/kdmrc") )
+    config = new KSimpleConfig( QString::fromLatin1( "/etc/opt/kde3/share/config/kdm/kdmrc" ));
+  else
+    config = new KSimpleConfig( QString::fromLatin1( "/opt/kde3/share/config/kdm/kdmrc" ));
 
   QVBoxLayout *top = new QVBoxLayout(this);
   tab = new QTabWidget(this);
--- kdm/kfrontend/kdm_config.c
+++ kdm/kfrontend/kdm_config.c
@@ -381,7 +381,8 @@
 
 CONF_READ_ENTRIES
 
-static const char *kdmrc = KDMCONF "/kdmrc";
+/* static const char *kdmrc = KDMCONF "/kdmrc"; */
+static char *kdmrc;
 
 static Section *rootsec;
 
@@ -402,9 +403,18 @@
 		return;
 	confread = 1;
 
-	Debug( "reading config %s ...\n", kdmrc );
-	if (!readFile( &file, kdmrc, "master configuration" ))
-		return;
+
+Debug ("reading config /etc/opt/kde3/share/config/kdm/kdmrc ...\n");
+	if (readFile (&file, "/etc/opt/kde3/share/config/kdm/kdmrc"
+                  , "master configuration"))
+		kdmrc = "/etc/opt/kde3/share/config/kdm/kdmrc";
+	else{
+		kdmrc = "/opt/kde3/share/config/kdm/kdmrc";
+		Debug ("reading config %s ...\n", kdmrc);
+		if (!readFile (&file, kdmrc, "master configuration"))
+			return;
+	}
+
 
 	for (s = file.buf, line = 0, cursec = 0, sectmoan = 1; s < file.eof; s++) {
 		line++;
openSUSE Build Service is sponsored by