[PC-BSD Commits] r18935 - pcbsd-projects/PCDM

svn at pcbsd.org svn at pcbsd.org
Fri Sep 7 09:15:48 PDT 2012


Author: kenmoore
Date: 2012-09-07 16:15:48 +0000 (Fri, 07 Sep 2012)
New Revision: 18935

Modified:
   pcbsd-projects/PCDM/pcdm-backend.cpp
Log:
Try a new method to run the process. This method might allow us to run more than one application (thinking of extra startup scripts).



Modified: pcbsd-projects/PCDM/pcdm-backend.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-backend.cpp	2012-09-07 15:34:07 UTC (rev 18934)
+++ pcbsd-projects/PCDM/pcdm-backend.cpp	2012-09-07 16:15:48 UTC (rev 18935)
@@ -94,13 +94,7 @@
   Backend::log("Starting up Desktop environment ("+saveX+") as user ("+saveUsername+")");
   //Use the saved information and clear it
   QString username = saveUsername;
-  QString excmd = "U=`ls ";
-  excmd.append("/usr/local/share/pcbsd/xstartup");
-  excmd.append("`; for i in ${U}; do ./${i}; done; ");
-  excmd.append(saveX);
-  QString cmd = "su "+username+" -c \""+saveX+"\""; //switch user command to start the DE
-  saveUsername.clear(); 
-  saveX.clear();
+  QString cmd = "su "+username+" -c /bin/sh"; //switch user command to start the DE
   
   // Get the user's home directory
   QString homeDir = getUserHomeDir(username);
@@ -129,9 +123,13 @@
   p->start(cmd);
   // Wait for the process to start before continuing
   p->waitForStarted();
+  p->write(saveX.toUtf8());
   //Backend::log("Startup Environment: " + p->processEnvironment().toStringList().join(" ") );
   // Now Wait for the process to finish
   p->waitForFinished(-1);  //do not time-out
+  //Clear the saved variables
+  saveUsername.clear(); 
+  saveX.clear();
 }
 
 QString Backend::getUsernameFromDisplayname(QString dspname){



More information about the Commits mailing list