Fixed pkexec launching

pull/11/head
parent f018bc5d2c
commit 1403282c55

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>UBLinux</vendor>
<vendor_url>https://ublinux.ru</vendor_url>
<action id="org.freedesktop.policykit.ubl-settings-video.pkexec.policy.run">
<description>Run "ubl-settings-video" as root</description>
<description xml:lang="ru">Запуск утилиты "ubl-settings-video" с правами root</description>
<message>Authentication is required to run "ubl-settings-video"</message>
<message xml:lang="ru">Требуется авторизация для запуска утилиты "ubl-settings-video" с правами root</message>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/ubl-settings-video</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

@ -1550,8 +1550,8 @@ int main(int argc, char *argv[])
}
if (getuid()!=0){
system("/usr/bin/pkexec /usr/bin/ubl-settings-video");
exit(0);
system("/usr/bin/pkexec ubl-settings-video");
return 0;
} else {
gtk_init(&argc, &argv);
GError error;

Loading…
Cancel
Save