Начал добовлять заголовки

pull/3/head
Igor Belitskiy 3 years ago
parent 5c82addd9e
commit ec78965b21

@ -1,80 +0,0 @@
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Refusing to render service to dead parents.
Gtk-Message: 14:21:06.968: Failed to load module "colorreload-gtk-module"
Gtk-Message: 14:21:06.968: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 14:21:14.239: Failed to load module "colorreload-gtk-module"
Gtk-Message: 14:21:14.240: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 14:21:14.318: Failed to load module "colorreload-gtk-module"
Gtk-Message: 14:21:14.318: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 14:21:49.400: Failed to load module "colorreload-gtk-module"
Gtk-Message: 14:21:49.401: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 14:21:49.463: Failed to load module "colorreload-gtk-module"
Gtk-Message: 14:21:49.463: Failed to load module "window-decorations-gtk-module"
javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx
Gtk-Message: 14:22:25.948: Failed to load module "colorreload-gtk-module"
Gtk-Message: 14:22:25.949: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 14:22:41.171: Failed to load module "colorreload-gtk-module"
Gtk-Message: 14:22:41.171: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 14:22:41.236: Failed to load module "colorreload-gtk-module"
Gtk-Message: 14:22:41.237: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 14:22:50.959: Failed to load module "colorreload-gtk-module"
Gtk-Message: 14:22:50.959: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 14:22:51.022: Failed to load module "colorreload-gtk-module"
Gtk-Message: 14:22:51.023: Failed to load module "window-decorations-gtk-module"
xhost: bad hostname "superadmin"
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 109 (X_ChangeHosts)
Value in failed request: 0xa
Serial number of failed request: 7
Current serial number in output stream: 9
localuser: being added to access control list
xhost: bad hostname "superadmin"
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 109 (X_ChangeHosts)
Value in failed request: 0xa
Serial number of failed request: 7
Current serial number in output stream: 9
localuser: being added to access control list
xhost: bad hostname "superadmin"
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 109 (X_ChangeHosts)
Value in failed request: 0xa
Serial number of failed request: 7
Current serial number in output stream: 9
localuser: being added to access control list
xhost: bad hostname "superadmin"
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 109 (X_ChangeHosts)
Value in failed request: 0xa
Serial number of failed request: 7
Current serial number in output stream: 9
localuser: being added to access control list
xhost: bad hostname "superadmin"
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 109 (X_ChangeHosts)
Value in failed request: 0xa
Serial number of failed request: 7
Current serial number in output stream: 9
localuser: being added to access control list

