aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-12-01 15:40:59 -0500
committerKen Moore <ken@ixsystems.com>2016-12-01 15:40:59 -0500
commita78098bec6289f4d242bc132205866dbdd73eb24 (patch)
tree69d635ed9096acaf2266d2c3ae7418353d8b8ac7 /src-qt5
parentFix up the non-selection extraction of an archive. (empty "name" field messed... (diff)
downloadlumina-a78098bec6289f4d242bc132205866dbdd73eb24.tar.gz
lumina-a78098bec6289f4d242bc132205866dbdd73eb24.tar.bz2
lumina-a78098bec6289f4d242bc132205866dbdd73eb24.zip
Adjust the Qt-crash workaround a bit to try and avoid starting a dbus session if possible.
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-session/session.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp
index 10953f12..19acdb1c 100644
--- a/src-qt5/core/lumina-session/session.cpp
+++ b/src-qt5/core/lumina-session/session.cpp
@@ -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