diff options
author | Simon Rettberg | 2016-09-01 11:53:11 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-09-01 11:53:11 +0200 |
commit | 23a4a1a0a7d0f793633f2e89d53b2e3d449773df (patch) | |
tree | 171f14ed0cbe2a36e22482cb977cd82fbb1094d6 | |
parent | Cleanup: Remove execCommand from vsession, add newslines around methods (diff) | |
download | vmchooser2-23a4a1a0a7d0f793633f2e89d53b2e3d449773df.tar.gz vmchooser2-23a4a1a0a7d0f793633f2e89d53b2e3d449773df.tar.xz vmchooser2-23a4a1a0a7d0f793633f2e89d53b2e3d449773df.zip |
Pass lecture uuid as SESSION_UUID if applicable
-rw-r--r-- | src/dialog.cpp | 4 | ||||
-rw-r--r-- | src/session.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp index c7a85e0..5fa990c 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -118,12 +118,12 @@ void Dialog::on_treeView_doubleClicked(const QModelIndex& index) setenv("PVS_AUTO_CONNECT", "FALSE", 1); // export session information to the environment of the process to be exec'ed setenv("SESSION_NAME", s->shortDescription().toUtf8(), 1); + setenv("SESSION_UUID", s->uuid().toUtf8(), 1); + setenv("SESSION_CMD", s->execCommand().toUtf8(), 1); if (s->type() == Session::VSESSION) { setenv("SESSION_TYPE", "VSESSION", 1); - setenv("SESSION_CMD", "", 1); } else if (s->type() == Session::XSESSION) { setenv("SESSION_TYPE", "XSESSION", 1); - setenv("SESSION_CMD", s->execCommand().toUtf8(), 1); } // Fork this process twice to detach pid_t pid = fork(); diff --git a/src/session.h b/src/session.h index 0d2ab10..ec7ae7a 100644 --- a/src/session.h +++ b/src/session.h @@ -27,6 +27,7 @@ class Session { virtual QIcon icon() const = 0; virtual bool run() const = 0; virtual QString execCommand() const { return QString(); } + virtual QString uuid() const { return QString(); } virtual int type() const = 0; virtual SectionType section() const = 0; virtual bool is64Bit() const { return false; } |