KDE input problems (KDE applications don’t accept input)

On KDE 5.28.0, which is currently the version of KDE included in Debian Stretch, you may run into the following problem: if you run IBus (to work with an IME like Mozc or Anthy to type Japanese), you might find that you sometimes lose the ability to input text in KDE/Qt applications (like konsole, or the run bar (krunner) when you press Alt+F2). It looks like you can fix this by running:

ibus-daemon -r -x -d

Since you can still type stuff in applications that don’t use Qt, such as Firefox, typing the above command into a text area in Firefox, copying and pasting (right click, paste) that text into krunner, then using your mouse to select “Command line: ibus-daemon -r -x -d”, you should be able to get input to work again. If you do not have any non-Qt applications, you could switch to the console and instead do:

DISPLAY=:0 ibus-daemon -r -x d

However, you may need a second hack to get Japanese input to work again: open xterm (not konsole) and activate your Japanese IME (which should work just fine). This seems to cause Japanese input to work again system-wide.

英語で書いてもあまり役に立たないでしょうから、日本語バージョンも合わせて書きます。

Debian Stretch に入っている KDE 5.28.0 に、(IBus が稼働している環境では)KDE/Qt 系のアプリケーションに、時々、何も入力できなくなる不具合があるようです。IBus のデーモンを再起動すると直るので、以下のコマンドを実行してみてください。

ibus-daemon -r -x -d

キーボードが使えないのに、コマンドを実行するのにはどうすればいいですかというと、Qt を使用しているアプリケーション以外の入力はできるはずなので、例えば Firefox のテキストボックスにコマンドを入力、コピーして、Alt+F2 で開ける実行メニュー (krunner) を開いて、コマンドを右クリックで貼り付けて、マウスで実行するように選択すれば、キーボードをほとんど使わずに実行できます。(ショートカットキーは使えるはずです。)
うまくいかない場合は、コンソールで以下のコマンドを実行すればいけると思います。

DISPLAY=:0 ibus-daemon -r -x -d

ただし、これだけでは日本語入力が直らない(場合があります?)。直らない場合は、xterm (konsole などではなく、xterm)を開いて、一回日本語入力に切り替えて、使えるかどうか試してみてください。(使えるはずです。)
これをやるだけで、他のアプリの日本語入力も直るようです。

Leave a Reply

Your email address will not be published.