aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-session/session.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2016-12-14 21:54:31 +0000
committerWeblate <noreply@weblate.org>2016-12-14 21:54:31 +0000
commitb965af1625a4296f8ff6d3a1663cae23b73d334f (patch)
tree459685dd1da8c75f67772762aa062d80dfc148f0 /src-qt5/core/lumina-session/session.cpp
parentTranslated using Weblate (lumina_DESKTOP@fr (generated)) (diff)
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-b965af1625a4296f8ff6d3a1663cae23b73d334f.tar.gz
lumina-b965af1625a4296f8ff6d3a1663cae23b73d334f.tar.bz2
lumina-b965af1625a4296f8ff6d3a1663cae23b73d334f.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core/lumina-session/session.cpp')
-rw-r--r--src-qt5/core/lumina-session/session.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp
index 2647e58d..19acdb1c 100644
--- a/src-qt5/core/lumina-session/session.cpp
+++ b/src-qt5/core/lumina-session/session.cpp
@@ -13,7 +13,7 @@
#include <QSettings>
#include <QDir>
-#include <LuminaUtils.h>
+#include <LUtils.h>
#include <LuminaOS.h>
void LSession::stopall(){
@@ -25,7 +25,7 @@ void LSession::stopall(){
for(int i=0; i<PROCS.length(); i++){
if(PROCS[i]->state()!=QProcess::NotRunning){ PROCS[i]->terminate(); }
}
- //QCoreApplication::exit(0);
+ QCoreApplication::exit(0);
}
void LSession::procFinished(){
@@ -61,11 +61,16 @@ void LSession::startProcess(QString ID, QString command, QStringList watchfiles)
proc->setStandardOutputFile(logfile);
proc->setObjectName(ID);
if(ID=="runtime"){
- //Bypass for a hidden dbus requirement for Qt itself (Qt 5.5.1)
- QDir tmp = QDir::temp();
- if( tmp.entryList(QStringList() << "dbus-*").isEmpty() && LUtils::isValidBinary("dbus-launch")){
- command.prepend("dbus-launch --exit-with-session ");
- }
+ //Bypass for a hidden dbus file requirement for Qt itself (Qt 5.5.1+?)
+ if(!QFile::exists("/etc/machine-id") && !QFile::exists("/var/db/dbus/machine-id")){
+ if(LUtils::isValidBinary("dbus-uuidgen") && LUtils::runCmd("dbus-uuidgen --ensure") ){ } //good - the UUID was created successfully
+ else if(LUtils::isValidBinary("dbus-launch")){ command.prepend("dbus-launch --exit-with-session "); }
+ else{
+ //create a simple DBUS UUID and put it in the universal-fallback location (OS-independent)
+ // TO-DO - root vs user level permissions issue?
+ qDebug() << "Could not find '/etc/machine-id' or '/var/db/dbus/machine-id': Qt will most likely crash. \nPlease run 'dbus-uuidgen --ensure' with root permissions to generate this file if Lumina does not start properly.";
+ }
+ }
}
proc->start(command, QIODevice::ReadOnly);
connect(proc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(procFinished()) );
bgstack15