'im-config -l' complains about zenity not installed

Bug #1450147 reported by Mélodie
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
im-config (Debian)
Fix Released
Unknown
im-config (Ubuntu)
Fix Released
High
Gunnar Hjalmarsson
Trusty
Fix Released
High
Gunnar Hjalmarsson
Wily
Fix Released
High
Gunnar Hjalmarsson

Bug Description

trusty and wily SRU request
===========================

[Impact]
The 'im-config -l' call causes language-selector-gnome to crash for users who don't have zenity installed. The proposed change prevents this unwarranted check.

[Test Case]
* Uninstall zenity
* Open a terminal window and run gnome-language-selector.

[Regression Potential]
Low, since the change only delays the "sanity check" until after the l-option code.

[Original description]
The package language-selector-gnome 0.143 from the Vivid edition fails to start, complaining zenity is missing.

$ gnome-language-selector
E : zenity doit être installé.
Traceback (most recent call last):
  File "/usr/bin/gnome-language-selector", line 22, in on_activate
    options=options)
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 199, in __init__
    self.check_input_methods()
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 54, in wrapper
    res = f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 454, in check_input_methods
    for (i, IM) in enumerate(self.ImConfig.getAvailableInputMethods()):
  File "/usr/lib/python3/dist-packages/LanguageSelector/ImConfig.py", line 19, in getAvailableInputMethods
    inputMethods = subprocess.check_output(['im-config', '-l']).decode().split()
  File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['im-config', '-l']' returned non-zero exit status 1
$

Once zenity is installed it starts and works perfectly.

Thanks for fixing.

Best regards,
Mélodie

Revision history for this message
Mélodie (meets) wrote :

The package name concerned is language-selector-gnome : why does this page keeps reverting it back to language-selector?

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your report, Mélodie. language-selector is the source package from which the binary package language-selector-gnome is built.

Adding zenity as a dependency might fix it, but it wouldn't make much sense, since language-selector-gnome does not make use of it. language-selector-gnome calls im-config via the shell command "im-config -l", and it's the latter which complains about zenity not being installed. Since that command just echos a variable, that complaint is unwarranted.

I think this is best fixed in im-config, so I changed the affected package and I attached a patch that simply moves a piece of code before the UI sanity check.

@Osamu: Do you think that change would be ok?

@Mélodie: Out of curiosity: What's the reason why zenity was not installed on your machine? It's shipped by default in standard Ubuntu (depends on ubuntu-desktop). Are you using one of the flavours?

affects: language-selector (Ubuntu) → im-config (Ubuntu)
Changed in im-config (Ubuntu):
importance: Undecided → High
status: New → Confirmed
summary: - language-selector-gnome zenity dependancy missing
+ 'im-config -l' complains about zenity not installed
tags: added: patch
Revision history for this message
Mélodie (meets) wrote :

> @Mélodie: Out of curiosity: What's the reason why zenity was not installed on your machine? It's shipped by default in standard Ubuntu (depends on ubuntu-desktop). Are you using one of the flavours?

