Bug 700967

Summary: system-config-language fails to run from the menu on the KDE spin
Product: [Fedora] Fedora Reporter: Kevin Kofler <kevin>
Component: system-config-languageAssignee: Naveen Kumar <nkumar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 15CC: i18n-bugs, jlaska, nkumar, psatpute
Target Milestone: ---Keywords: EasyFix
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedBlocker
Fixed In Version: system-config-language-1.3.5-8.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-03 04:46:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 617261, 669355    

Description Kevin Kofler 2011-04-30 01:06:42 UTC
Description of problem:
On the Fedora-15-Nightly-20110428.20-x86_64-Live-kde.iso, in the live session, I tried running system-config-language from the menu and it didn't work at all.

Version-Release number of selected component (if applicable):
system-config-language-1.3.5-7.fc15

How reproducible:
Always

Steps to Reproduce:
1. Boot the F15 KDE live image. (I noticed this with the 20110428.20 nightly.)
2. Try running System Settings / Language from the menu.
  
Actual results:
Nothing happens.

Expected results:
The UI comes up.

Additional info:
I tried running system-config-language in a terminal and got the following message:
Starting graphical mode failed.  Starting text mode instead.

It then proceeded to putting up a TUI. That TUI is not visible when running system-config-language from the menu.

Comment 1 Kevin Kofler 2011-04-30 01:09:57 UTC
Nominating as a blocker under the "All applications listed under the Applications menu or category must start successfully" criterion. (Yes, this shows up under Applications in Kickoff.)

Comment 2 James Laska 2011-05-02 11:54:16 UTC
Hi Kevin.  Is this another version of the NM dhcp timing issue?  If you run xhost +  ... does that allow s-c-language to start in graphical mode from a terminal?

Comment 3 Kevin Kofler 2011-05-02 12:55:14 UTC
"xhost +" doesn't change anything.

Also note that other consolehelper-using system-config-* tools work, only system-config-language is broken.

Comment 4 Kevin Kofler 2011-05-02 13:08:50 UTC
There's a Python exception being thrown, which makes the GUI mode fail to load:
  File "/usr/share/system-config-language/language-gui.py", line 406, in stand_alone
    self.iconBox.pack_start(self.icon, false)
AttributeError: childWindow instance has no attribute 'icon'

Comment 5 Kevin Kofler 2011-05-02 13:13:23 UTC
The problem is that the code assumes that /usr/share/icons/gnome/32x32/apps/preferences-desktop-locale.png always exists, yet nothing is requiring gnome-icon-theme on the KDE spin (and since it's 9 MiB of already compressed PNGs, I'm not sure we want to drag it in).

Comment 6 Kevin Kofler 2011-05-02 13:18:21 UTC
The code:
https://fedorahosted.org/system-config-language/browser/trunk/src/language_gui.py
has these lines:
97        try:
98            p = gtk.gdk.pixbuf_new_from_file("/usr/share/icons/gnome/32x32/apps/preferences-desktop-locale.png")
99        except:
100            try:
101                p = gtk.gdk.pixbuf_new_from_file("/usr/share/icons/gnome/32x32/apps/preferences-desktop-locale.png")
102            except:
103                pass
This is trying to load the same file twice. If I change line 101 to:
                p = gtk.gdk.pixbuf_new_from_file("/usr/share/icons/oxygen/32x32/apps/preferences-desktop-locale.png")
it works fine.

Comment 7 Kevin Kofler 2011-05-02 13:20:28 UTC
The best solution, though, would be to use the icon-theme-aware icon loading functions instead of hardcoding the theme. That way, it would always find the Oxygen icon on the KDE spin.

Comment 8 Kevin Kofler 2011-05-02 13:44:08 UTC
I'm now building system-config-language-1.3.5-8.fc16 and system-config-language-1.3.5-8.fc15 with the minimal fix, to get the blocker addressed.

I'll leave it to the maintainer to decide whether he thinks it's good enough or whether he wants to make the code cleaner (e.g. by using the icon loading functions and/or by not making the code throw an exception if the icon wasn't found; the weird thing is that the code tries hard not to throw, then throws anyway later on).

Comment 9 Fedora Update System 2011-05-02 14:10:58 UTC
system-config-language-1.3.5-8.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/system-config-language-1.3.5-8.fc15

Comment 10 James Laska 2011-05-02 15:16:09 UTC
Discussed during the 2011-05-02 Fedora QA team meeting.  Agreed that this impacts application basic functionality when running s-c-lang in KDE, and is therefore a valid release blocker.

Comment 11 Fedora Update System 2011-05-03 04:46:29 UTC
system-config-language-1.3.5-8.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Naveen Kumar 2011-05-03 06:05:20 UTC
Thanks Kevin :). Actually a lot of people have previously worked on this application, hence sometimes it becomes difficult to main a good code. For the time being, if it solves the problem, I will stick with this. But later on, I will change it with some cleaner code. Thanks again to you and James.