[PC-BSD Commits] r19055 - pcbsd-projects/PCDM
svn at pcbsd.org
svn at pcbsd.org
Tue Sep 11 11:15:09 PDT 2012
Author: kenmoore
Date: 2012-09-11 18:15:09 +0000 (Tue, 11 Sep 2012)
New Revision: 19055
Modified:
pcbsd-projects/PCDM/pcdm-backend.cpp
Log:
Setup PCDM to use the user's <home-dir>/.xprofile to run the startup scripts, instead of manually running them.
Modified: pcbsd-projects/PCDM/pcdm-backend.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-backend.cpp 2012-09-11 17:59:40 UTC (rev 19054)
+++ pcbsd-projects/PCDM/pcdm-backend.cpp 2012-09-11 18:15:09 UTC (rev 19055)
@@ -92,23 +92,20 @@
return;
}
Backend::log("Starting up Desktop environment ("+saveX+") as user ("+saveUsername+")");
- //Use the saved information
+
+ // Get the user's home directory
+ QString homeDir = getUserHomeDir(saveUsername);
+ // Use the saved information
QString cmd = "su "+saveUsername+" -c \""; //switch user command to start process properly
- // Get any startup scripts and append them to the startup command
- QString scriptDir = Config::loginScriptsDir();
- QDir sdir(scriptDir);
- if(!scriptDir.endsWith("/")){scriptDir.append("/");}
- QStringList child = sdir.entryList(QDir::Files | QDir::Executable | QDir::NoDotAndDotDot);
- for(int i=0; i<child.length(); i++){
- cmd.append( scriptDir+child[i]+"; " );
+ // Setup to run the user's <home-dir>/.xprofile startup script
+ if(QFile::exists(homeDir+"/.xprofile")){
+ cmd.append(homeDir+"/.xprofile; ");
}
//Add the DE startup command to the end
cmd.append(saveX);
//Finish up the command formatting
cmd.append("\"");
- Backend::log("Startup command: "+cmd);
- // Get the user's home directory
- QString homeDir = getUserHomeDir(saveUsername);
+ //Backend::log("Startup command: "+cmd);
// Get the current locale code
QLocale mylocale;
QString langCode = mylocale.name();
More information about the Commits
mailing list