AppImageKit
AppImageKit copied to clipboard
AppImages don't work with non-English input
Steps to reproduce:
- On Ubuntu (18.04LTS in my case) change the input language to Russian phonetic
- Type into the Firefox browser, GTK+ app, Qt app - text will be Cyrillic
- Type into a Qt app running from AppImage (like Tiled) - text is English, not Cyrillic
- Type into same Qt app running without AppImage - text is correctly Cyrillic
I'm an app developer now branching into i18n and I'm hit by this - are there any known fixes?
Probably more an issue for linuxdeploy(qt).
I doubt it's an AppImage related issue. Does the behavior change when extracting the AppImage?
AppImageLauncher's AppImage is coming with some Russian translations, too, maybe you could try its AppImage and see whether you can reproduce the issue: https://github.com/TheAssassin/AppImageLauncher/releases
AppImageLauncher-travis287-git20180830.ba45feb-x86_64.AppImage seems to be a command-line tool without any Qt UIs I can input text into, how do you mean to use it?
It's a UI that is supposed to be called on AppImages by the system. That's a bit counterintuitive I guess. Please call from the CLI like ./AppImageLauncher*.AppImage <some other AppImage, not AppImageLauncher itself>.
Okay - I did ./AppImageLauncher-travis287-git20180830.ba45feb-x86_64.AppImage ./Tiled-1.1.6-x86_64.AppImage and Tiled still had the same problem.
@vadi2 was AppImageLauncher's UI in Russian, though? That's what I wanted to know, actually, as I know AppImageLauncher ships with Russian translations.
My system is in English, I only use Russian with a few select applications (and even then I prefer an English UI).
Potentially a Qt Input Method plugin needs to be bundled in the AppDir.
Usage examples:
-extra-plugins=sqldrivers/libqmsql.so,iconengines/libqsvgicon.so
-extra-plugins=sqldrivers,iconengines/libqsvgicon.so
-extra-plugins=sqldrivers,iconengines,mediaservice,gamepads
Of course you need to specify the corresponding input method plugin(s).
Does this help?
(Why Qt requires a plugin to accept foreign text is a mystery to me.)
How would I identify such plugins?
Look for inputplugins in your Qt installation. Let me know if you need a copy-paste example.
I've added platforminputcontexts/libcomposeplatforminputcontextplugin.so and platforminputcontexts/libibusplatforminputcontextplugin.so - confirmed that they are deployed - but no luck still.
Interesting. Not sure what to do then, we need someone who knows more about the inner workings of Qt.
I found
plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so
plugins/platforminputcontexts/libibusplatforminputcontextplugin.so
plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so
I am not sure what they all do but I think we need to experiment. (These I found by looking at a Qt 5.8 installation and searching for "input".)
Hi @vadi2, did including the plugins mentioned above solved your issue?
No.
@vadi2 can you please point us to the AppImage that includes the above-mentioned plugins and still has the issue? This will greatly help us in debugging. Thanks.
(Most likely this issue will need to be moved to linuxdeployqt since it is most likely not an AppImage tools issue but rather an issue with what happens to be inside this particular AppImage.)
I am using an existing AppImage modified to support Japanese input.
I hope that sharing this hack will lead to a fundamental solution to this issue.
Currently, AppImage does not work well under fcitx5+mozc.
The reason for this depends on the application framework.
GTK
In AppRun, you need to define GTK_IM_MODULES_FILE.
example:
PLATFORM=x86_64-linux-gnu
export GCONV_PATH="$HERE/usr/lib/$PLATFORM/gconv"
export FONTCONFIG_FILE="$HERE/etc/fonts/fonts.conf"
export GTK_EXE_PREFIX="$HERE/usr"
export GDK_PIXBUF_MODULEDIR=$(readlink -f "$HERE"/usr/lib/$PLATFORM/gdk-pixbuf-*/*/loaders/ )
export GDK_PIXBUF_MODULE_FILE=$(readlink -f "$HERE"/usr/lib/$PLATFORM/gdk-pixbuf-*/*/loaders.cache )
export GI_TYPELIB_PATH="$HERE/usr/lib/$PLATFORM/girepository-1.0"
export GTK_IM_MODULES_FILE="$HERE/usr/lib/gtk-3.0/3.0.0/immodules.cache"
export XDG_DATA_DIRS="$HERE/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
LIBRARY_PATH="$HERE/lib/$PLATFORM"
LIBRARY_PATH+=":$HERE/usr/lib/$PLATFORM"
LIBRARY_PATH+=":$HERE/usr/lib"
LIBRARY_PATH+=":$GDK_PIXBUF_MODULEDIR"
export LD_LIBRARY_PATH="$GDK_PIXBUF_MODULEDIR"
$HERE/usr/lib/gtk-3.0/3.0.0/immodules.cacheis copy of or symlink to/usr/lib/gtk-3.0/3.0.0/immodules.cache
QT
Add libfcitx5platforminputcontextplugin.so.