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()) + " "; }