@ -57,6 +57,7 @@ int main(int argc, char** argv)
return 0; return 0;
} }
else { else {
MainWindow* wnd = nullptr; MainWindow* wnd = nullptr;
builder->get_widget_derived("window", wnd); builder->get_widget_derived("window", wnd);
auto r = app->run(*wnd); auto r = app->run(*wnd);

@ -136,6 +136,7 @@ void MainWindow::template_apps_obj(Gtk::IconView *icon, Glib::RefPtr<Gtk::ListSt
void MainWindow::add_CSS(){ void MainWindow::add_CSS(){
Glib::RefPtr<Gtk::CssProvider> cssProvider = Gtk::CssProvider::create(); Glib::RefPtr<Gtk::CssProvider> cssProvider = Gtk::CssProvider::create();
cssProvider->load_from_path(path_css); cssProvider->load_from_path(path_css);
Glib::RefPtr<Gtk::StyleContext> styleContext = Gtk::StyleContext::create(); Glib::RefPtr<Gtk::StyleContext> styleContext = Gtk::StyleContext::create();
@ -145,6 +146,7 @@ void MainWindow::add_CSS(){
Glib::RefPtr<Gtk::StyleContext> context_lbl_head = lblInfoHead->get_style_context(); Glib::RefPtr<Gtk::StyleContext> context_lbl_head = lblInfoHead->get_style_context();
context_box->add_class("cssboxColor1"); context_box->add_class("cssboxColor1");
context_lbl_head->add_class("textHead"); context_lbl_head->add_class("textHead");
} }
void MainWindow::localization(){ void MainWindow::localization(){
@ -303,12 +305,24 @@ void MainWindow::settings(){
this->pars_dir_bin(); this->pars_dir_bin();
this->pars_users(); this->pars_users();
this->activ_or_block_execute_epriority(); this->activ_or_block_execute_epriority();
this->changed_user();
cmbUser->set_active(0); cmbUser->set_active(0);
cmbUser->set_sensitive(false); cmbUser->set_sensitive(false);
lblInfoUserName->set_sensitive(false); lblInfoUserName->set_sensitive(false);
rbPkexec->set_sensitive(false); rbPkexec->set_sensitive(false);
rbSu->set_sensitive(false); rbSu->set_sensitive(false);
rbSudo->set_sensitive(false); rbSudo->set_sensitive(false);
//Gtk::Widget *standartHead;
//Gtk::Widget *plugBox;
//Gtk::Window *window;
//Gtk::Widget *btnSave;
//builder->get_widget("standartHead",standartHead);
//builder->get_widget("plugBox",plugBox);
//builder->get_widget("window",window);
//builder->get_widget("btnSave",btnSave);
//ubl_get_standard_ui(standartHead,plugBox,btnSave,window,"ublexec.svg",gettext("Running applications as a user with a\nspecified priority"),gettext("ublexec"),0,0);
} }
void MainWindow::close_entry_app(){ void MainWindow::close_entry_app(){
this->icon_clear(); this->icon_clear();
@ -427,21 +441,17 @@ void MainWindow::start_cmd(){
//chbTerminal->set_active(true); //chbTerminal->set_active(true);
} }
if (rbPkexec->get_active()){ if (rbPkexec->get_active()){
//string user_execute = cmbUser->get_active_text();
if ((chbAnotherUser->get_active()) && (cmbUser->get_active_text().length()==0)) { if ((chbAnotherUser->get_active()) && (cmbUser->get_active_text().length()==0)) {
str_variants_root = "xhost SI:localuser:${USER}; pkexec --user ${USER} env PATH=$PATH DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY "; str_variants_root = " pkexec --user ${USER} env PATH=$PATH DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY ";
//this->tmp_desktop(user_cmd);
} }
else if (chbAnotherUser->get_active()){ else if (chbAnotherUser->get_active()){
str_variants_root = "xhost SI:localuser: "+ cmbUser->get_active_text() +"; pkexec --user " + cmbUser->get_active_text() + " env PATH=$PATH DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY "; str_variants_root = " pkexec --user " + cmbUser->get_active_text() + " env PATH=$PATH DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY ";
} }
else{ else{
str_variants_root = "xhost SI:localuser:${USER}; pkexec --user ${USER} env PATH=$PATH DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY "; str_variants_root = " pkexec --user ${USER} env PATH=$PATH DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY ";
//this->tmp_desktop(user_cmd);
//user_cmd = "/tmp/" + user_cmd + ".desktop";
} }
} }
else if (rbSu->get_active()){ else if (rbSu->get_active()){
@ -471,9 +481,6 @@ void MainWindow::start_cmd(){
str_nice_cmd = "nice -n " + to_string(spinPriority->get_value_as_int()) + " "; str_nice_cmd = "nice -n " + to_string(spinPriority->get_value_as_int()) + " ";
} }
//=========================================
//=========================================
if (user_cmd.length()==0 && name_app.length()==0 && path_file.length()==0){ if (user_cmd.length()==0 && name_app.length()==0 && path_file.length()==0){
messageError->show(); messageError->show();
return; return;
@ -487,12 +494,10 @@ void MainWindow::start_cmd(){
} }
string cmd = ""; string cmd = "";
if (path_file!=""){ if (path_file!=""){
cmd = "" + str_cmd_terminal + str_variants_root + str_nice_cmd + " xdg-open '" + path_file + "' "; cmd = str_nice_cmd + " nohup " + str_cmd_terminal + str_variants_root + " xdg-open '" + path_file + "' ";
//cmd = format_cmd(str_cmd_terminal,str_variants_root,str_nice_cmd,path_file, cmd);
} }
else if (name_app!=""){ else if (name_app!=""){
cmd = "" + str_cmd_terminal + str_variants_root + str_nice_cmd + name_app; cmd = str_nice_cmd + " nohup " + str_cmd_terminal + str_variants_root + name_app;
//cmd = format_cmd(str_cmd_terminal,str_variants_root,str_nice_cmd,path_file, cmd);
} }
else{ else{
user_cmd = this->str_remove(user_cmd, str_cmd_terminal); user_cmd = this->str_remove(user_cmd, str_cmd_terminal);
@ -500,16 +505,24 @@ void MainWindow::start_cmd(){
user_cmd = this->str_remove(user_cmd, str_nice_cmd); user_cmd = this->str_remove(user_cmd, str_nice_cmd);
string str_del = "xterm -e"; string str_del = "xterm -e";
user_cmd = this->str_remove(user_cmd, str_del); user_cmd = this->str_remove(user_cmd, str_del);
str_del = "nohup";
user_cmd = this->str_remove(user_cmd, str_del);
str_del = "pkexec --user superadmin env PATH=$PATH DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY"; str_del = "pkexec --user superadmin env PATH=$PATH DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY";
user_cmd = this->str_remove(user_cmd, str_del); user_cmd = this->str_remove(user_cmd, str_del);
string amp = " &"; str_del = " &";
user_cmd = this->str_remove(user_cmd, amp); user_cmd = this->str_remove(user_cmd, str_del);
cmd = "" + str_cmd_terminal + str_variants_root + str_nice_cmd + user_cmd; for (int index=-20; index<20; index++){
str_del = to_string(index);
user_cmd = this->str_remove(user_cmd, str_del);
}
str_del = cmbUser->get_active_text();
user_cmd = this->str_remove(user_cmd, str_del);
cmd = str_nice_cmd + " nohup " + str_cmd_terminal + str_variants_root + user_cmd ;
} }
txtCmd->set_text(cmd); txtCmd->set_text(cmd);
cmd = "nohup " + cmd + " > /dev/null 2>&1"; cmd += " > /dev/null 2>&1";
//cmd = "bash -c \" " + cmd + " \" &";
//system(cmd.c_str());
std::thread t(&me_thread, cmd); std::thread t(&me_thread, cmd);
t.detach(); t.detach();
path_file_name = ""; path_file_name = "";

@ -10,4 +10,5 @@ Type=Application
Exec=ublexec Exec=ublexec
Icon=ublexec Icon=ublexec
Terminal=false Terminal=false
Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings; X-XfcePluggable=true
Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;X-UBL-SettingsManager;X-UBL-SystemSettings;

@ -470,14 +470,124 @@
<property name="margin-bottom">6</property> <property name="margin-bottom">6</property>
<property name="stock">gtk-media-play</property> <property name="stock">gtk-media-play</property>
</object> </object>
<object class="GtkMessageDialog" id="messageError">
<property name="can-focus">False</property>
<property name="title" translatable="yes">Внимание!</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="homogeneous">True</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="btnMessageErrorOk">
<property name="label" translatable="yes">ОК</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblMessageError">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">10</property>
<property name="margin-right">10</property>
<property name="margin-bottom">15</property>
<property name="label" translatable="yes">Select an executable file or program</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkWindow" id="window"> <object class="GtkWindow" id="window">
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="title" translatable="yes">Выполнить</property> <property name="title" translatable="yes">UBConfig - ubexec</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="boxColor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="pixel-size">69</property>
<property name="icon-name">ublexec</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblInfoHead">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes">Running applications as a user with a
specified priority</property>
<attributes>
<attribute name="font-desc" value="URW Gothic Semi-Bold 10"/>
<attribute name="foreground" value="#000023233232"/>
<attribute name="size" value="15360"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child> <child>
<object class="GtkBox" id="plugBox"> <object class="GtkBox" id="plugBox">
<property name="visible">True</property> <property name="visible">True</property>
@ -488,61 +598,6 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="boxColor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="pixel-size">69</property>
<property name="icon-name">ublexec</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblInfoHead">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes">Running applications as a user with a
specified priority</property>
<attributes>
<attribute name="font-desc" value="URW Gothic Semi-Bold 10"/>
<attribute name="foreground" value="#000023233232"/>
<attribute name="size" value="15360"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
@ -616,6 +671,8 @@ specified priority</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<property name="halign">end</property> <property name="halign">end</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="margin-top">6</property> <property name="margin-top">6</property>
@ -1025,7 +1082,7 @@ specified priority</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="margin-top">6</property> <property name="margin-top">6</property>
<property name="margin-bottom">6</property> <property name="margin-bottom">6</property>
<property name="label" translatable="yes" context="Time" comments="Time">Priority:</property> <property name="label" translatable="yes" context="Time" comments="Time">Priority</property>
<property name="wrap">True</property> <property name="wrap">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
</object> </object>
@ -1224,61 +1281,6 @@ specified priority</property>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkMessageDialog" id="messageError">
<property name="can-focus">False</property>
<property name="title" translatable="yes">Внимание!</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="homogeneous">True</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="btnMessageErrorOk">
<property name="label" translatable="yes">ОК</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblMessageError">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">10</property>
<property name="margin-right">10</property>
<property name="margin-bottom">15</property>
<property name="label" translatable="yes">Select an executable file or program</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property> <property name="position">2</property>
</packing> </packing>
</child> </child>

Loading…
Cancel
Save