View Single Post
Old 08-23-2014, 02:16 AM   #1
anavin
Enthusiast
anavin put the bomp in the bomp-a-bomp-a-bomp.anavin put the bomp in the bomp-a-bomp-a-bomp.anavin put the bomp in the bomp-a-bomp-a-bomp.anavin put the bomp in the bomp-a-bomp-a-bomp.anavin put the bomp in the bomp-a-bomp-a-bomp.anavin put the bomp in the bomp-a-bomp-a-bomp.anavin put the bomp in the bomp-a-bomp-a-bomp.anavin put the bomp in the bomp-a-bomp-a-bomp.anavin put the bomp in the bomp-a-bomp-a-bomp.anavin put the bomp in the bomp-a-bomp-a-bomp.anavin put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 34
Karma: 67986
Join Date: Feb 2014
Device: Kobo Glo, Kobo Aura H2O
Calibre 2.0, Linux, Chinese input method

I've come into some problems about Chinese input method under Linux (openSUSE 13.1, to be specific) and managed to deal it with a workaround, here it is:

I couldn't type Chinese on Calibre 2.0... well, on all Qt 5 applications under Linux (e.g. Sigil 7), actually.
After a quick research I found that my input method, gcin, haven't develop a qt5-immodule yet.
So I installed fcitx (another input method), along with its qt5 module (thanks to all volunteers on software.opensuse.org.)
However I still couldn't type Chinese on Calibre, yet I could on Sigil now.
With another quick research I found Calibre use its own Qt5 library with its own plugin directory:
Code:
/opt/calibre/lib/qt_plugins
So I linked the input method plugins directory to Calibre's Qt plugin directory:
(the plugin directory might vary on different distributions with different CPU architectures)
Code:
su -
cd /opt/calibre/lib/qt_plugins
ln -s /usr/lib64/qt5/plugins/platforminputcontexts/ .
And now I can type Chinese on Calibre 2 again.

Update:
It seems I can edit an environment variable to achieve the same result, since reinstalling calibre could wipe out the link I created:
Code:
export QT_PLUGIN_PATH=$QT_PLUGIN_PATH:/usr/lib64/qt5/plugins/
But I'm not sure mixing KDE4/Qt4/Qt5 plugin paths together in one variable is a good idea :P

Last edited by anavin; 08-26-2014 at 10:59 AM.
anavin is offline   Reply With Quote