[PLUG] Synaptic won't launch from menu

Ben Koenig techkoenig at gmail.com
Wed Sep 18 01:24:53 UTC 2019


TL;DR version..

We're seeing an error with the command used by the synaptic launcher on
ubuntu. It's calling "synaptic-pkexec", and fails. Running "synaptic" seems
to work fine, as usual.

since I don't know which packages ubuntu uses for this stuff, thought it
would be worth checking with actual ubuntu users for where to start
fiddling. The error is:

dick at ENU-1:~$ synaptic-pkexec
==== AUTHENTICATING FOR com.ubuntu.pkexec.synaptic ===
Authentication is required to run the Synaptic Package Manager
Authenticating as: Dick Steffens,,, (dick)
Password:
polkit-agent-helper-1: error response to PolicyKit daemon:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized

This incident has been reported.
dick at ENU-1:~$

Anyone here know if polkit has some sort of cache file in /tmp? I would
guess that there are some files that need to be deleted so that it can
regenerate them, but I've honestly never seen an issue with polkit. The
error only occurs on 1 system, his other box seems fine.

On Tue, Sep 17, 2019 at 4:55 PM Dick Steffens <dick at dicksteffens.com> wrote:

> On 9/16/19 6:12 PM, Ben Koenig wrote:
> > run synaptic from the command line without sudo and see what it says.
>
> [By mistake, I did a reply instead of a reply-list for a few messages.
> I'll summarize here, and we'll see if anyone else on the list has
> experience with it.]
>
> On 9/16/19 9:09 PM, Dick Steffens wrote:
>
> > A window opens that says,
> >
> > "Starting "Synaptic Package Manager" without administrative privileges
> >
> > You will not be able to apply any changes, but you can still export
> > the marked changes or create a download script for them."
> >
> > Also, at the command line:
> >
> > dick at ENU-1:~$ synaptic
> > Gtk-Message: 21:06:15.530: GtkDialog mapped without a transient
> > parent. This is discouraged.
> > On 9/16/19 9:20 PM, Ben Koenig wrote:
> >> so it worked as expected. Thats good.
> >>
> >> The launcher in your menu refers to a file that contains the command
> >> used to run the program. Take a look at the .desktop files in
> >> /usr/share/applications. Most of the files in that folder should have
> >> the extension .desktop, but they are really just text files. They are
> >> launcher definitions, if you open one up and look for the "Exec" line
> >> it will show you the command that runs when click on it via the menu.
> >>
> >> But I don't know what the filename is for synaptic's .desktop file,
> >> that's an ubuntu-specific thing.
> >
> > In /usr/share/applications/ there is a file named Synaptic Package
> > Manager. It shows no extension, but the type says "desktop
> > configuration file" and has the following contents:
> >
> > [Desktop Entry]
> > Name=Synaptic Package Manager
> > GenericName=Package Manager
> > Comment=Install, remove and upgrade software packages
> > Exec=synaptic-pkexec
> > Icon=synaptic
> > Terminal=false
> > Type=Application
> > Categories=PackageManager;GTK;System;Settings;
> > X-Ubuntu-Gettext-Domain=synaptic
> >
> > The problem exists on my machine ENU-1, running Ubuntu 18.04.3 LTS. It
> > was originally installed as Ubuntu, but later I switched to the Xfce
> > desktop. On another machine, ENU-2, running Ubuntu 18.04.3 LTS but
> > installed as Xubuntu, I have the same file in /usr/share/applications,
> > with the same content. But on ENU-2, clicking the icon from the
> > Applications>System menu brings up Synaptic and asks for my password.
>
> On 9/17/19 1:29 PM, Ben Koenig wrote:
>
> > What happens when you run "synaptic-pkexec" from the commandline? No
> > sudo, just do it as a regular user.
>
> dick at ENU-1:~$ synaptic-pkexec
> ==== AUTHENTICATING FOR com.ubuntu.pkexec.synaptic ===
> Authentication is required to run the Synaptic Package Manager
> Authenticating as: Dick Steffens,,, (dick)
> Password:
> polkit-agent-helper-1: error response to PolicyKit daemon:
> GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
> ==== AUTHENTICATION FAILED ===
> Error executing command as another user: Not authorized
>
> This incident has been reported.
> dick at ENU-1:~$
>
> >
> > Some context on why I'm suggesting this:
> > The files in /usr/share/applications are all launchers. Your file
> > manager is automatically parsing them and assigning icons and names
> > based on the contents of each file. That's why you aren't seeing the
> > extension. If you list the contents on the command line you will see
> > very different filenames.
> >
> > In this "[Desktop Entry]" definition you are seeing, each line serves
> > a purpose. It names an Icon, Name, and Description. It even provides a
> > way to specify if a terminal should be launched in order to monitor
> > error messages. The Exec= line specifies the command being run to
> > execute the program.
> >
> > There are a couple ways to troubleshoot:
> > 1) Compare this file on ENU-1 and ENU-2. Since you say that ENU-2
> > works, I bet the Exec= line is different.
>
> The files are identical. ENU-1 and ENU-2 both have Exec=synaptic-pkexec.
>
> > 2) Run the Exec= command directly yourself in the terminal. It will
> > probably return and error that will tell us why it fails.
> >
> > It looks to me like the command being run when you click on the menu
> > is not the same as the command you used manually, explaining why
> > running from the terminal works. I wonder what synaptic-pkexec is
> > referring to?
>
> On 9/17/19 3:29 PM, Ben Koenig wrote:
>
> > Huh. That's a strange error, but it definitely tells us what is wrong.
> > PolicyKit has been around a while, slackware has it but I have to be
> > honest I don't know much about it.
> >
> > This might be worth posing to the list as it's own question. There is
> > probably an easy fix but I don't really know what off the top of my
> > head. It's possible someone else in the PLUG group would have more
> > experience with the packages and temp files related to policykit.
>
> So, anyone have PolicyKit experience that might shed some light on this?
>
> --
> Regards,
>
> Dick Steffens
>
> _______________________________________________
> PLUG mailing list
> PLUG at pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



More information about the PLUG mailing list