!347 回退 'Pull Request !344 : 修复无法弹出ACE提示的问题'

Merge pull request !347 from shenmo/revert-merge-344-Reason
This commit is contained in:
shenmo 2025-06-14 08:36:30 +00:00 committed by Gitee
commit 0a32245f63
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 4 deletions

View File

@ -177,12 +177,13 @@ void DownloadItem::slotAsyncInstall(int t)
case 0: case 0:
{ {
QStringList args; QStringList args;
args << "/tmp/spark-store/" + ui->label_filename->text().toUtf8(); args << "/usr/local/bin/ssinstall"
<< "/tmp/spark-store/" + ui->label_filename->text().toUtf8();
if (!installExtraArg.isEmpty()) { if (!installExtraArg.isEmpty()) {
args << installExtraArg; args << installExtraArg;
} }
args << "--delete-after-install"; args << "--delete-after-install";
installer.start("/usr/local/bin/ssinstall", args); installer.start("pkexec", args);
} }
break; break;
case 1: case 1:

View File

@ -128,8 +128,9 @@ function parse_args() {
# 验证当前用户 # 验证当前用户
function validate_user() { function validate_user() {
if [ "$(id -u)" != "0" ]; then if [ "$(id -u)" != "0" ]; then
pkexec DISPLAY=$DISPLAY "$0" "$@" echo "${TRANSHELL_CONTENT_PLEASE_RUN_AS_ROOT}"
exit $? echo "OMG-IT-GOES-WRONG"
exit 1
fi fi
} }