Changeset 9c27073


Ignore:
Timestamp:
Nov 6, 2013 8:17:43 AM (5 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
268e1e8, fbbd5c0
Parents:
b28c8d9 (diff), f24f00e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pbi-manager10/pbi-manager

    r99cd02c rf24f00e  
    47874787} 
    47884788 
     4789# This is a crude hack, but we need to copy libGL* to a location outside 
     4790# of /usr/local for PBIs to be able to access them 
     4791check_populate_opengl() 
     4792{ 
     4793  local lG 
     4794  for i in `ls /usr/local/lib/libGl.* /usr/local/lib/libGL.* /usr/local/lib/libGLU.* 2>/dev/null` 
     4795  do 
     4796    lG=`basename $i` 
     4797    cp ${i} /usr/lib/${lG} 
     4798  done 
     4799} 
     4800 
    47894801# Start the PBID daemon 
    47904802do_pbid() { 
     
    48054817        if [ "${PBI_VERBOSE}" != "YES" ] ; then _redir="/dev/null" ; fi 
    48064818        echo "Started pbid: `date`" > ${_pbid_log} 
     4819 
     4820        # Check for opengl libs to link 
     4821        check_populate_opengl 
    48074822 
    48084823        while 
  • src-qt4/PCDM/src/pcdm-backend.cpp

    r577dd9b rb28c8d9  
    1212#include "pcbsd-utils.h" 
    1313 
    14 QStringList displaynameList,usernameList,homedirList,instXNameList,instXBinList,instXCommentList,instXIconList; 
     14QStringList displaynameList,usernameList,homedirList,usershellList,instXNameList,instXBinList,instXCommentList,instXIconList; 
    1515QString logFile; 
    1616QString saveX,saveUsername, lastUser, lastDE; 
     
    9191  if( i == -1 ){ i = displaynameList.indexOf(username); } 
    9292  return homedirList[i]; 
     93} 
     94 
     95QString Backend::getUserShell(QString username){ 
     96  int i = usernameList.indexOf(username); 
     97  if( i == -1 ){ i = displaynameList.indexOf(username); } 
     98  return usershellList[i];       
    9399} 
    94100 
     
    366372      displaynameList << uList[i].section(":",4,4).simplified(); 
    367373      homedirList << uList[i].section(":",5,5).simplified(); 
     374      usershellList << uList[i].section(":",6,6).simplified(); 
    368375    } 
    369376  } 
  • src-qt4/PCDM/src/pcdm-backend.h

    r90dc161 rb28c8d9  
    4545    static void log(QString);  
    4646    static QString getUserHomeDir(QString); 
     47    static QString getUserShell(QString); 
    4748    static void checkLocalDirs(); 
    4849 
  • src-qt4/PCDM/src/pcdm-xprocess.cpp

    r999faef rb28c8d9  
    2525  xhome.clear(); 
    2626  xpwd.clear(); 
     27  xshell.clear(); 
    2728  pam_started = FALSE; 
    2829  pam_session_open = FALSE; 
     
    4445  xhome = Backend::getUserHomeDir(xuser); 
    4546  xcmd = Backend::getDesktopBinary(desktop); 
     47  xshell = Backend::getUserShell(xuser); 
    4648  xde = desktop; 
    4749  //Now start the login process 
     
    9496 
    9597  // Get the environment before we drop priv 
    96   QProcessEnvironment environ = QProcessEnvironment::systemEnvironment(); //current environment 
     98  this->setProcessEnvironment( QProcessEnvironment::systemEnvironment() ); //current environment 
    9799  //Now allow this user access to the Xserver 
    98100  QString xhostcmd = "xhost si:localuser:"+xuser; 
     
    132134  //cmd.append(xcmd); 
    133135  //cmd.append("; kill -l KILL"); //to clean up the session afterwards 
    134   // Get the current locale code 
    135   QLocale mylocale; 
    136   QString langCode = mylocale.name(); 
    137136   
    138137  //Backend::log("Startup command: "+cmd); 
    139138  // Setup the process environment 
    140  
    141   // Setup any specialized environment variables 
    142   // USER, HOME, and SHELL are set by the "su" login 
    143   environ.insert("LOGNAME",xuser); //Login name 
    144   environ.insert("USERNAME",xuser); // Username 
    145   environ.insert("PATH",environ.value("PATH")+":"+xhome+"/bin"); // Append the user's home dir to the path 
    146   if( langCode.toLower() == "c" ){} // do nothing extra to it 
    147   else if(!environ.value("MM_CHARSET").isEmpty() ){ langCode.append( "."+environ.value("MM_CHARSET") ); } 
    148   else{ langCode.append(".UTF-8"); } 
    149   environ.insert("LANG",langCode); //Set the proper localized language 
    150   environ.insert("MAIL","/var/mail/"+xuser); //Set the mail variable 
    151   environ.insert("GROUP",xuser); //Set the proper group id 
    152   environ.insert("SHLVL","0"); //Set the proper shell level 
    153   environ.insert("HOME",xhome); //Set the users home directory 
    154   this->setProcessEnvironment(environ); 
    155   this->setWorkingDirectory(xhome); //set the current directory to the user's home directory 
     139  setupSessionEnvironment(); 
     140   
    156141  //Log the DE startup outputs as well 
    157142  this->setStandardOutputFile(xhome+"/.pcdm-startup.log",QIODevice::Truncate); 
     
    179164} 
    180165 
     166void XProcess::setupSessionEnvironment(){ 
     167  // Setup any specialized environment variables 
     168  QProcessEnvironment environ = this->processEnvironment(); 
     169  // Get the current locale code 
     170  QLocale mylocale; 
     171  QString langCode = mylocale.name(); 
     172  if( langCode.toLower() == "c" ){} // do nothing extra to it 
     173  else if(!environ.value("MM_CHARSET").isEmpty() ){ langCode.append( "."+environ.value("MM_CHARSET") ); } 
     174  else{ langCode.append(".UTF-8"); } 
     175  // USER, HOME, and SHELL are set by the "su" login 
     176  environ.insert("LOGNAME",xuser); //Login name 
     177  environ.insert("USERNAME",xuser); // Username 
     178  environ.insert("USER",xuser); // Username 
     179  environ.insert("PATH",environ.value("PATH")+":"+xhome+"/bin"); // Append the user's home dir to the path 
     180  environ.insert("LANG",langCode); //Set the proper localized language 
     181  environ.insert("MAIL","/var/mail/"+xuser); //Set the mail variable 
     182  environ.insert("GROUP",xuser); //Set the proper group id 
     183  environ.insert("SHLVL","0"); //Set the proper shell level 
     184  environ.insert("HOME",xhome); //Set the users home directory 
     185  environ.insert("SHELL",xshell); //Set the user's default shell 
     186  this->setProcessEnvironment(environ); 
     187  this->setWorkingDirectory(xhome); //set the current directory to the user's home directory 
     188} 
    181189/* 
    182190//Start the desktop in the current process with C functions 
  • src-qt4/PCDM/src/pcdm-xprocess.h

    r999faef rb28c8d9  
    4444        int fstatus; //fork status 
    4545        pid_t fpid;  //fork pid 
    46         QString xuser, xcmd, xhome, xpwd, xde; 
     46        QString xuser, xcmd, xhome, xpwd, xde, xshell; 
    4747        bool startXSession(); 
    4848         
     49        // Session environment setup 
     50        void setupSessionEnvironment(); 
     51   
    4952        // PAM stuff and simplification functions 
    5053        pam_handle_t *pamh;  //handle for the PAM process structure 
Note: See TracChangeset for help on using the changeset viewer.