From 4a9086614543208c1860e4dc3316d9afb43587cf Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Thu, 2 Mar 2023 12:15:06 +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=D1=8B=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D1=8B?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA=D0=B0,=20=D0=B8=D1=81?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=20=D0=B4=D0=B8=D0=B7?= =?UTF-8?q?=D0=B0=D0=B9=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ublexec.cc | 9 +- ublexec.glade | 683 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 485 insertions(+), 207 deletions(-) diff --git a/source/ublexec.cc b/source/ublexec.cc index 6f681cb..01d53a3 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -278,6 +278,7 @@ 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(); @@ -451,7 +452,12 @@ void MainWindow::start_cmd(){ } else if (rbSudo->get_active()){ chbTerminal->set_active(true); - str_variants_root="sudo -u " + cmbUser->get_active_text() + " "; + if (getlogin()==cmbUser->get_active_text()){ + str_variants_root="sudo "; + } + else{ + str_variants_root="sudo -u " + cmbUser->get_active_text() + " "; + } if (cbxExecuteEpriority->get_active()){ str_variants_root += " nice -n " + to_string(spinPriority->get_value_as_int()) + " "; } @@ -508,6 +514,7 @@ void MainWindow::start_cmd(){ path_file_name = ""; path_file = ""; name_app = ""; + } void me_thread(string cmd){ diff --git a/ublexec.glade b/ublexec.glade index ddd1e1f..3eff964 100644 --- a/ublexec.glade +++ b/ublexec.glade @@ -108,27 +108,54 @@ True True - + True - True - 1 - horizontal - 120 - 1 + False - - - 5 - 5 - 2 - + + True + False + 7 + 7 + 7 + 7 + + + False + True + 0 + - - - 4 - 5 - + + True + True + 1 + horizontal + 1 + 120 + 1 + + + + 5 + 5 + 2 + + + + + + 4 + 5 + + + + + False + True + 1 + @@ -151,32 +178,59 @@ True True - + True - True - 1 - queue - horizontal - 120 - 1 + False - - - 5 - 5 - 2 - + + True + False + 7 + 7 + 7 + 7 + + + False + True + 0 + - - - 5 - 4 - + + True + True + 1 + queue + horizontal + 1 + 120 + 1 + + + + 5 + 5 + 2 + + + + + + 5 + 4 + + + + + + False + True + 1 + - @@ -197,33 +251,61 @@ True True + 1 - + True - True - 1 - queue - horizontal - 120 - 1 + False - - - 5 - 5 - 2 - + + True + False + 7 + 7 + 7 + 7 + + + False + True + 0 + - - - 5 - 4 - + + True + True + 1 + queue + horizontal + 1 + 120 + 1 + + + + 5 + 5 + 2 + + + + + + 5 + 4 + + + + + + False + True + 1 + - @@ -245,32 +327,59 @@ True True - + True - True - 1 - queue - horizontal - 120 - 1 + False - - - 5 - 5 - 2 - + + True + False + 7 + 7 + 7 + 7 + + + False + True + 0 + - - - 5 - 4 - + + True + True + 1 + queue + horizontal + 1 + 120 + 1 + + + + 5 + 5 + 2 + + + + + + 5 + 4 + + + + + + False + True + 1 + - @@ -292,32 +401,59 @@ True True - + True - True - 1 - queue - horizontal - 120 - 1 + False - - - 5 - 5 - 2 - + + True + False + 7 + 7 + 7 + 7 + + + False + True + 0 + - - - 5 - 4 - + + True + True + 1 + queue + horizontal + 1 + 120 + 1 + + + + 5 + 5 + 2 + + + + + + 5 + 4 + + + + + + False + True + 1 + - @@ -339,32 +475,59 @@ True True - + True - True - 0 - queue - horizontal - 120 - 1 + False - - - 5 - 5 - 2 - + + True + False + 7 + 7 + 7 + 7 + + + False + True + 0 + - - - 5 - 4 - + + True + True + 6 + queue + horizontal + 1 + 120 + 1 + + + + 5 + 5 + 2 + + + + + + 5 + 4 + + + + + + False + True + 1 + - @@ -386,32 +549,59 @@ True True - + True - True - 1 - queue - horizontal - 120 - 1 + False - - - 5 - 5 - 2 - + + True + False + 7 + 7 + 7 + 7 + + + False + True + 0 + - - - 5 - 4 - + + True + True + 1 + queue + horizontal + 1 + 120 + 1 + + + + 5 + 5 + 2 + + + + + + 5 + 4 + + + + + + False + True + 1 + - @@ -433,32 +623,59 @@ True True - + True - True - 1 - queue - horizontal - 120 - 1 + False - - - 5 - 5 - 2 - + + True + False + 7 + 7 + 7 + 7 + + + False + True + 0 + - - - 5 - 4 - + + True + True + 1 + queue + horizontal + 1 + 120 + 1 + + + + 5 + 5 + 2 + + + + + + 5 + 4 + + + + + + False + True + 1 + - @@ -480,32 +697,59 @@ True True - + True - True - 1 - queue - horizontal - 120 - 1 + False - - - 5 - 5 - 2 - + + True + False + 7 + 7 + 7 + 7 + + + False + True + 0 + - - - 5 - 4 - + + True + True + 1 + queue + horizontal + 1 + 120 + 1 + + + + 5 + 5 + 2 + + + + + + 5 + 4 + + + + + + False + True + 1 + - @@ -527,32 +771,59 @@ True True - + True - True - 1 - queue - horizontal - 120 - 1 + False - - - 5 - 5 - 2 - + + True + False + 7 + 7 + 7 + 7 + + + False + True + 0 + - - - 5 - 4 - + + True + True + 1 + queue + horizontal + 1 + 120 + 1 + + + + 5 + 5 + 2 + + + + + + 5 + 4 + + + + + + False + True + 1 + -