I am running Ubuntu 13.04, Gnome 3.6.
There is something amiss with pkexec that is not allowing it to start any gui application.
pkexec synaptic
in a zsh
terminal produces a box asking for admin password. On entering the correct password, it shows:
No protocol specified
** (synaptic:6053): WARNING **: Could not open X display
No protocol specified
(synaptic:6053): Gtk-WARNING **: cannot open display: :0
The result is the same if I replace synaptic
with nautilus
or run synaptic-pkexec
. From the same terminal, both the applications run correctly (a box asking for a password followed by the application launching) when launched as gksu nautilus
or gksu synaptic
However, pkexec ls /
produces the box asking for password and on entering the password, it displays the listing in the terminal.
The contents of /usr/share/polkit-1/actions/com.ubuntu.pkexec.synaptic.policy
are:
<?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>
<action id="com.ubuntu.pkexec.synaptic">
<message>Authentication is required to run the Synaptic Package Manager</message>
<message xml:lang="ru">Для запуска менеджера пакетов Synaptic требуется аутентификация</message>
<icon_name>synaptic</icon_name>
<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/sbin/synaptic</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>%
What is happening? How do I set it right?
Also, a sad thing, a crucial piece of software like pkexec misbehaves!
/usr/share/polkit-1/actions/com.ubuntu.pkexec.synaptic.policy
and it is very similar to the file mentioned in that question/usr/share/polkit-1/actions/com.ubuntu.pkexec.synaptic.policy
with contents similar to the ones you have mentioned in the earlier reply, synaptic would work. The file does exist in my system. The file does contain statements including<action id="com.ubuntu.pkexec.synaptic">
, ` <allow_any>auth_admin</allow_any>,
<allow_inactive>auth_admin</allow_inactive>` and<allow_active>auth_admin</allow_active>
and the annotate key. So, unless there is something else I need to do, the problem remains even after following the steps --- I can't use synaptic.