Ignore:
Timestamp:
07/11/13 14:28:19 (18 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, releng/10.1
Children:
ed51bc3
Parents:
8679296
Message:

Completely revamp how PCDM uses the previous login information. Now you no longer need to specify which desktop to auto-login to if you have auto-login selected. It will first try to check for previous login information for that user, then fall back on the last login for the system in order to try and auto login. Also fix the PCDMd script a bit so that autologins work properly when triggered.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/PCDM/src/main.cpp

    r39fe8b0 r90dc161  
    4242  // Load the configuration file 
    4343  QString confFile = "/usr/local/etc/pcdm.conf"; 
    44   if(!QFile::exists(confFile)){ confFile = ":samples/pcdm.conf"; } 
     44  if(!QFile::exists(confFile)){  
     45    qDebug() << "PCDM: Configuration file missing:"<<confFile<<"\n  - Using default configuration"; 
     46    confFile = ":samples/pcdm.conf";  
     47  } 
     48   
    4549  Config::loadConfigFile(confFile); 
    4650  //qDebug() << "Config File Loaded:" << QString::number(clock.elapsed())+" ms"; 
     
    6165  //*** STARTUP THE PROGRAM *** 
    6266  bool goodAL = FALSE; //Flag for whether the autologin was successful 
    63    
    6467  // Start the autologin procedure if applicable 
    6568  if( ALtriggered && Config::useAutoLogin() ){ 
    6669    //Setup the Auto Login 
    6770    QString user = Backend::getALUsername(); 
    68     QString dcmd = Backend::getALDesktopCmd(); 
    6971    QString pwd = Backend::getALPassword(); 
    70     if( user.isEmpty() || dcmd.isEmpty() ){ 
     72    QString dsk = Backend::getLastDE(user); 
     73    if( user.isEmpty() || dsk.isEmpty() ){ 
    7174         goodAL=FALSE;    
    7275    }else{ 
    73         desktop.loginToXSession(user,pwd, Backend::getUserHomeDir(user), dcmd); 
     76        desktop.loginToXSession(user,pwd, Backend::getUserHomeDir(user), dsk); 
    7477        splash.close(); 
    7578        if(desktop.isRunning()){ 
Note: See TracChangeset for help on using the changeset viewer.