diff options
author | Weblate <noreply@weblate.org> | 2017-08-08 14:02:53 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2017-08-08 14:02:53 +0000 |
commit | 14d8f4b141662da786a2b5d1b3adf6d1521a641f (patch) | |
tree | 82bde1b2363c6d727ca2ea7df8f8695aa8e3686c /src-qt5/core/lumina-session/main.cpp | |
parent | Translated using Weblate (Lithuanian) (diff) | |
parent | Translated using Weblate (Lithuanian) (diff) | |
download | lumina-14d8f4b141662da786a2b5d1b3adf6d1521a641f.tar.gz lumina-14d8f4b141662da786a2b5d1b3adf6d1521a641f.tar.bz2 lumina-14d8f4b141662da786a2b5d1b3adf6d1521a641f.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); } |