[kde-linux] globally using an input method engine
Joe Friedrichsen
pengi.films at gmail.com
Sat Nov 5 08:05:32 UTC 2005
D. Levi Durham wrote:
> startkde weather started from the command line or from kdm/gdm/xdm is a shell
> script run with sh (which on most linux systems is an alias for bash). To
> check weather the environmental variables for scim were available, I added
> the following line to startkde and started a new session:
>
> echo `set|grep -i scim` > ~/kdescimenv
>
> receiving the output in the specified file:
>
> GTK_IM_MODULE=scim QT_IM_MODULE=scim XIM_PROGRAM='scim -d' XMODIFIERS=@im=SCIM
>
> Further, to double check that the variables were available, I ran the
> following, from the mini-cli of course, as it shares the same environment as
> the rest of kde:
>
> kdialog --msgbox "`set|grep -i scim`"
>
> giving me:
>
> BASH_EXECUTION_STRING='kdialog --msgbox "`set|grep -i scim`" '
> GTK_IM_MODULE=scim
> QT_IM_MODULE=scim
> XIM_PROGRAM='scim -d'
> XMODIFIERS=@im=SCIM
>
> So it works here throughout the environment, you may need to double check
> that .bashrc is sourced from .bash_profile. I delete my install of kde from
> svn every few weeks and recompile the whole thing, so i know i haven't messed
> with anything there, and i did an 'emerge -uDev world' not to long ago and
> nothing stopped working, so i assume any changes i ever made to the startup
> scripts has gone away.
Still no luck for me on this approach. In ~/.bash_profile ~/.bashrc is
sourced; in ~/.bashrc, ~/.i18n is sourced. .i18n is
# .i18n
# Set up internationalization
# scim/skim
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
export XIM_PROGRAM="scim -d"
export XMODIFIERS="@im=SCIM"
In /usr/bin/startkde, I've added a check like yours (to the very end):
#########################################################
echo >> /home/friedrij/kdestartenv
echo "`date +%c`" >> /home/friedrij/kdestartenv
echo "`set`" >> /home/friedrij/kdestartenv
echo >> /home/friedrij/kdestartenv
#########################################################
And when I logout, restart X, and login (via gdm), kdestartenv has none
of the variables exported in ~/.i18n. However, when I start Konsole, I
see them when I type "set". I think I'll chose Kevin's style and source
from ~/.kde/env (I read the lines that source those files in startkde).
>
> Also, I've found that LC_CTYPE no longer needs to be set to the auxiliary
> language, in fact it caused a few problems, especially with Java. Which is
> why i have LC_ALL set to en_US.utf8 in the script i shared. (if LC_ALL is set
> the shell ignores all other LC_* variables set by the shell).
LC_CTYPE is still necessary for me. With it set to en_US.UTF-8, I cannot
use scim (Ctrl-<space> does not toggle my input method), but when I set
it to ja_JP.UTF-8, I can. You indeed have a miracle set-up!
Joe
More information about the kde-linux
mailing list