Hi Gunnar,
I am using my own remix upgraded to Vivid, which has for name Bento Openbox Remix.
( http://linuxvillage.org/en/2015/04/sushi-trusty-in-test/ - https://launchpad.net/bento-dev )

Thanks!

Changed in im-config (Debian):
status: Unknown → New
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
description: updated
Changed in im-config (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
status: Confirmed → In Progress
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks

Changed in im-config (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package im-config - 0.29-1ubuntu8

---------------
im-config (0.29-1ubuntu8) xenial; urgency=medium

  * debian/patches/03-not-always-require-zenity.patch:
    Get rid of unwarrented crash of gnome-language-selector when
    calling "im-config -l" (LP: #1450147).

 -- Gunnar Hjalmarsson <email address hidden> Wed, 04 Nov 2015 16:45:00 +0100

Changed in im-config (Ubuntu):
status: Fix Committed → Fix Released
Changed in im-config (Ubuntu Trusty):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → High
status: New → In Progress
Changed in im-config (Ubuntu Wily):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Mélodie, or anyone else affected,

Accepted im-config into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/im-config/0.24-1ubuntu4.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in im-config (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in im-config (Ubuntu Wily):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Mélodie, or anyone else affected,

Accepted im-config into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/im-config/0.29-1ubuntu7.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I have successfully installed and run:
- im-config 0.24-1ubuntu4.2 on trusty
- im-config 0.29-1ubuntu7.1 on wily

language-selector-gnome can now be run without zenity being installed.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Mélodie (meets) wrote :

Hello,

I don't get a good result in Vivid. The program starts, then disappears. In console:
**************************
$ gnome-language-selector

(gnome-language-selector:19985): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2:16: Theming engine 'adwaita' not found

(gnome-language-selector:19985): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:62:15: Not using units is deprecated. Assuming 'px'.

(gnome-language-selector:19985): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:62:17: Not using units is deprecated. Assuming 'px'.

(gnome-language-selector:19985): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:909:16: Theming engine 'adwaita' not found
E : zenity doit être installé.
Traceback (most recent call last):
  File "/usr/bin/gnome-language-selector", line 22, in on_activate
    options=options)
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 199, in __init__
    self.check_input_methods()
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 54, in wrapper
    res = f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 454, in check_input_methods
    for (i, IM) in enumerate(self.ImConfig.getAvailableInputMethods()):
  File "/usr/lib/python3/dist-packages/LanguageSelector/ImConfig.py", line 19, in getAvailableInputMethods
    inputMethods = subprocess.check_output(['im-config', '-l']).decode().split()
  File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['im-config', '-l']' returned non-zero exit status 1

**************************

The packages installed:
accountsservice (version 0.6.37-1ubuntu10.1) sera installé
im-config (version 0.29-1ubuntu2) sera installé
language-selector-common (version 0.143) sera installé
language-selector-gnome (version 0.143) sera installé
libaccountsservice0 (version 0.6.37-1ubuntu10.1) sera installé

zenity is not installed:
$ apt-cache policy zenity
zenity:
  Installé : (aucun)
  Candidat : 3.14.0-1
 Table de version :
     3.14.0-1 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
$

If I install it:
$ sudo apt-get install zenity
...
$

Then retry:
$ gnome-language-selector

(gnome-language-selector:21113): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2:16: Theming engine 'adwaita' not found

(gnome-language-selector:21113): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:62:15: Not using units is deprecated. Assuming 'px'.

(gnome-language-selector:21113): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:62:17: Not using units is deprecated. Assuming 'px'.

(gnome-language-selector:21113): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:909:16: Theming engine 'adwaita' not found

*******

I still get these few warnings but now it works.

Revision history for this message
Mélodie (meets) wrote :

Gunnar are you sure you don't have any Zenity in none of your two installs? (could you check with apt-cache policy?). Else, is there another test I should do?

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

They are only in -proposed so far. Either you'll need to enable -proposed and install from there, or wait a couple of weeks until they are moved to -updates.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Wait... You said vivid. I didn't make a patch for vivid, since it will be EOL in a couple of months.

Revision history for this message
Mélodie (meets) wrote :

Oh ok, I retry in a Trusty version and I'll be right back.

Revision history for this message
Mélodie (meets) wrote :

Ok, I tried with Trusty in Virtualbox, updated im-config, removed zenity : gnome-language-selector works!

Thanks for your good job. :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package im-config - 0.24-1ubuntu4.2

---------------
im-config (0.24-1ubuntu4.2) trusty; urgency=medium

  * debian/patches/03-not-always-require-zenity.patch:
    Get rid of unwarrented crash of gnome-language-selector when
    calling "im-config -l" (LP: #1450147).

 -- Gunnar Hjalmarsson <email address hidden> Wed, 04 Nov 2015 16:45:00 +0100

Changed in im-config (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for im-config has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package im-config - 0.29-1ubuntu7.1

---------------
im-config (0.29-1ubuntu7.1) wily-proposed; urgency=medium

  * debian/patches/03-not-always-require-zenity.patch:
    Get rid of unwarrented crash of gnome-language-selector when
    calling "im-config -l" (LP: #1450147).

 -- Gunnar Hjalmarsson <email address hidden> Wed, 04 Nov 2015 16:45:00 +0100

Changed in im-config (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
osamu (osamu) wrote : Re: [Bug 1450147] Re: language-selector-gnome zenity dependancy missing

Hi,

On Wed, Apr 29, 2015 at 09:26:45PM -0000, Gunnar Hjalmarsson wrote:
> @Osamu: Do you think that change would be ok?

I say change is needed.

But not just -l but other cases when it is not required too.

Osamu

Changed in im-config (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.