|
|
|
|
@ -191,6 +191,7 @@ void MainWindow::get_path_filemaneg(){
|
|
|
|
|
path_file_name = wndChooseFileWallpaper->get_filename();
|
|
|
|
|
if (path_file_name.length()==0){}
|
|
|
|
|
else{
|
|
|
|
|
txtCmd->set_text(path_file_name);
|
|
|
|
|
this->close_filemaneg();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -204,7 +205,7 @@ void MainWindow::open_list_app(){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void MainWindow::start_cmd(){
|
|
|
|
|
txtCmd->set_text("");
|
|
|
|
|
//txtCmd->set_text("");
|
|
|
|
|
string str_cmd_terminal="";
|
|
|
|
|
string str_variants_root = "";
|
|
|
|
|
string str_nice_cmd = "";
|
|
|
|
|
@ -268,17 +269,24 @@ void MainWindow::start_cmd(){
|
|
|
|
|
str_nice_cmd = "nice -n " + to_string(spinPriority->get_value_as_int()) + " ";
|
|
|
|
|
}
|
|
|
|
|
//=========================================
|
|
|
|
|
|
|
|
|
|
string user_cmd = txtCmd->get_text();
|
|
|
|
|
//=========================================
|
|
|
|
|
if (user_cmd.length()==0){
|
|
|
|
|
messageError->show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (chbTerminal->get_active()){
|
|
|
|
|
str_cmd_terminal=" xterm -e ";
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
str_cmd_terminal="";
|
|
|
|
|
}
|
|
|
|
|
//=========================================
|
|
|
|
|
if (path_file_name.length()==0){
|
|
|
|
|
messageError->show();
|
|
|
|
|
}
|
|
|
|
|
txtCmd->set_text(str_cmd_terminal + str_variants_root + str_nice_cmd);
|
|
|
|
|
string cmd = "";
|
|
|
|
|
cmd = "" + str_cmd_terminal + str_variants_root + str_nice_cmd + user_cmd + " &";
|
|
|
|
|
cout << cmd << endl;
|
|
|
|
|
txtCmd->set_text(cmd);
|
|
|
|
|
system(cmd.c_str());
|
|
|
|
|
|
|
|
|
|
path_file_name="";
|
|
|
|
|
}
|
|
|
|
|
@ -353,10 +361,13 @@ void MainWindow::pars_users(){
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (entry->pw_uid>=1000 && entry->pw_uid!=65534){
|
|
|
|
|
cmbUser->append(entry->pw_name);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cmbUser->append("root");
|
|
|
|
|
endpwent();
|
|
|
|
|
}
|
|
|
|
|
void MainWindow::pars_apps(){
|
|
|
|
|
|