Red Hat Bugzilla – Bug 457626
Scim runs multiple instances
Last modified: 2008-11-26 01:19:58 EST
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/
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/
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):
Steps to Reproduce:
1.Install scim-bridge , and enable scim from im-chooser
2.log out and log back in
You will see 2 scim icons in the system tray, when actually there should be
only scim processes owned by the logged in user must be running. The process
for scim owned by root should not be present.
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.
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.
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.
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)
Well, If it may help to reproduce the bug, I am using KDM as login manager, and not GDM.
I can not launch kdm in my box in runlevel 3. :(
Does it happen with gdm? Could you try gdm? Thanks.
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
And , even with GDM, GTK cant use scim under KDE.
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.
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.
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.
(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:
> 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.
(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?
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.
We do the similar thing for F-10, FYI.
This is bug 468814 (rawhide) for F9.
it's fixed in qt-4_4_3-2_fc9
qt-4.4.3-2.fc9 has been submitted as an update for Fedora 9.
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
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.