aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-08-05 08:08:05 -0400
committerKen Moore <ken@ixsystems.com>2017-08-05 08:08:05 -0400
commit4eb7d167f89c87e72da02490d073a522e7db978a (patch)
treecc510b92a845678454471dc22e54f982534154c6 /src-qt5
parentUpdated the list of includes for Lumina 2 (diff)
downloadlumina-4eb7d167f89c87e72da02490d073a522e7db978a.tar.gz
lumina-4eb7d167f89c87e72da02490d073a522e7db978a.tar.bz2
lumina-4eb7d167f89c87e72da02490d073a522e7db978a.zip
Have the X11 init display number auto-detect now (starting with 0).
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-session/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src-qt5/core/lumina-session/main.cpp b/src-qt5/core/lumina-session/main.cpp
index 3696ed20..f26641c8 100644
--- a/src-qt5/core/lumina-session/main.cpp
+++ b/src-qt5/core/lumina-session/main.cpp
@@ -21,6 +21,11 @@
#include <unistd.h>
#define DEBUG 0
+int findAvailableSession(){
+ int num = 0;
+ while(!QFile::exists("/tmp/.X11-unix/X"+QString::number(num))){ num++; }
+ return num;
+}
int main(int argc, char ** argv)
{
@@ -45,7 +50,7 @@ int main(int argc, char ** argv)
QString prog = QString(argv[0]).section("/",-1);
LUtils::isValidBinary(prog); //will adjust the path to be absolute
if(unified){ prog = prog+" --unified"; }
- QStringList args; args << prog;
+ QStringList args; args << prog << "--" << ":"+QString::number(findAvailableSession());
//if(LUtils::isValidBinary("x11vnc")){ args << "--" << "-listen" << "tcp"; } //need to be able to VNC into this session
return QProcess::execute("xinit", args);
}
bgstack15