[SOLVED] Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
robertj
Level 1
Level 1
Posts: 4
Joined: Fri Jan 18, 2019 1:54 pm

[SOLVED] Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Post by robertj »

Hello everyone... This is my first post on Linux Mint, and coincidentally, I am a neophyte when it comes to the Linux Mint distro, and the Linux OS as a whole - so please forgive me in advance if I am misusing syntax, terminology, etc...

I've been using Linux Mint for the past week and haven't been able to launch the Synaptic Package Manager directly from the Menu (no window starts up). When executing the command $ sudo synaptic using the CLI, the package manager window loads up and is functional, but CLI prompts me with the following error:

(synaptic:9582): Gtk-CRITICAL **: gtk_widget_hide: assertion 'GTK_IS_WIDGET (widget)' failed


Looking through the forums, I read through a few related posts but couldn't find any viable solution that took care of this.
A few things I already tried/checked on: I reinstalled Synaptic, updated/upgraded/cleaned all applications and dist-upgraded using apt, made sure my user was part of the 'sudo' group, and restarted my laptop. I also created a temporary new user to see if this issue was isolated with my user profile, but I had the same issue with the temporary user as well.

I'm not sure of any relevance here, but I did notice that I can't launch ANY of the Administration applications from the System Systems window either. From my extremely limited experience with Linux Mint, I can see that the issues have one thing in common, which is they are Administration related functions, but that is as far as my knowledge goes! I would greatly appreciate any feedback/possible solutions to this error - thank you!

- Rob (aspiring Linux Mint student :lol: )
Last edited by robertj on Mon Jan 21, 2019 4:49 pm, edited 1 time in total.
User avatar
karlchen
Level 21
Level 21
Posts: 14098
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Post by karlchen »

Hello, Rob.

Please, do not prefix sudo to graphical applications. It may lead to the problem that inside your home directory objects (files, directories) are owned by user root instead of user rob.
Up to Mint 18.3, you might execute gksudo synaptic instead. - Note: gksudo is meant to launch graphical applications with root privileges.

Or you use the command, which should be used by the Synaptic menu launcher as well: synaptic-pkexec Doing so should also reveal why your menu item Synaptic does not work.

You may safely ignore the warning which you see in the terminal when invoking synaptic. I get the same warning:

Code: Select all

$ synaptic-pkexec
(synaptic:20737): Gtk-CRITICAL **: 13:07:20.022: gtk_widget_hide: assertion 'GTK_IS_WIDGET (widget)' failed
The above message is not the reason why Synaptic fails to launch from your menu.

Regards,
Karl
Image
Linux Mint 19.3 64-bit Cinnamon, Total Commander 9.51 64-bit
Spread Your Wings
Hoser Rob
Level 17
Level 17
Posts: 7239
Joined: Sat Dec 15, 2012 8:57 am

Re: Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Post by Hoser Rob »

I've never run Synapric from a terminal (got burned out enough with CLI decades ago, why use that when the GUI works fine?). But every time I've ever used Synaptic it's asked for a password anyway. So why bother running it with gksudo anyway?

And, as you seem to be discovering, in Linux simple error messages for something that isn't so critical often look like Armageddon just happened.
gm10
Level 20
Level 20
Posts: 10559
Joined: Thu Jun 21, 2018 5:11 pm

Re: Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Post by gm10 »

You can run Synaptic just fine without a password, you just won't be able to make changes then.

Regarding the Gtk error message, that's a bug in Mint's modified version of Synaptic, the official doesn't have it. You'll notice similar error messages with several Mint tools. Gtk is hard. ;)

As karlchen said, none of that is the reason why it won't start. My guess is you disabled the PolicyKit Authentication Agent from your startup applications and now you cannot authenticate anymore (the hint is in the name, yet I've seen a few people surprised by this...). If that's not it, run the synaptic-pkexec command from a command line as karlchen said.
jglen490
Level 5
Level 5
Posts: 998
Joined: Sat Jul 15, 2017 9:57 pm

Re: Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Post by jglen490 »

robertj wrote:
Fri Jan 18, 2019 2:37 pm
Hello everyone... This is my first post on Linux Mint, and coincidentally, I am a neophyte when it comes to the Linux Mint distro, and the Linux OS as a whole - so please forgive me in advance if I am misusing syntax, terminology, etc...

I've been using Linux Mint for the past week and haven't been able to launch the Synaptic Package Manager directly from the Menu (no window starts up). When executing the command $ sudo synaptic using the CLI, the package manager window loads up and is functional, but CLI prompts me with the following error:

(synaptic:9582): Gtk-CRITICAL **: gtk_widget_hide: assertion 'GTK_IS_WIDGET (widget)' failed


Looking through the forums, I read through a few related posts but couldn't find any viable solution that took care of this.
A few things I already tried/checked on: I reinstalled Synaptic, updated/upgraded/cleaned all applications and dist-upgraded using apt, made sure my user was part of the 'sudo' group, and restarted my laptop. I also created a temporary new user to see if this issue was isolated with my user profile, but I had the same issue with the temporary user as well.

I'm not sure of any relevance here, but I did notice that I can't launch ANY of the Administration applications from the System Systems window either. From my extremely limited experience with Linux Mint, I can see that the issues have one thing in common, which is they are Administration related functions, but that is as far as my knowledge goes! I would greatly appreciate any feedback/possible solutions to this error - thank you!

- Rob (aspiring Linux Mint student :lol: )
Have you ever been able to use Synaptic from the menu? If not, you may just need to re-install it.
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB
User avatar
karlchen
Level 21
Level 21
Posts: 14098
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Post by karlchen »

