From 4eb7d167f89c87e72da02490d073a522e7db978a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Sat, 5 Aug 2017 08:08:05 -0400 Subject: Have the X11 init display number auto-detect now (starting with 0). --- src-qt5/core/lumina-session/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/lumina-session/main.cpp') 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 #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); } -- cgit From c55d13f9f07d6f9486343b1a3aac71cb62f58c36 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Sat, 5 Aug 2017 08:23:05 -0400 Subject: Make sure the "start-lumina-desktop" routine will detect/adjust the X11 Display on demand --- src-qt5/core/lumina-session/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core/lumina-session/main.cpp') diff --git a/src-qt5/core/lumina-session/main.cpp b/src-qt5/core/lumina-session/main.cpp index f26641c8..71244a8b 100644 --- a/src-qt5/core/lumina-session/main.cpp +++ b/src-qt5/core/lumina-session/main.cpp @@ -23,7 +23,7 @@ #define DEBUG 0 int findAvailableSession(){ int num = 0; - while(!QFile::exists("/tmp/.X11-unix/X"+QString::number(num))){ num++; } + while(QFile::exists("/tmp/.X11-unix/X"+QString::number(num))){ num++; } return num; } -- cgit