diff options
author | Ken Moore <moorekou@gmail.com> | 2016-06-20 15:09:36 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-06-20 15:09:36 -0400 |
commit | bd64f38c689f6cb779d9ea6442964095d6db9037 (patch) | |
tree | 95b6b20dcb5276fbeddbe55aa148e12b0b7671f6 /src-qt5 | |
parent | Syncronize the pcbsd/lumina default settings. (diff) | |
download | lumina-bd64f38c689f6cb779d9ea6442964095d6db9037.tar.gz lumina-bd64f38c689f6cb779d9ea6442964095d6db9037.tar.bz2 lumina-bd64f38c689f6cb779d9ea6442964095d6db9037.zip |
Setup a recursive xinit call within the start-lumina-desktop binary as needed. This should detect if an X session is already active, and startup X if not.
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/lumina-session/main.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src-qt5/core/lumina-session/main.cpp b/src-qt5/core/lumina-session/main.cpp index 27eaf537..464302a7 100644 --- a/src-qt5/core/lumina-session/main.cpp +++ b/src-qt5/core/lumina-session/main.cpp @@ -29,6 +29,14 @@ int main(int argc, char ** argv) qDebug() << "Lumina does not appear to be installed correctly. Cannot find: " << LOS::LuminaShare(); return 1; } + //Start X11 if needed + QString disp = QString(getenv("DISPLAY")).simplified(); + if(disp.isEmpty()){ + //No X session found. Go ahead and re-init this binary within an xinit call + QStringList args; args << QCoreApplication::applicationFilePath(); + if(LUtils::isValidBinary("x11vnc")){ args << "--" << "-listen" << "tcp"; } //need to be able to VNC into this session + return QProcess::execute("xinit", args); + } //Setup any initialization values LTHEME::LoadCustomEnvSettings(); LXDG::setEnvironmentVars(); @@ -37,7 +45,7 @@ int main(int argc, char ** argv) unsetenv("QT_QPA_PLATFORMTHEME"); //causes issues with Lumina themes - not many people have this by default... //Check for any missing user config files - //Start X11 if needed + //Configure X11 monitors if needed if(LUtils::isValidBinary("lumina-xconfig")){ |