Bug 457626 - Scim runs multiple instances
Summary: Scim runs multiple instances
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: qt
Version: 9
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 468814
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-01 21:30 UTC by Aniket
Modified: 2008-11-26 06:19 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-26 06:19:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Aniket 2008-08-01 21:30:57 UTC
From Bugzilla Helper:
User-Agent: Opera/9.51 (X11; Linux i686; U; en)

Description of problem:
Description of problem:
Scim runs multiple instances as the logged in user and as root, in the same 
session.Here is the output from ps aux

vlsidude 21200  0.0  0.0   8624  1832 ?        Ss   13:11   0:00 /usr/lib/
scim-1.0/scim-launcher -d -c simple -e all -f socket --no-stay -d
root     21841  0.0  0.0   6048   724 ?        Ss   13:15   0:00 /usr/lib/
scim-1.0/scim-helper-manager
root     21842  0.0  0.3  52140  7992 ?        Ssl  13:15   0:00 /usr/lib/
scim-1.0/scim-panel-gtk --display :0.0 -c socket -d --no-stay
root     21844  0.0  0.0   8448  1136 ?        Ss   13:15   0:00 /usr/lib/
scim-1.0/scim-launcher -d -c socket -e socket -f x11 --no-stay -d
vlsidude 22192  0.0  0.0   6964   752 ?        Ss   13:16   0:00 /usr/lib/
scim-1.0/scim-helper-manager
vlsidude 22198  0.0  0.3  31584  7896 ?        Ssl  13:16   0:00 /usr/lib/
scim-1.0/scim-panel-gtk --no-stay --display :0 -c socket -d
vlsidude 22200  0.0  0.0   8712  1544 ?        S    13:16   0:00 scim-bridge
vlsidude 25235  0.0  0.0   5036   716 pts/1    R+   14:16   0:00 grep scim

In Fedora 8 , this was not so .

So , I see 2 scim icons in the system tray, which is not desirable. Also 
clicking exit on the scim icon owned by root (my guess) causes plasma and many 
apps in KDE to crash. 

Version-Release number of selected component (if applicable):
scim-1.4.7-23.fc9

How reproducible:
Always


Steps to Reproduce:
1.Install scim-bridge , and enable scim from im-chooser
2.log out and log back in


Actual Results:
You will see 2 scim icons in the system tray, when actually there should be 
only one

Expected Results:
only scim processes owned by the logged in user must be running. The process 
for scim owned by root should not be present.

Additional info:

Comment 1 Aniket 2008-08-01 22:02:30 UTC
Some additions
This bugs is present only if scim-bridge IM method is used. If scim method is 
used (scim-qtimm and scim-gtk) this bug is not present, but using scim, I am 
not able to have scim input in GTK apps under KDE. Works fine with Gnome. 

Comment 2 Peng Huang 2008-08-02 00:04:18 UTC
I saw two sets of scim processes in your system. One is started by user
vlsidude, the other is started by root. I think it is not a bug. If you start a
Gtk application with root privilege, the scim im module will start a new scim
with root privilege. If it use old scim, it will cause security issue. So I will
close this bug as not a bug. If you have any problem, feel free to reopen it.

Comment 3 Aniket 2008-08-02 00:30:36 UTC
Well, yes that could be the case if I am running any app as root, but I am not!
And scim doesnt work with GTK apps under my kde 4.1. 

Comment 4 Peng Huang 2008-08-02 03:34:20 UTC
I remove scim-gtk & scim-qtimm, but I can not reproduce this problem both in
gnome & kde session.

BTW, gtk app can not use scim under KDE session, but it is a problem of
im-chooser. I filed a new bug for it.(bug 457635)

Comment 5 Aniket 2008-08-04 02:09:44 UTC
Well, If it may help to reproduce the bug, I am using KDM as login manager, and not GDM.

