diff options
author | Ken Moore <ken@pcbsd.org> | 2015-05-13 07:25:40 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-05-13 07:25:40 -0400 |
commit | ba2a8b11c15c75149664686d54971773e165dbb8 (patch) | |
tree | a7bac8004729f3475b8396803edc83ae2cac2c48 | |
parent | Finish cleaning up the new XDG autostart write-support and enable it in lumin... (diff) | |
download | lumina-ba2a8b11c15c75149664686d54971773e165dbb8.tar.gz lumina-ba2a8b11c15c75149664686d54971773e165dbb8.tar.bz2 lumina-ba2a8b11c15c75149664686d54971773e165dbb8.zip |
Integrate the new conversion from the old "startApps" file to the new XDG autostart spec, and disable all the usage of the "startApps" files.
NOTE FOR SYSTEM ADMINS: If you have system-specific startapps files hanging around, you will need to convert them to the XDG autostart spec manually - they will NO LONGER BE USED!!!
-rw-r--r-- | lumina-desktop/LSession.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index 17434181..be144c04 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -97,7 +97,6 @@ void LSession::setupSession(){ startSystemTray(); //Launch Fluxbox - qDebug() << " - Launching Fluxbox"; if(DEBUG){ qDebug() << " - Init WM:" << timer->elapsed();} WM = new WMProcess(); WM->startWM(); @@ -220,7 +219,7 @@ void LSession::launchStartupApps(){ } //First create the list of all possible locations in order of precedence // NOTE: Lumina/system defaults should be launched earlier due to possible system admin utilities - QStringList filelist; + /*QStringList filelist; filelist << LOS::LuminaShare()+"startapps"; //anything special for the Lumina installation filelist << "/etc/luminaStartapps" << LOS::SysPrefix()+"luminaStartapps" << LOS::AppPrefix()+"luminaStartapps"; //System defaults filelist << QDir::homePath()+"/.lumina/startapps"; //User defaults @@ -246,7 +245,7 @@ void LSession::launchStartupApps(){ qDebug() << " - Starting Application:" << entries[i]; LSession::LaunchApplication(entries[i]); LSession::processEvents(); - } + }*/ //Now get any XDG startup applications and launch them QList<XDGDesktop> xdgapps = LXDG::findAutoStartFiles(); @@ -330,17 +329,23 @@ void LSession::checkUserFiles(){ if(!QFile::exists(dset) || oldversion < 5000){ if( oldversion < 5000 ){ QFile::remove(dset); qDebug() << "Current desktop settings obsolete: Re-implementing defaults"; } else{ firstrun = true; } - /*if(QFile::exists(LOS::LuminaShare()+"desktopsettings.conf")){ - if( QFile::copy(LOS::LuminaShare()+"desktopsettings.conf", dset) ){ - QFile::setPermissions(dset, QFile::ReadUser | QFile::WriteUser | QFile::ReadOwner | QFile::WriteOwner); - } - }*/ LUtils::LoadSystemDefaults(); } + //Convert the favorites framework as necessary (change occured with 0.8.4) if(newversion || newrelease){ - //Convert the favorites framework as necessary LUtils::upgradeFavorites(oldversion); } + //Convert to the XDG autostart spec as necessary (Change occured with 0.8.5) + if(QFile::exists(QDir::homePath()+"/.lumina/startapps") ){ + QStringList cmds = LUtils::readFile(QDir::homePath()+"/.lumina/startapps"); + for(int i=0; i<cmds.length(); i++){ + cmds[i] = cmds[i].remove("lumina-open").simplified(); //remove the file opener + if(cmds[i].startsWith("#") || cmds[i].isEmpty()){ continue; } //invalid line + + LXDG::setAutoStarted(true, cmds[i]); + } + QFile::remove(QDir::homePath()+"/.lumina/startapps"); //delete the old file + } //Check for the default applications file for lumina-open dset = QDir::homePath()+"/.lumina/LuminaDE/lumina-open.conf"; @@ -370,7 +375,7 @@ void LSession::checkUserFiles(){ } if(firstrun){ qDebug() << "First time using Lumina!!"; } - else if(newversion){ + else if(newversion || newrelease){ qDebug() << "Updating session file to current version"; } |