diff --git a/source/ublexec.cc b/source/ublexec.cc index 1119cf6..8f4138b 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -313,6 +313,11 @@ bool MainWindow::focus_in_txt_cmd(GdkEventFocus* event) { void MainWindow::synopsis_show() { string cmd = "xdg-open " + string(gettext("https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/")) + app_name + " &"; + if (geteuid() == 0) { + string response_user = getlogin(); + cmd = "su -l " + response_user + " -c \" DISPLAY=$DISPLAY " + cmd + " \""; + } + cout << cmd << endl; index_error = system(cmd.c_str()); } diff --git a/ublexec.glade b/ublexec.glade index b52d4cd..0690756 100644 --- a/ublexec.glade +++ b/ublexec.glade @@ -1000,7 +1000,7 @@ True False - Synopsis + Help