diff options
author | Weblate <noreply@weblate.org> | 2017-08-06 00:02:16 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2017-08-06 00:02:16 +0000 |
commit | b1df5e55259c76e6ca963cf0af25e20ee4a1897d (patch) | |
tree | 770cbcbc98cc24416d43282ca7f37c1a3cd7309a /src-qt5/core/lumina-session/main.cpp | |
parent | Translated using Weblate (French) (diff) | |
parent | Make sure the "start-lumina-desktop" routine will detect/adjust the X11 Displ... (diff) | |
download | lumina-b1df5e55259c76e6ca963cf0af25e20ee4a1897d.tar.gz lumina-b1df5e55259c76e6ca963cf0af25e20ee4a1897d.tar.bz2 lumina-b1df5e55259c76e6ca963cf0af25e20ee4a1897d.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-session/main.cpp')
-rw-r--r-- | src-qt5/core/lumina-session/main.cpp | 7 |
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..71244a8b 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); } |