From c93f047056841ab08282cc0d736230d9227f8d1e Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 12 Sep 2024 03:06:08 +0400 Subject: [PATCH] Add run0 support --- Telegram/SourceFiles/platform/linux/launcher_linux.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp index 9afde3b19..008910300 100644 --- a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp @@ -49,7 +49,9 @@ bool Launcher::launchUpdater(UpdaterLaunch action) { const auto launching = justRelaunch ? (cExeDir() + cExeName()) : cWriteProtected() - ? u"pkexec"_q + ? GLib::find_program_in_path("run0") + ? u"run0"_q + : u"pkexec"_q : (cExeDir() + u"Updater"_q); argumentsList.push_back(launching.toStdString()); @@ -61,7 +63,7 @@ bool Launcher::launchUpdater(UpdaterLaunch action) { : launching; argumentsList.push_back(argv0.toStdString()); } else if (cWriteProtected()) { - // Elevated process that pkexec should launch. + // Elevated process that run0/pkexec should launch. const auto elevated = cWorkingDir() + u"tupdates/temp/Updater"_q; argumentsList.push_back(elevated.toStdString()); }