default-settings icon indicating copy to clipboard operation
default-settings copied to clipboard

ibus configuration issue

Open peteruithoven opened this issue 7 years ago • 5 comments

Installing screenkey (0.9-2) by using sudo apt install screenkey and then starting it from the command line I'm seeing this error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/dist-packages/Screenkey/keylistener.py", line 245, in run
    raise Exception("Cannot initialize input method")
Exception: Cannot initialize input method

When I try the same with a cloned version of the latest version from gitlab.com/wavexx/screenkey I get a helpful popup pointing to a troubleshoot page: https://www.thregr.org/~wavexx/software/screenkey/#troubleshooting

This asked me to check the following environment variables, which should be consistent but aren't:

XMODIFIERS=@im=ibus
GTK_IM_MODULE=
QT_IM_MODULE=ibus

Following their advice and resetting all these environment variables before running it does work.

unset XMODIFIERS
unset GTK_IM_MODULES
unset QT_IM_MODULES
screenkey

I've opened an issue against screenkey in the past where they commented:

It seems that ElementaryOS presets ibus as the default input method without actually running ibus. The required configuration variables are also not completely set (GTK_IM_MODULES is missing), and ibus is left unconfigured as well.

See: https://github.com/wavexx/screenkey/issues/36#issuecomment-301322513

Is there something wrong with the default elementary OS configuration? Could I have done anything wrong? I find that these environment variables are the same on a fresh image started in a vm. I didn't find changes to these variables in ~/.profile, ~/.bash_profile or ~/.pam_environment.

peteruithoven avatar Jun 28 '17 13:06 peteruithoven