LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't type in foreign characters after scim-bridge removal (https://www.linuxquestions.org/questions/slackware-14/cant-type-in-foreign-characters-after-scim-bridge-removal-4175454123/)

TommyC7 03-14-2013 07:47 PM

Can't type in foreign characters after scim-bridge removal
 
Hi folks,

So after scim-bridge was removed from -current, I wasn't able to type in foreign characters anymore. Before (when I was helping another user with scim's zh-pinyin option) the update I was able to, but now I cannot.

The scim executable still starts up, but I am unable to change which foreign keys I wish to type in either via manually clicking on the icon or by the Ctrl+Space options.

Because scim-bridge was removed and the ChangeLog.txt said scim-bridge's functionality was added to scim-1.4.14, I attempted to edit /etc/profile.d/scim.csh and /etc/profile.d/scim.sh (only scim.sh is shown here, though):

Code:

--- /etc/profile.d/scim.sh        2011-03-19 16:12:44.000000000 -0700
+++ scim-bridge-removal.txt        2013-03-14 17:37:50.535838907 -0700
@@ -18,12 +18,12 @@
  export XIM_PROGRAM="/usr/bin/scim -d"
 fi
 
-if [ -x /usr/bin/scim-bridge ]; then
+if [ -x /usr/bin/scim ]; then
  # Let GTK applications like Firefox/Thunderbird use scim-bridge as
  # default immodule:
-  export GTK_IM_MODULE="scim-bridge"
+  export GTK_IM_MODULE="scim"
  # Enable Qt4/KDE4 applications to use scim:
-  export QT_IM_MODULE="scim-bridge"
+  export QT_IM_MODULE="scim"
 fi
 
 # This ensures scim starts when you logon.

I noticed that the environment variables are only passed if scim-bridge is executable, so I thought maybe "scim-bridge" was still correct but it wasn't getting exported because scim-bridge doesn't exist anymore. But regardless of exporting either "scim-bridge" or just "scim", I still couldn't get scim to type in foreign characters.

I was wondering if anybody else was able to get scim working after the scim-bridge removal, or if it was just me that was suffering from this problem?

Ahau 03-15-2013 12:36 AM

Well, shoot, there I go again, trying to help but I wind up breaking things ;)

scim is still working for me without scim-bridge. I did edit /etc/profile.d/scim.sh. I put everything inside the first if/fi statement, so it looks like this:

Code:

if [ -x /usr/bin/scim ]; then
  # Enable legacy X applications to use scim:
  export XMODIFIERS="@im=SCIM"
  export GTK_IM_MODULE="scim"
  export QT_IM_MODULE="scim"
  ## Enable Qt/KDE applications to use scim (not working with kde4):
  #export QT_IM_MODULE="scim"
  # Make scim start automatically if the "magic key" Ctrl-Space is pressed:
  export XIM_PROGRAM="/usr/bin/scim -d"
fi

But obviously it should be doing the same thing as your edited script.

Have you tried running 'update-gtk-immodules'? You might also have some cache files that are interfering, in /tmp or $USER/.scim

I should note that I'm not running slackware current. I'm using the packages from Slackware 14 (converted to porteus modules).

ill323 03-15-2013 12:39 AM

Same problem here.
I can input Chinese in Konsole, but not in Chrome/Firefox...

Ok, after this change and reboot, everything works again:

Code:

--- scim.sh.orig        2011-03-21 19:41:00.000000000 +0800
+++ scim.sh    2013-03-15 13:56:09.000000000 +0800
@@ -24,6 +24,9 @@
  export GTK_IM_MODULE="scim-bridge"
  # Enable Qt4/KDE4 applications to use scim:
  export QT_IM_MODULE="scim-bridge"
+else
+  export GTK_IM_MODULE="scim"
+  export QT_IM_MODULE="scim"
 fi
 
 # This ensures scim starts when you logon.

It seems that
+ export QT_IM_MODULE="scim"
is unnecessary,
without it, KDE application works well...

TommyC7 03-15-2013 02:27 AM

Hey guys,

First of all, I want to say thank you for responding. I really appreciate it. Even if you don't use scim, thank you for helping me test.

ill323, the
Code:

export QT_IM_MODULE="scim"
line is actually commented out in the first part of the scim.sh and scim.csh scripts where the scripts test if scim is executable. According to the comment on the scripts, apparently they're not working with kde4.

Both of you are correct. I thought that after editing scim.sh and/or scim.csh, I could just source the files again via
Code:

. /etc/profile.d/scim.sh
Despite the fact that I did so, scim did not work (not sure why, was super sure this is what happens at boot via the /etc/profile script.

So then I tried exporting the variables manually:
Code:

export GTK_IM_MODULE="scim" &&
export QT_IM_MODULE="scim" &&
scim -d

Which for reasons unbeknownst to my petite brain, I could not figure out.

So with the scim.sh and scim.csh scripts edited with the variables set to "scim", I rebooted and scim works again. I've sent patches to Pat and mentioned this thread. Hopefully he applies the patches in the next batch of updates.

Thanks again, guys!

Ahau 03-15-2013 12:00 PM

Glad you got it sorted out!

Out of curiousity, did you try loging out/back in to restart your session, or restarting X without rebooting? That might be worth a try for those who prefer not to reboot (shared systems, servers, etc)

TommyC7 03-15-2013 01:24 PM

Ah, that's what I forgot to do. I didn't re-login. :/


All times are GMT -5. The time now is 11:03 PM.