Hi, Rob.
gm10 wrote:
Sat Jan 19, 2019 9:35 am
My guess is you disabled the PolicyKit Authentication Agent from your startup applications and now you cannot authenticate anymore (the hint is in the name, yet I've seen a few people surprised by this...).
Agreed. This might explain, why neither Synaptic, nor other applications, which require root privileges, can be run from the Mint application menu.

So checking the Startup Applications list and making sure that the "PolicyKit Authentication Agent" has not been disabled is worthwhile. In case it has been disabled, re-enable it. After re-enabling it, log off from the GUI and log back in.

Best regards,
Karl
Image
Linux Mint 19.3 64-bit Cinnamon, Total Commander 9.51 64-bit
Spread Your Wings
robertj
Level 1
Level 1
Posts: 4
Joined: Fri Jan 18, 2019 1:54 pm

Re: Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Post by robertj »

karlchen wrote:
Sat Jan 19, 2019 8:08 am
Hello, Rob.

Please, do not prefix sudo to graphical applications. It may lead to the problem that inside your home directory objects (files, directories) are owned by user root instead of user rob.
Up to Mint 18.3, you might execute gksudo synaptic instead. - Note: gksudo is meant to launch graphical applications with root privileges.

Or you use the command, which should be used by the Synaptic menu launcher as well: synaptic-pkexec Doing so should also reveal why your menu item Synaptic does not work.

You may safely ignore the warning which you see in the terminal when invoking synaptic. I get the same warning:

Code: Select all

$ synaptic-pkexec
(synaptic:20737): Gtk-CRITICAL **: 13:07:20.022: gtk_widget_hide: assertion 'GTK_IS_WIDGET (widget)' failed
The above message is not the reason why Synaptic fails to launch from your menu.

Regards,
Karl
Thanks for that information and advice regarding sudo commands, Karl. I confirmed that "PolicyKit Authentication Agent" was in fact enabled as a Startup Application. Per your advice, I tried synaptic-pkexec (currently running Mint 19.1) in the CLI and was prompted with the following error:

The value for the SHELL variable was not found the /etc/shells file

Using the Menu editor, I confirmed that the command for Synaptic Package Manager was 'synaptic-pkexec'. I also attempted to execute other Administrative applications that use pkexec (Software Sources, Driver Manager, etc...) and got the same error I mentioned above. In addition, please note that I can in fact launch these applications from the CLI without the pkexec appended, but I can't launch these applications using the Menu interface. Since these applications all have the pkexec in the command syntax of their respective Launcher Properties, it seems to me that "pkexec" is what's causing the failure to launch....

Other possible problem sources: I confirmed /bin/bash was in /etc/shells. Also, I'm still trying to wrap my head around the concept of polkit so I'm not sure if the synaptic policy/config file has any bearing on this matter, but the 3 default elements all had values of 'auth_admin'...

Any advice on where to go from here? I've exhausted my options via google search... :?

I truly appreciate everyone's assistance and patience!

Regards,
Rob
gm10
Level 20
Level 20
Posts: 10559
Joined: Thu Jun 21, 2018 5:11 pm

Re: Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Post by gm10 »

robertj wrote:
Sat Jan 19, 2019 10:27 pm
The value for the SHELL variable was not found the /etc/shells file
Post output of

Code: Select all

grep $USER: /etc/passwd
and

Code: Select all

cat /etc/shells
or alternatively just run

Code: Select all

chsh
and reset your account to the default login shell.
robertj
Level 1
Level 1
Posts: 4
Joined: Fri Jan 18, 2019 1:54 pm

Re: Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Post by robertj »

Hi gm10,

The output for grep $USER: /etc/passwd was:
robertj:x:1000:1000:RobertJ,,,:/home/robertj:/bin/bash

The output for cat /etc/shells was:
bin/bash

When I ran chsh the output was:
You may not change the shell for 'robertj'.

I then tried sudo chsh and the shell asked me for the password for robertj. After submitting the correct password, the shell continued to a new line and stated "Password:" which I assume is for 'root'? I entered the 'root' password and received the following error:
chsh: PAM: Authentication failure

I tried the password for 'robertj' and also no password for sudo chsh and still received the same error I mentioned above...

UPDATE:
After taking a second look at my output for cat /etc/shells, I noticed that the path name in the /etc/shells had incorrect syntax ('/' was absent from beginning of path name), so I modified the /etc/shells file to contain the following line: /bin/bash

After making this change, I was not only able to execute the chsh command, but I was also able to access all of the Administrative applications from the Menu and also from the CLI using pkexec - so it appears that the problem this whole time was related to that syntactical error... I am not sure how that happened in the first place... To my knowledge, I never modified /etc/shells.

Thank you all for your help with this! Much appreciated :-)
gm10
Level 20
Level 20
Posts: 10559
Joined: Thu Jun 21, 2018 5:11 pm

Re: Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Post by gm10 »

You are welcome. Unfortunately I also cannot tell you how this happened if it wasn't a manual modification, but what I can tell you are the default contents of that file on 19.1 in case you want to restore them (you should):

Code: Select all

# /etc/shells: valid login shells
/bin/sh
/bin/bash
/bin/rbash
/bin/dash
robertj
Level 1
Level 1
Posts: 4
Joined: Fri Jan 18, 2019 1:54 pm

Re: [SOLVED] Launching Synaptic Package Manager from CLI produces Gtk-CRITICAL **

Post by robertj »

Thanks again, gm10. I've added the paths you provided above.

Rob
Post Reply

Return to “Software & Applications”