aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-session/main.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-08-07 15:58:22 +0000
committerWeblate <noreply@weblate.org>2017-08-07 15:58:22 +0000
commit1a320d85b86593fb7716eea493df39e339bbae77 (patch)
tree33a44e00ac33f4c0d558e40e173472cb7ada624f /src-qt5/core/lumina-session/main.cpp
parentTranslated using Weblate (French) (diff)
parentTranslated using Weblate (Catalan) (diff)
downloadlumina-1a320d85b86593fb7716eea493df39e339bbae77.tar.gz
lumina-1a320d85b86593fb7716eea493df39e339bbae77.tar.bz2
lumina-1a320d85b86593fb7716eea493df39e339bbae77.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.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..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);
}
bgstack15