Public bug reported:

"language support" crash

On Ubuntu 26.10 with an XFCE/X11 session, clicking "Language Support" in the 
Settings Manager starts a window which closes immediately. 
Running the command from a terminal shows a Python traceback.

The crash is caused by an incompatibility between language-selector and
im-config 1.x. LanguageSelector/ImConfig.py still calls the old im-config -m 
option, but that option was removed in im-config 1.1. 
im-config -h confirms that -m is no longer supported.

======================================================================================================
$ im-config -h
Input Method Configuration (im-config ver. 1.1)

Set up IM framework configuration

im-config [-p|-i|-d|-r|-w <name>|-c|-q|-v|-t <name>|-h]

OPTIONS:
-p        Possible IM frameworks
-i        Installed IM frameworks
-d        Default values
-r        Report configuration values
-w <name> Write the IM framework <name>
-c        Console terminal dialogue
-q        Quiet logging
-v        Verbose logging
-t <fn>   Test execute <fn>
-h        Print this message

  (c) 2026 Osamu Aoki <[email protected]>, GPL-2+

liuc@liuc:~$ gnome-language-selector
Traceback (most recent call last):
  File "/usr/bin/gnome-language-selector", line 21, in on_activate
    instance = GtkLanguageSelector(datadir=options.datadir,
                                    options=options)
  File 
"/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", 
line 206, in __init__
    self.check_input_methods()
    ~~~~~~~~~~~~~~~~~~~~~~~^^
  File 
"/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", 
line 57, in wrapper
    res = f(*args, **kwargs)
  File 
"/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", 
line 455, in check_input_methods
    currentIM = self.ImConfig.getCurrentInputMethod()
  File "/usr/lib/python3/dist-packages/LanguageSelector/ImConfig.py", line 26, 
in getCurrentInputMethod
    subprocess.check_output(['im-config', '-m']).decode().split()[:3]

===============================================================================================

A temporary local workaround:

class ImConfig(object):
    def getAvailableInputMethods(self):
        inputMethods = sorted(set(
            subprocess.check_output(
                ['im-config', '-i'], text=True
            ).split()
        ))
        if 'none' not in inputMethods:
            inputMethods.append('none')
        return inputMethods

    def getCurrentInputMethod(self):
        report = subprocess.check_output(['im-config', '-r'], text=True)
        setMatch = re.search(
            r'^IM framework \(set\):[ \t]*(\S+)', report, re.MULTILINE)
        autoMatch = re.search(
            r'^IM framework \(auto\):[ \t]*(\S+)', report, re.MULTILINE)

        if not setMatch or not autoMatch:
            raise RuntimeError('Unable to parse im-config -r output')

        current = setMatch.group(1)
        if current in ('auto', 'missing'):
            current = autoMatch.group(1)
        return current

    def setInputMethod(self, im):
        if im == 'REMOVE':
            im = 'auto'
        subprocess.call(['im-config', '-w', im])

This avoids a compatibility wrapper or hardcoded return value and keeps
language-selector aligned with the current im-config CLI.

ProblemType: Bug
DistroRelease: Ubuntu 26.10
Package: language-selector-common 0.230ubuntu
ProcVersionSignature: Ubuntu 7.3.0-9.9-generic 7.3.0-rc6
Uname: Linux 7.3.0-9-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.36.0-0ubuntu1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: XFCE
Date: Sun Oct 11 20:29:48 2026
InstallationDate: Installed on 2023-10-29 (1078 days ago)
InstallationMedia: Ubuntu 22.04.3 LTS "Jammy Jellyfish" - Release amd64 
(20230807.2)
PackageArchitecture: all
SourcePackage: language-selector
UpgradeStatus: Upgraded to stonking on 2026-10-11 (0 days ago)

** Affects: language-selector (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug stonking third-party-packages

** Attachment added: "ImConfig.py"
   
https://bugs.launchpad.net/bugs/2170489/+attachment/6008175/+files/ImConfig.py

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2170489

Title:
  [Ubuntu 26.10]xfce "language support" crash

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/2170489/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to