[R-sig-Debian] [R] fix and edit don't work: unable to open X Input

Paul Johnson pauljohn32 at gmail.com
Wed Jan 11 00:02:22 CET 2012


Solution! In case you see this error:

On Mon, Jan 9, 2012 at 11:37 PM, Paul Johnson <pauljohn32 at gmail.com> wrote:
>
>> fix(warpbreaks)
> Error in dataentry(datalist, modes) : invalid device
> In addition: Warning message:
> In edit.data.frame(get(subx, envir = parent), title = subx, ...) :
>  unable to open X Input Method
>

The problem is a stray or mistaken configuration for multi-character
languages in your environment.  The problem is not the X11 display,
but rather in keyboard input, possibly a mismatch between what
keyboard input system you are actually using and that which is
specified in some environment variables.

This has cropped up from time-to-time concerning R:

https://bugs.launchpad.net/ubuntu/+source/r-base/+bug/48168

but it usually cures itself before anybody writes out a completely
clear explanation of what is wrong, how it went wrong, and what fix is
minimally sufficient to fix it.  I do not believe I intentionally
changed any input settings, but plenty of updates from Debian Wheezy
have flown by.

The posts in that ubuntu bug say check your locale and input settings,
in particular, Run this:

$ echo $XMODIFIERS
$ echo $GTK_IM_MODULE

In my case, those were returning some settings that were not
applicable, i.e., applied to programs I no longer had installed.

Clearing out those settings in the shell caused R's fix to work again:

$ export XMODIFIERS=
$ export GTK_IM_MODULE=

To make the fix permanent, I did quite a bit of poking about.
(Editorial comment: This is one of the times when running a RedHat
based system may be easier because there's more "corporate" dedication
to making sure that details like this actually work.)

In the Debian repositories, I found a program called "im-switch" that
seems to have got it right. im-switch pops up

Select User Input Method for en_US. User choice uspercedes system
choice marked as default.

With these options:

X default  Use setting by the sysadmin
X              Use xim
X              Use thai IM_MODULE
X              Do not use Input Method
X              Use thai IM_MODULE
X              Use thai xim
X              Remove user choice to enable system choice

That actually worked, unfortunately, the README.Debian file

im-switch for Debian
im-switch is deprecated.
Please install im-config package for Wheezy.
This package will be droped completely for Wheezy+1.

That's too bad. I'm learning my way around im-config.

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas



More information about the R-SIG-Debian mailing list