Hi Emfox and Ming,
At Mon, 24 Oct 2005 09:59:25 -0500,
Ming Hua wrote:
> On Mon, Oct 24, 2005 at 12:14:16PM +0800, Emfox Zhou wrote:
> > im-switch is enabled once it is installed, even if leaving it
> > i think im-switch should get rid of system wide settings, (e.g, just
> > reading the user config files, a dirty patch attatched)
>
> I don't think such change would be accpeted by the maintainer. This
> patch completely removed the global configuration. And even worse, it
> doesn't fix the overriding ~/.gnomerc problem.
Yes. The subject of im-switch is to provide global default setting for
users.
> As a workaround, I would at least like to see im-switch honor some
> environment variable, like $DISABLE_IM_SWITCH or something, and if it's
> set, don't do these "unset XMODIFIERS etc., and source im-switch
> configurations" thing - i.e., put the whole thing in a "if [
> $DISABLE_IM_SWITCH != 1 ] ... fi".
>
> Does that sound like a sane solution? Of course, it would be best to
> implement a way to turn off im-switch, like /etc/default/im-switch or
> similar, and has a debconf question to control it.
Well, I have an another idea.. just respecting user's configuration.
How about following patch?
Index: xinput.sh
===================================================================
--- xinput.sh (revision 26)
+++ xinput.sh (working copy)
@@ -18,7 +18,13 @@
## try to source ~/.xinput.d/ll_CC or /etc/X11/xinit/xinput.d/ll_CC to
## setup the input method for locale (CC is needed for Chinese for example)
# unset env vars to be safe
-unset XIM XIM_PROGRAM XIM_ARGS XMODIFIERS GTK_IM_MODULE
+_XIM=$XIM
+_XIM_PROGRAM=$XIM_PROGRAM
+_XIM_ARGS=$XIM_ARGS
+_XMODIFIERS=$XMODIFIERS
+_GTK_IM_MODULE=$GTK_IM_MODULE
+_QT_IM_MODULE=$QT_IM_MODULE
+
lang_region=$(echo $tmplang | sed -e 's/\..*//')
for f in $HOME/.xinput.d/${lang_region} \
$HOME/.xinput.d/default \
@@ -28,6 +34,13 @@
done
unset lang_region
+[ "$_XIM" ] && XIM=$_XIM
+[ "$_XIM_PROGRAM" ] && XIM_PROGRAM=$_XIM_PROGRAM
+[ "$_XIM_ARGS" ] && XIM_ARGS=$_XIM_ARGS
+[ "$_XMODIFIERS" ] && XMODIFIERS=$_XMODIFIERS
+[ "$_GTK_IM_MODULE" ] && GTK_IM_MODULE=$_GTK_IM_MODULE
+[ "$_QT_IM_MODULE" ] && QT_IM_MODULE=$_QT_IM_MODULE
+
[ -n "$GTK_IM_MODULE" ] && export GTK_IM_MODULE
[ -n "$QT_IM_MODULE" ] && export QT_IM_MODULE
--
Kenshi Muto
[EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]