From e936a3b2219685c7343ed753fa875358d3ef8a37 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Tue, 7 Mar 2023 12:08:21 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B4=D1=8B=D1=80=D0=B0=20=D0=B2=20=D0=B1?= =?UTF-8?q?=D0=B5=D0=B7=D0=BE=D0=BF=D0=B0=D1=81=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B8=20=E2=84=968?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ublexec.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/ublexec.cc b/source/ublexec.cc index fb7837c..fcdd503 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -324,7 +324,6 @@ void MainWindow::unselect_icon(Gtk::IconView *icon_entry){ } void MainWindow::settings(){ - system("nohup xhost + local: > /dev/null 2>&1 &"); this->pars_apps(); this->get_builder(); this->event(); @@ -506,6 +505,11 @@ string MainWindow::start_cmd(string user_cmd){ } } } + if (cmbUser->get_active_text().length()!=0){ + string user_cmd_X = "xhost +SI:localuser:"; + user_cmd_X += cmbUser->get_active_text(); + system(user_cmd_X.c_str()); + } if ((cbxExecuteEpriority->get_active()) && (chbAnotherUser->get_active()==false)){ str_nice_cmd = " nice -n " + to_string(spinPriority->get_value_as_int()) + " "; }