diff options
Diffstat (limited to 'src/xsession.cpp')
-rw-r--r-- | src/xsession.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xsession.cpp b/src/xsession.cpp index 5db3b11..dcc9d22 100644 --- a/src/xsession.cpp +++ b/src/xsession.cpp @@ -128,7 +128,7 @@ QString XSession::checkCanRunInternal() const { if (fi.isFile() && fi.isExecutable()) return QString(); // Not found - return QObject::trUtf8("Binary %1 not found.").arg(exe); + return QObject::tr("Binary %1 not found.").arg(exe); } bool XSession::isLocked() const { @@ -175,8 +175,9 @@ void XSession::run() const { command += exec_; qDebug() << "Running via /bin/sh:" << command; QByteArray cmdbin = command.toUtf8(); - char *argv[4] = { "/bin/sh", "-c", cmdbin.data(), nullptr }; + char * const argv[4] = { strdup("/bin/sh"), strdup("-c"), cmdbin.data(), nullptr }; execv("/bin/sh", argv); + // Caller will show error on failure to exec } int XSession::type() const { |