Comment 6 Peng Huang 2008-08-04 03:54:21 UTC
I can not launch kdm in my box in runlevel 3. :(
Does it happen with gdm? Could you try gdm?  Thanks.

Comment 7 Aniket 2008-08-04 19:22:50 UTC
Well my guess was right, the problem of scim running as root is not present with GDM 

[vlsidude@mymachine ~]$ ps aux |grep scim
vlsidude    4294  0.0  0.0   6956  1268 ?        S    12:15   0:00 /usr/bin/scim
vlsidude    4298  0.0  0.1  21384  3072 ?        Ss   12:15   0:00 /usr/lib/scim-1.0/scim-launcher -d -c simple -e all -f socket --no-stay
vlsidude    4299  0.0  0.1   8456  2360 ?        S    12:15   0:00 /usr/lib/scim-1.0/scim-launcher -c socket -e socket -f x11
vlsidude    4359  0.0  0.0   8008  1436 ?        Ss   12:15   0:00 /usr/lib/scim-1.0/scim-helper-manager
vlsidude    4360  0.0  0.3  31436  7848 ?        Ssl  12:15   0:00 /usr/lib/scim-1.0/scim-panel-gtk --display :0.0 -c socket -d --no-stay
vlsidude    4424  0.0  0.1  21604  2864 ?        S    12:15   0:00 scim-bridge
vlsidude    5792  0.0  0.0   5040   708 pts/4    S+   12:18   0:00 grep scim
[vlsidude@mymachine ~]$

And , even with GDM, GTK cant use scim under KDE.

Comment 8 Peng Huang 2008-08-04 23:24:41 UTC
This is another bug, please look bug 457635.
You could run /usr/libexec/gnome-settings-daemon to let scim work in kde. Or make a symbol link of it in $HOME/.kde/Autostart to let kde autostart it when you login.

Comment 9 Akira TAGOH 2008-10-20 05:57:10 UTC
Neither this bug is in scim nor im-chooser/imsettings. but in Qt. I'm pretty sure from Comment #5 and Comment #7. Qt initializes immodule when the instance is created anyway but GTK+ is lazily loading immodule when any IM-related events, such as focus move and key events and so on, is received. at least with the standard widgets in GTK+.

My suggestions is:
1. to modify Qt widgets to load immodule later.
2. to have a workaround to not use immodule on kdm since we don't usually need to use it on the login screen.

Reassigning to Qt so far.

(In reply to comment #8)
> This is another bug, please look bug 457635.
> You could run /usr/libexec/gnome-settings-daemon to let scim work in kde. Or
> make a symbol link of it in $HOME/.kde/Autostart to let kde autostart it when
> you login.

Do not suggest that. it will breaks KDE preference. for F-9, you could just have "export GTK_IM_MODULE=scim-bridge" under /etc/kde/env/ for a workaround. it will be evaluated after xinput.sh and before bringing up KDE.

For Rawhide, you don't even need to do that. imsettings-applet is invoked from XDG autostart on KDE and it will creates an instance for XSETTINGS manager for KDE for imsettings. I'll backport it for F-9 when got more feedbacks and stabilize it.

Comment 10 Aniket 2008-10-20 08:34:10 UTC
well, thanks for the tip , I added " export GTK_IM_MODULE=scim" to /etc/ke/env/env.sh and sure enough I can use scim in any GTK app now under KDE! This is very good , as I had previously modified the menu entries in Kmenu to prefix "GTK_IM_MODULE=scim" to application command fields to get scim for my favourite few apps like Thunderbird, Firefox and Empathy. This created a problem in Gnome as after changing the entry, Gnome would now launch these apps from menu! 

I also vote for this fix to be backported to F-9 , it will be great to have it so.

Comment 11 Denis Dzyubenko 2008-11-03 15:36:40 UTC
(In reply to comment #9)
Qt does load the input method plugin lazily when the focus moves to the input widget first time.

Also, the original problem mentions a crash:

> Also 
> clicking exit on the scim icon owned by root (my guess) causes plasma and many 
> apps in KDE to crash.

That sounds like the application uses scim instead of scim-bridge. At least I can reproduce a crash when using scim and closing the scim-panel tray icon, but that doesn't happen with scim-bridge.

So it needs to be checked if qt applications use the same input method - it might be that kdm uses scim and other qt apps use scim-bridge which might explain multiple instances of scim.

Comment 12 Jens Petersen 2008-11-04 00:05:44 UTC
(In reply to comment #9)
> Do not suggest that. it will breaks KDE preference. for F-9, you could just
> have "export GTK_IM_MODULE=scim-bridge" under /etc/kde/env/ for a workaround.
> it will be evaluated after xinput.sh and before bringing up KDE.

Why isn't xinput.sh sufficient for this in F9 currently?

Comment 13 Akira TAGOH 2008-11-04 01:33:25 UTC
Because that workaround is just needed for KDE only. modifying xinput.sh itself affects to others and there are no way to know which desktop is currently running.

Comment 14 Akira TAGOH 2008-11-04 01:36:35 UTC
We do the similar thing for F-10, FYI.

Comment 15 Jens Petersen 2008-11-05 00:51:54 UTC
This is bug 468814 (rawhide) for F9.

Comment 16 Than Ngo 2008-11-06 13:59:12 UTC
it's fixed in qt-4_4_3-2_fc9

Comment 17 Fedora Update System 2008-11-10 09:43:31 UTC
qt-4.4.3-2.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/qt-4.4.3-2.fc9

Comment 18 Fedora Update System 2008-11-19 14:56:05 UTC
qt-4.4.3-5.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update qt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-9780

Comment 19 Fedora Update System 2008-11-26 06:19:54 UTC
qt-4.4.3-5.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.