--- kdebase-3.2.3/kdesktop/init.cc.fix_copy_kde_script 2004-09-14 11:38:10.712308735 +0200 +++ kdebase-3.2.3/kdesktop/init.cc 2004-09-14 12:20:33.880131242 +0200 @@ -117,6 +117,33 @@ void copyDesktopLinks() } } +void copyKdeScript() +{ + KStandardDirs standard; + QString envDir(standard.localkdedir() + "/env"); + QDir dir(envDir); + if(!dir.exists()) + { + ::mkdir( QFile::encodeName(envDir), S_IRWXU ); + QCString cmd = "cp "; + cmd += QFile::encodeName(KProcess::quote("/usr/share/mdk/kde/scripts/start-gpg-agent.sh")); + cmd += " "; + cmd += QFile::encodeName(KProcess::quote(envDir)); + system( cmd ); + } + QString shutDir(standard.localkdedir() + "/shutdown"); + dir = QDir(shutDir); + if(!dir.exists()) + { + ::mkdir( QFile::encodeName(shutDir), S_IRWXU ); + QCString cmd = "cp "; + cmd += QFile::encodeName(KProcess::quote("/usr/share/mdk/kde/scripts/stop-gpg-agent.sh")); + cmd += " "; + cmd += QFile::encodeName(KProcess::quote(shutDir)); + system( cmd ); + } +} + /** * @return true if this is the first time * kdesktop is run for the current release @@ -173,6 +200,7 @@ bool testLocalInstallation() if (emptyDesktop) { copyDesktopLinks(); + copyKdeScript(); if( QFileInfo("/dev/dsp").exists()) KApplication::startServiceByDesktopName("kmix", QStringList(), 0, 0, 0, "", true);