3

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!

9
  • Check if this answers your question: askubuntu.com/a/313909/33871
    – Salem
    Sep 4, 2013 at 13:40
  • 1
    @Salem, I had visited that thread before posting this question. The discussion there is too complex and does not mention a way out of my problem. Just to clarify, I have /usr/share/polkit-1/actions/com.ubuntu.pkexec.synaptic.policy and it is very similar to the file mentioned in that question
    – deshmukh
    Sep 4, 2013 at 15:40
  • So even after following those steps you can't use Synaptic? Or you have a different problem (why that happens and how to solve it(partially) is answered there)? Don't pay much attention to the "pkexec vs anything" discussion: I also don't understand much of it :)
    – Salem
    Sep 4, 2013 at 16:14
  • @Salem I thought if there is a file /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.
    – deshmukh
    Sep 4, 2013 at 17:41
  • 1
    2 years later and still no answer? Tsss…
    – e-sushi
    Apr 19, 2015 at 9:30

0

You must log in to answer this question.

Browse other questions tagged .