Changeset 2c85ef2


Ignore:
Timestamp:
01/27/14 14:33:48 (7 months ago)
Author:
Ken Moore <ken@…>
Branches:
releng/10.0
Children:
709442e
Parents:
5013955
Message:

Backport the PCDM fixes to 10.0

File:
1 edited

Legend:

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

    r5013955 r2c85ef2  
    141141  // Startup the process(s) 
    142142   //  - Setup to run the user's <home-dir>/.xprofile startup script 
     143  Backend::log("Starting session:"); 
    143144  if(QFile::exists(xhome+"/.xprofile")){ 
    144     qDebug() << "Run user ~/.xprofile"; 
    145     cmd.prepend(". "+xhome+"/.xprofile; "); 
    146     //Make sure it has executable permissions 
    147     QFile::setPermissions(xhome+"/.xprofile", QFile::permissions(xhome+"/.xprofile") | QFile::ExeOwner); 
     145    //Make sure the file is executable 
     146    QFile::setPermissions(xhome+"/.xprofile", QFile::permissions(xhome+"/.xprofile") | QFile::ExeOwner | QFile::ExeGroup | QFile::ExeOther ); 
     147    //Need to run a couple commands in sequence: so put them in a script file 
     148    QStringList contents; 
     149    contents << ". "+xhome+"/.xprofile"; 
     150    contents << cmd; //end with the actual command for the DE 
     151    if( Backend::writeFile(xhome+"/.pcdmsessionstart", contents) ){ 
     152      //script created fine, change the command to just run it 
     153      cmd = "sh "+xhome+"/.pcdmsessionstart"; 
     154    }else{ 
     155      //Could not create script file, fallback on running them seperately 
     156      Backend::log(" --Run user ~/.xprofile"); 
     157      QString xpro = "sh "+xhome+"/.xprofile"; 
     158      this->start(xpro); 
     159      this->waitForFinished(3000); 
     160    } 
    148161  } 
    149162  connect( this, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotCleanup()) ); 
Note: See TracChangeset for help on using the changeset viewer.