Skip to content

Instantly share code, notes, and snippets.

@vinhjaxt
Last active February 22, 2025 01:51
Show Gist options
  • Save vinhjaxt/498b1348069cf047e121641c79777c6b to your computer and use it in GitHub Desktop.
Save vinhjaxt/498b1348069cf047e121641c79777c6b to your computer and use it in GitHub Desktop.
Gõ tiếng việt fcitx cho Viber

Gõ tiếng việt fcitx cho Viber

# https://docs.appimage.org/packaging-guide/manual.html
sudo apt install -y patchelf chrpath

./viber.AppImage --appimage-extract
cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so ./squashfs-root/plugins/platforminputcontexts

patchelf --set-rpath '$ORIGIN/../../lib' ./squashfs-root/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so
# chrpath -r '$ORIGIN/../../lib' ./squashfs-root/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so
chmod +x ./squashfs-root/plugins/platforminputcontexts/*

objdump -x ./squashfs-root/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so
readelf -d ./squashfs-root/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so
# chrpath -l ./squashfs-root/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so

# Download appimagetool from https://github.com/AppImage/AppImageKit/releases

appimagetool squashfs-root/ viber.AppImage
@burbilog
Copy link

Does not work with modern linux and modern viber.

@number3d
Copy link

Does not work with modern linux and modern viber.

approach is slightly different now.

find out your viber's qt version:

strings /opt/viber/lib/libQt6Core.so.6 | grep "Qt 6."

find libfcitx5platforminputcontextplugin.so for this qt version.

launch viber with QT_DEBUG_PLUGINS=1 and see if you have fcitx5 input method loaded

afterwards you should be ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment