Page 1 of 1

Synaptic No Longer Works from the System Menu <SOLVED>

Posted: Tue Mar 12, 2013 6:58 pm
by rbeltz48
I've been running Mint 13 with backports checked and have installed all updates as they become available. All of a sudden, after the last update, it appears that Synaptic no longer works. These are the three updates in question which I just installed:

libnm-gtk0
libnm-gtk-common
network-manager-gnome

I checked my wife's laptop. Synaptic still works on her laptop and these updates have NOT been installed on her laptop. Has anyone else had this problem? Thanks.

Re: Synaptic Package Manager No Longer Works

Posted: Tue Mar 12, 2013 7:19 pm
by karlchen
Hello, rbeltz48.

The same 3 updates have been installed on my office notebook, which runs Mint13 32-bit Cinnamon desktop, today. Have used Synaptic successfully afterwards. Yet, the machine has not been rebooted yet. Will be started up again Wednesday morning when I will be back to work. Will check Synaptic and report back.
Would be amazed if 3 updates which should affect Network Manager only negatively affect Synaptic.
Hope they will not affect Network Manager negatively. Would be some kind of catastrophe for an office machine.

Which symptoms, error messages do you see that lead you to the conclusion that
it appears that Synaptic no longer works
Kind regards,
Karl

Re: Synaptic Package Manager No Longer Works

Posted: Tue Mar 12, 2013 7:22 pm
by rbeltz48
Synaptic simply doesn't run when I try to start it. Nothing happens. Period.

Re: Synaptic Package Manager No Longer Works

Posted: Tue Mar 12, 2013 7:36 pm
by kc1di
rbeltz48 wrote:Synaptic simply doesn't run when I try to start it. Nothing happens. Period.
try running it from a terminal with

Code: Select all

synaptic
list any error messages you receive.

I too did the same updates and am having no problem with synaptic.

Re: Synaptic Package Manager No Longer Works

Posted: Tue Mar 12, 2013 7:39 pm
by rbeltz48
Here are the errors:

First it said "starting without administrative privileges". Then these errors:

