[Uim] Die, .uim file, die!
Dave M G
martin at autotelic.com
Thu Apr 20 12:19:02 EEST 2006
Jun,
Thank you for following up.
> Hmm... aha! You should have a file named
> /etc/X11/xinit/xinput.d/uim_anthy and I think that's the script that's
> bothering you. Try replacing it with an empty file and see if the
> problem goes away (don't forget to make a backup).
>
Success! Making /etc/X11/xinit/xinput.d/uim_anthy blank has stopped .uim
from being created.
> Now, supposing that that did the job, to fix the script, the whole
> thing should be enclosed in if ![ -d "$HOME/.uim.d" ] - fi.
Hmm... I tried this, but it seemed to revert back to creating the .uim
file again. I've included the contents of uim_anthy at the end of this
message, so if I have the syntax wrong, perhaps you could correct me.
But I can't help but wonder... since leaving this uim_anthy file empty
seems to make my Japanese input settings work exactly as I intend, is
there any reason I should have this file at all or attempt to edit it?
Is there a disadvantage to leaving it blank, or deleting it?
> Very
> likely uim-prime, uim-canna and friends have the same defect.
>
I don't have either of these files, if that makes any difference. I have
a scim-prime file, and nothing that says anything about canna.
> But I'm not sure that's the right way to fix it. I also found the
> script on my Debian box, which is somehow never executed. So it could
> be that whatever's calling the script is doing so when it shouldn't.
>
> Oh well. The Debian maintainer probably knows the situation better.
> Let me know if it works, so that hopefully I can post it to Debian's
> bug tracker. (Or would you take the honor?)
>
Perhaps you could. I've never reported a bug before, and I don't know
how the Debian/Ubuntu relationship works, so I'm lacking knowledge and
confidence about how to go about reporting the bug. In fact, I'm not
even sure what is the bug here. Is it the presence of the file? Its syntax?
Here is the contents of uim_anthy (which I moved to uim_anthy_backup for
now)
dave at homebase:/etc/X11/xinit/xinput.d$ more uim_anthy_backup
XIM=uim
XIM_PROGRAM=/usr/bin/uim-xim
XIM_ARGS=
GTK_IM_MODULE=uim
ENGINE=anthy
if [ -d "$HOME/.uim" ]; then
TMPFILE=$(mktemp) || exit 1
if [ "$(grep "; IM-SWITCH VALUE" $HOME/.uim)" ]; then
sed "s/(define default-im-name '[^)]*) ; IM-SWITCH VALUE/(define
default-im-
name '$ENGINE) ; IM-SWITCH VALUE/" < $HOME/.uim > $TMPFILE
else
cat $HOME/.uim > $TMPFILE
if [ "$(grep -E "^\(define[[:space:]]+default-im-name[[:space:]]"
$HOME/.uim
)" ]; then
echo "; (define default-im-name '$ENGINE) ; IM-SWITCH VALUE" >>
$TMPFILE
else
echo "(define default-im-name '$ENGINE) ; IM-SWITCH VALUE" >> $TMPFILE
fi
fi
mv $TMPFILE $HOME/.uim
else
echo "(define default-im-name '$ENGINE) ; IM-SWITCH VALUE" > $HOME/.uim
fi
--
Dave M G
More information about the uim
mailing list