unable to open X Input Method

Bug #48168 reported by Stefano Costa on 2006-06-03
12
Affects Status Importance Assigned to Milestone
r-base (Ubuntu)
Medium
Unassigned

Bug Description

On Dapper.

> ls()
 [1] "dt2" "last.warning" "numero1" "pippo" "splus"
 [6] "tipo11" "tipo12" "tipo12b" "tipo7a" "z"
> pippo
  unh duh
1 34 8
2 43 7
3 39 5
4 37 8
5 44 6
6 29 7
> pippo = edit(pippo)
Errore in dataentry(datalist, modes) : invalid device
Inoltre: Warning message:
unable to open X Input Method
>

Stefano Costa (steko) wrote :

This bug is still present in Edgy.

Stefano Costa (steko) wrote :

I experience this bug also on Feisty.
I really would like to have data.entry commands working.

I noticed that this occurs on my laptop (Feisty), but not on my desktop that is running a slightly non-upgraded version of Dapper (no ADSL at home, too lazy).

I have some intuition it could be related to SCIM or something like that.

Attached is output of ps aux | grep scim
The desktop has no scim application running as far as I can tell.

Someone on the #R channel suggested this could be related to some setting in my .bashrc or .bash_profile (EDITOR) but other users on my laptop face the same problem, also if I create new user.

Dan O'Huiginn (daniel-ohuiginn) wrote :

Thanks for these reports.

I've been unable to replicate this, even after setting up SCIM. I've subscribed the CJK testing team - maybe somebody there has some ideas on how to debug this?

kovar (neviera) wrote :

I'm facing similar problem on Edgy 6.10, though with different warning. I'm not advanced on Linux, so need any suggestions how can it be solved.

> new <- edit(daily)
Error in dataentry(datalist, modes) : invalid device
In addition: Warning message:
unable to create fontset -*-fixed-medium-r-normal--13-*-*-*-*-*-*-*

Dan O'Huiginn (daniel-ohuiginn) wrote :

Could you please both provide the output of the ollowing commands, to give us information on your locales and input method setup:

locale
locale -a
echo $XMODIFIERS
echo $GTK_IM_MODULE
dpkg -l "*uim*" | grep "^ii"

Changed in r-base:
assignee: nobody → daniel-ohuiginn
status: Unconfirmed → Needs Info
Dan O'Huiginn (daniel-ohuiginn) wrote :

Also:
It looks like these errors are being generated by code in R for dealing with non-european languages. Here is the code triggering your bug Stefano: the call to open an X input method(XOpenIM) is failing for some reason.

if(mbcslocale) {
 ioim = XOpenIM(iodisplay, NULL, NULL, NULL);
 if(!ioim) {
     XDestroyWindow(iodisplay, DE->iowindow);
     XCloseDisplay(iodisplay);
     warning("unable to open X Input Method");
     return TRUE;
 }

(from https://svn.r-project.org/R/trunk/src/modules/X11/dataentry.c)

I hope that if you can provide the information about your input methods, somebody who knows more about R and CJK will be able to help.

Dan,
thanks for pointing out this. I think I had SCIM installed at one point
just because it was a dependency of the ubuntu-desktop metapackage.
Actually, I'm not using it at all.
Also, I tried removing SCIM, but the problem persists.

kovar (neviera) wrote :

Here's output you asked for

~$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

~$ locale -a
C
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
lt_LT.utf8
POSIX
ru_RU.utf8
ru_UA.utf8

~$ echo $XMODIFIERS

~$ echo $GTK_IM_MODULE

~$ dpkg -l "*uim*" | grep "^ii"
ii libgnomeuimm-2.6-1c2a 2.16.0-0ubuntu3 C++ wrappers for libgnomeui (shared library)

Stefano Costa (steko) wrote :

I had

 $ echo $XMODIFIERS
 @im=SCIM
 $ echo $GTK_IM_MODULE
 scim

Then I tried this

 $ export XMODIFIERS=
 $ export GTK_IM_MODULE=

and all data frame editing functions are working. I don't know where the
bug lies (SCIM itself? SCIM misconfiguration on behalf of Ubuntu?), but
at least for my case I have found the cause and a workaround.

Stefano Costa (steko) wrote :

I had

 $ echo $XMODIFIERS
 @im=SCIM
 $ echo $GTK_IM_MODULE
 scim

Then I tried this

 $ export XMODIFIERS=
 $ export GTK_IM_MODULE=

and all data frame editing functions are working. I don't know where the
bug lies (SCIM itself? SCIM misconfiguration on behalf of Ubuntu?), but
at least for my case I have found the cause and a workaround.
The bad part is that everytime I login those variables are again set to the bad values.

Le Wed, Mar 28, 2007 at 09:59:42PM -0000, Stefano Costa a écrit :
> I had
>
> $ echo $XMODIFIERS
> @im=SCIM
> $ echo $GTK_IM_MODULE
> scim
>
> Then I tried this
>
> $ export XMODIFIERS=
> $ export GTK_IM_MODULE=
>
> and all data frame editing functions are working. I don't know where the
> bug lies (SCIM itself? SCIM misconfiguration on behalf of Ubuntu?), but
> at least for my case I have found the cause and a workaround.

Dear Stefano,

The im-switch program from the im-switch package will help you to
configure this once for all.

Have a nice day,

--
Charles Plessy
http://charles.plessy.org
Wako, Saitama, Japan

Changed in r-base:
assignee: daniel-ohuiginn → nobody
status: Needs Info → Confirmed
Stefano Costa (steko) wrote :

seems like this got fixed in the latest R 2.5.0, at least the NEWS states:

The X11 dataentry() now has support for X Input Methods (contributed by Ei-ji Nakama).

Hope that fixes my problem.

Cesare Tirabassi (norsetto) wrote :

Marking this fix released following comment #12. Please reopen if not correct.

Changed in r-base:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers