Ignore:
Timestamp:
11/05/13 12:37:49 (12 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
f9457f4
Parents:
d65f13e
Message:

Get the PCDM dbus-launch and ~/.xprofile integration working again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/PCDM/src/pcdm-xprocess.cpp

    r6449f61 rfcaed1e  
    127127  QString cmd; 
    128128  // Configure the DE startup command 
    129   //  - Setup to run the user's <home-dir>/.xprofile startup script 
    130   if(QFile::exists(xhome+"/.xprofile")){ 
    131     //cmd.append(". "+xhome+"/.xprofile; ");  //make sure to start it in parallel 
    132   } 
     129 
    133130  //  - Add the DE startup command to the end 
    134   //cmd.append("dbus-launch --exit-with-session "+xcmd); 
    135   cmd.append(xcmd); 
     131  cmd.append("dbus-launch --exit-with-session "+xcmd); 
     132  //cmd.append(xcmd); 
    136133  //cmd.append("; kill -l KILL"); //to clean up the session afterwards 
    137134  // Get the current locale code 
     
    160157  this->setStandardOutputFile(xhome+"/.pcdm-startup.log",QIODevice::Truncate); 
    161158  this->setStandardErrorFile(xhome+"/.pcdm-startup.err",QIODevice::Truncate); 
    162   // Startup the process 
    163   //QMessageBox::warning(wid, "My Application", "CMD: " + cmd, QMessageBox::Ok, QMessageBox::Ok); 
     159  // Startup the process(s) 
     160   //  - Setup to run the user's <home-dir>/.xprofile startup script 
     161  if(QFile::exists(xhome+"/.xprofile")){ 
     162    disconnect(SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotCleanup(int, QProcess::ExitStatus)) ); 
     163    this->start("sh "+xhome+"/.xprofile &");//make sure to start it in parallel 
     164    if(!this->waitForFinished(300000) ){ 
     165      //If it still has not finished this after 5 minutes, kill it 
     166      this->terminate(); 
     167    } 
     168    connect( this, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotCleanup(int, QProcess::ExitStatus)) ); 
     169  } 
    164170  this->start(cmd); 
    165171  return TRUE; 
Note: See TracChangeset for help on using the changeset viewer.