(synaptic:3507): GLib-GObject-CRITICAL **: g_object_set_data: assertion `G_IS_OBJECT (object)' failed

(synaptic:3507): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(synaptic:3507): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

I started from the Terminal but it will not start from the menu under "System"

Re: Synaptic Package Manager No Longer Works

Posted: Tue Mar 12, 2013 7:46 pm
by kc1di
have you rebooted the machine since this started?
if not try that.

Re: Synaptic Package Manager No Longer Works

Posted: Tue Mar 12, 2013 8:00 pm
by rbeltz48
Yes I've rebooted and no change. The command under the System-Administration menu. "synaptic-pkexec" seems correct. But it will now only run from the Terminal with Administrator privileges "su" only. This is very wierd.

Re: Synaptic Package Manager No Longer Works

Posted: Tue Mar 12, 2013 8:27 pm
by kc1di
try this then
Navigate to /usr/share/applications
Open as root with a text editor the desktop file Synaptic, and look for the line "Execute..." .
Change the command to "gksu synaptic" (without the quotes)
Save and exit.
then try the menu item again.

Re: Synaptic Package Manager No Longer Works

Posted: Wed Mar 13, 2013 7:13 am
by karlchen
On my system, this is the unmodified /usr/share/applications/synaptic.desktop file, i.e. the launcher behind the icon:

Code: Select all

[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;
NotShowIn=KDE;
X-Ubuntu-Gettext-Domain=synaptic
This would be the modified /usr/share/applications/synaptic.desktop file after the change suggested by kc1di has been applied:

Code: Select all

[Desktop Entry]
Name=Synaptic Package Manager
GenericName=Package Manager
Comment=Install, remove and upgrade software packages
Exec=gksu synaptic
Icon=synaptic
Terminal=false
Type=Application
Categories=PackageManager;GTK;System;Settings;
NotShowIn=KDE;
X-Ubuntu-Gettext-Domain=synaptic
P.S.:
Synaptic still works fine here after installing the 3 Network Manager updates. So does Network Manager.

Karl

Re: Synaptic Package Manager No Longer Works

Posted: Wed Mar 13, 2013 7:34 am
by rbeltz48
I see two desktop configuration files in that folder under File System usr/share/applications named "Synaptic Package Manager". Neither of them can be edited. I can only open them by right clicking on them and opening without admin privileges or richt clicking and using the option to open with admin privileges. Am I in the right directory and folder?

Re: Synaptic Package Manager No Longer Works

Posted: Wed Mar 13, 2013 8:20 am
by karlchen
Hello, rbeltz48.

As kc1di posted: the folder is /usr/share/applications.
In order to edit a .desktop file you need to do with root privileges, e.g.

Code: Select all

sudo vi /usr/share/applications/synaptic.desktop
or

Code: Select all

gksu gedit /usr/share/applications/synaptic.desktop
or from inside Nautilus/Nemo ... blime me ... this stupid Nautilus/Nemo does the something stupid that reminds me of Windows Explorer. It does not display the real filenames, but uses the Name= entry inside the .desktop file.
By the way, the real filenames are synaptic.desktop (for non KDE desktops) and synaptic-kde.desktop (for KDE desktop).
And one more annyoing detail in Nautilus/Nemo in this folder holding .desktop files: it does not offer any way of editing the files in its context menu.

Therefore I would open a terminal window and execute exactly this (copy and paste):

Code: Select all

cd /usr/share/applications
sudo gedit synaptic.desktop
Kind regards,
Karl

Re: Synaptic Package Manager No Longer Works

Posted: Wed Mar 13, 2013 8:45 am
by eanfrid
Do not manually edit whatever is stored under /usr/share as:

- it is unnecessary unless you are working around a bug soon to be corrected upstream
- your modifs won't survive any app update
- this is not the way to change your own prefs

Instead: copy the .desktop file you want to customize to your home folder i.e. under "~/.local/share/applications" and edit the copy which will override system defaults (edit: this will modify the content of user menu entries the same way as the standard menu editor GUI does it).

All user customizations are stored under ~/.local/share (including the content of your desktop trash) and user parameters are stored under ~/.config.

Re: Synaptic No Longer Works from the System Menu

Posted: Wed Mar 13, 2013 8:54 am
by rbeltz48
I'll get back to this later. Gotta go to work. BTW, I created a shortcut on the desktop to Synaptic and it works with Admin. privileges. But that doesn't explain why Synaptic no longer works after those three updates yet it works on my wife's laptop which was NOT updated with those updates. Any and all explanations here will be read this evening. Thanks.

Update: 3/13 9:00pm - I have not tried the above suggestions yet. Synaptic doesn't work from the System Menu and also will not work if I place an icon on the panel. It will only work from the desktop by right clicking and choosing "Open as Adminsitrator".

Has anyone else had a similar problem recently? Thanks.

Re: Synaptic No Longer Works from the System Menu

Posted: Thu Apr 04, 2013 1:32 pm
by mintie
I've had exactly the same problem. It was due to me changing my login shell via terminal. I had set it to /usr/bin/tcsh, but when I looked into the file of authorized shells by cat /etc/shells, I found that only the link /bin/tcsh was included, not /usr/bin/tcsh (to which it points). This causes some programs not to start from the menu, e.g., synaptic.

So:
1) Find out what your SHELL variable is set to, e.g.,

Code: Select all

echo $SHELL
was for me: /usr/bin/tcsh

2) Find out which shells are in the authorized list by

Code: Select all

cat /etc/shells
was for me:
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/bin/tcsh

3) Change your login shell formally to match one of the authorized shells

Code: Select all

sudo usermod -s <authorized shell path> <your user name>
, e.g., sudo usermod -s /bin/tcsh mintie

Note: My login shell variable before was set by me to /usr/bin/tcsh, but in the authorized shells, there is only /bin/tcsh. Since /bin/tcsh is a link to /usr/bin/tcsh, it doesn't make a difference for me which one I use. But since only /bin/tcsh is a valid login shell, synaptic wouldn't start when a non-valid login shell was specified as my SHELL. I noticed that only with the start of programs from the desktop or menu. My login to the system was never compromised.

Why is that?
Look into /usr/share/applications/synaptic.desktop. The execute command there is

Code: Select all

synaptic-pkexec
Looking at /usr/bin/synaptic-pkexec with an editor, I see that it is actually a shell script calling

Code: Select all

#!/bin/sh
pkexec "/usr/sbin/synaptic" "$@"
Even though /bin/sh is called (which is authorized): at this stage as well as in the call of pkexec also my shell is involved, and it did not belong to the set of authorized shells! I found this by receiving an error message about 'SHELL not found in authorized shells' when simply running

Code: Select all

pkexec "hello"
in a terminal as a test. Changing my login shell to an authorized shell solved all problems relating to shortcuts to applications like synaptic, which work via a shell command at some step.

Cheers,
Mintie

Re: Synaptic No Longer Works from the System Menu

Posted: Thu Apr 04, 2013 3:52 pm
by rbeltz48
Thanks for the info. But 2 weeks ago I simply re-installed Mint and all data files and that solved the problem.

Re: Synaptic No Longer Works from the System Menu

Posted: Fri Apr 05, 2013 1:16 am
by vortex59
Had the same problem after first "big" update. My solution was: edit the menu (right-click on menu buton)--> System-->Administration-->Synaptic Package Manager--> again right click on this item - open the launcher properties --> and in the command line : gksu synaptic--> save and close all. For me worked.

Re: Synaptic No Longer Works from the System Menu

Posted: Fri Apr 05, 2013 7:26 am
by rbeltz48
Nothing worked for me except re-installing everything. It all works now.

Re: Synaptic No Longer Works from the System Menu

Posted: Fri Apr 05, 2013 7:26 am
by rbeltz48
Nothing worked for me except re-installing everything. It all works now.