rem: QString rcDir = p + "/.kde/config/"; if ( access( rcDir.data(), F_OK ) ) mkdir( rcDir.data(), 0740 );
add: QString rcDir = p + "/.kde/share/apps/knotes";
context: int main( int argc, char **argv ) {  FILE *fp;  int pid;  KPostit* postit;  QString p = getenv( "HOME" );  QString rcDir = p + "/.kde/config/";  if ( access( rcDir.data(), F_OK ) )    mkdir( rcDir.data(), 0740 );  pidFile = rcDir + "/knotes.pid";  // if there is a pidFile then this is not the first instance of kpostit  if ( ( fp = fopen( pidFile, "r" ) ) != NULL )    {      fscanf( fp, "%d", &pid);      printf("pid %d\n",pid);      // if this fails I assume that the pid file is left over from a bad exit      // and continue on      //      if ( kill( pid, SIGUSR1 ) == 0){ 		// the kpostit is still alive 	// it could however be zombi or a recycled pid -- use IPC instead.	exit(0);      }      fclose( fp );    }  catchSignals();  fp = fopen( pidFile, "w" );  fprintf( fp, "%d\n", getpid());  fclose( fp );  KApplication a(argc, argv, "knotes");  mykapp = &a;  readSettings();  findPostitFiles();  readalarms();  alarmConsistencyCheck();  if(KPostit::PostitFilesList.count() == 0){    KPostit::PostitFilesList.append("knote 1");    postit = new KPostit(NULL,NULL,0,"knote 1");  }  else{    postit = new KPostit(NULL,NULL,0,KPostit::PostitFilesList.first());  }  KPostit::PostitList.append( postit );   mytimer = new MyTimer();    postit->show();  XSetErrorHandler( knotes_x_errhandler );  XSetIOErrorHandler( knotes_xio_errhandler );  return a.exec();  delete mytimer;}