diff --git a/Makefile b/Makefile
index 494a4fd..69aebbf 100644
--- a/Makefile
+++ b/Makefile
@@ -95,19 +95,20 @@ install: check uninstall
echo $${FILE_PO}; \
msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \
done
-# @for SIZE in 16 32 48; do \
+ @for SIZE in 16 32 48; do \
install -dm755 /usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps; \
rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data ${PKGNAME}.svg -o "/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/${PKGNAME}.svg"; \
done
@install -dm755 /usr/share/icons/hicolor/scalable/apps
-# @install -Dm644 -t /usr/share/icons/hicolor/scalable/apps/ ${PKGNAME}.svg
+ @install -Dm644 -t /usr/share/icons/hicolor/scalable/apps/ ${PKGNAME}.svg
@install -Dm755 -t /usr/bin/ ${CMAKE_BUILD_DIR}/${PKGNAME}
@install -Dm644 -t /usr/share/applications/ ${PKGNAME}.desktop
@install -Dm644 -t /usr/share/polkit-1/actions/ org.ublinux.pkexec.${PKGNAME}.exec.policy
@install -dm755 /usr/share/${PKGNAME}/{ui,css,images}
@install -Dm644 -t /usr/share/${PKGNAME}/ui/ ${PKGNAME}.glade
@install -Dm644 -t /usr/share/${PKGNAME}/css/ style.css
-# @install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.svg
+ @install -Dm644 -t /usr/share/${PKGNAME}/images/ bg_top.png
+ @install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.svg
# @install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.png
@gtk-update-icon-cache -fiq /usr/share/icons/hicolor/
@update-desktop-database --quiet 2>/dev/null
diff --git a/bg_top.png b/bg_top.png
new file mode 100644
index 0000000..d673a36
Binary files /dev/null and b/bg_top.png differ
diff --git a/source/main.cc b/source/main.cc
index 74a37dc..0f9293c 100644
--- a/source/main.cc
+++ b/source/main.cc
@@ -43,7 +43,7 @@ int main(int argc, char** argv)
str_cmd_argv+= to_string(*argv[i]) + " ";
}
if (geteuid()!=0){
- string cmd = "pkexec " + app_name + " " + str_cmd_argv ;
+ string cmd = "pkexec " + app_name + " " + str_cmd_argv;
system(cmd.c_str());
return 0;
}
diff --git a/source/ublexec.cc b/source/ublexec.cc
index 522a1e3..09e7732 100644
--- a/source/ublexec.cc
+++ b/source/ublexec.cc
@@ -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="";
}
@@ -345,18 +353,21 @@ void MainWindow::pars_dir_bin(){
}
void MainWindow::pars_users(){
while (true) {
- errno = 0; // so we can distinguish errors from no more entries
- passwd* entry = getpwent();
- if (!entry) {
- if (errno) {
+ errno = 0; // so we can distinguish errors from no more entries
+ passwd* entry = getpwent();
+ if (!entry) {
+ if (errno) {
+ break;
+ }
break;
}
- break;
- }
- if (entry->pw_uid>=1000 && entry->pw_uid!=65534){
- cmbUser->append(entry->pw_name);
- }
+
+ if (entry->pw_uid>=1000 && entry->pw_uid!=65534){
+ cmbUser->append(entry->pw_name);
+ }
}
+
+ cmbUser->append("root");
endpwent();
}
void MainWindow::pars_apps(){
diff --git a/style.css b/style.css
index f3bdf4e..5496feb 100644
--- a/style.css
+++ b/style.css
@@ -1,4 +1,3 @@
.cssboxColor1{
- background-color: rgb(255, 255, 255);
- background-size: 100% auto;
+ background: url("/usr/share/ublexec/images/bg_top.png") no-repeat;
}
\ No newline at end of file
diff --git a/ublexec.glade b/ublexec.glade
index 552ef51..768ed98 100644
--- a/ublexec.glade
+++ b/ublexec.glade
@@ -152,8 +152,8 @@
5
6
6
- 80
- application-x-executable
+ 69
+ ublexec
False
@@ -173,6 +173,8 @@
6
Запуск приложений от имени пользователя с указанным приоритетом
+
+
diff --git a/ublexec.svg b/ublexec.svg
new file mode 100644
index 0000000..0ec751a
--- /dev/null
+++ b/ublexec.svg
@@ -0,0 +1,5680 @@
+
+