Mendeley Fcitx Problem

Update 2018-06-16

Congratulations! mendeley have a new update version 1.19.1 and the bundled PDF reader has the ability to show most of PDF correctly without font mess. However, The bundled qt version also has updated to qt5.10.1. And then we have no choice but compiling libfcitxplatforminputcontextplugin.so for mendeleydesktop to support fcitx input method.

Earlier, system’s qt version are the same as mendeleydesktop’s, It is easy for me to have a link libfcitxplatforminputcontextplugin.so to corresponding mendeleydesktop’s fold. However, these days, System’s qt version updates to qt5.11.0, so system’s fcitx plugin do not suit for Mendeley’s new version. It need rebuild fcitx-qt5.

Rebuilding libfcitxplatforminputcontextplugin.so needs qt5.10.1, we downloaded and made great efforts to compile it before. We could learn more in the hard way but waste too much time as well. Actually, Qt official website provide compiled binary Qt package, so just download and install it!

qt-opensource-linux-x64-5.10.1.run Download

And then add executable permission of the .run file. Next up, execute it.

chmod +x ./qt-opensource-linux-x64-5.10.1.run
./qt-opensource-linux-x64-5.10.1.run

And then choose a install path(Default $HOME/Qt5.10.1) and install it.

Next step is to compile fcitx-qt5, The method I have described at Section 2.12 in current blog. The only stuff we need pay attention to is change default qt’s path such as:

# Suppose Qt5.10.1 has beend installed under default path
$ export PATH=$HOME/Qt5.10.1/5.10.1/gcc_64/bin:$PATH

Of course, We also provide libfcitxplatforminputcontextplugin.so for download directly. Refer to Section 2.3.

Update 2018-04-14

Mendeley have updated to version 1.18, And the dependency version have updated to QT5.10,So then the Mendeley works well in many Linux distribution.

If the fcitx Problem remains, Maybe you should check the qt version of system by qmake -v, if it is equal to 5.10, You could make a file link libfcitxplatforminputcontextplugin.so to system’s for mendeley.

$ cd mendeleydesktop/lib/mendeleydesktop/plugins/platforminputcontexts
$ ln -s /usr/lib/qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so

if not, you need additional steps: delete/rename Qt libraries directory of mendeley and force the mendeley use system Qt.

$ cd mendeleydesktop/
$ mv qt qt_bk

NOTE: mendeleydesktop/ means the top install directory of mendeley

Following the Earlier Content

There are two problems when using mendeley in linux:

  1. Can not use fcitx input method(but ibus works well)
  2. Can not open pdf file externally

Here is my working environment:

  1. Manjaro(based on arch)
  2. KDE plasma
  3. menedelay install from AUR(version: 1.17.11/1.17.12)

So what is cause of such two problems? This should be blamed on built-in qt5, it missing a qt fcitx plugin named libfcitxplatforminputcontextplugin.so under the directory mendeleydesktop/lib/mendeleydesktop/plugins/platforminputcontexts/.

So, is there any way to solve it? Of course, there are two ways.

1. Way One

One way is to use system’s qt envrionment instead of private:

$ export LD_LIBRARY_PATH=/usr/lib   #/usr/lib contains system's qt5 libraries
$ /opt/mendeleydesktop/lib/mendeleydesktop/libexec/mendeleydesktop.x86_64

If some error remind you that the system’s qt lack of some necessary module, just find the package name and install it.

The menedeley works well expect connecting to the network, it means that it is not the perfect way to solve the problem, here is the solution:

# Exchange the qt directory of mendeley
$ cd /opt/mendeleydesktop/lib
$ sudo mv qt qt_bk
# You should make sure the system's qt library under this directory
$ sudo ln -s /usr/lib qt
# copy fcitx library plugin
# Of course, you should check system's libfcitxplatforminputcontextplugin.so directory
$ cd /opt/mendeleydesktop/lib/mendeleydesktop/plugins/platforminputcontexts
$ sudo ln -s /usr/lib/qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so

And you could startup mendeley in normal way. And the two problems above have been solved[and become faster than before].

UPDATE:208-01-13
When system qt updated to 5.10, the method will lead to mendeley failed to shake SSL hands, thus, it means that we can not sync the data…Maybe the best way to solve the problem is compile the whole qt5.5.1 for mendeley but I am filed to compile

2. Way two

Another way is to compile libfcitxplatforminputcontexplugin.so under qt5.5, and then put it under proper directory. Of course, it is a troublesome method.

2.1 Build qt5.5

First you should download the qt source from here and then decompress it:

Download Address: QT 5.5.1 source

And Then comfigure and compile it

$ sudo mkdir /opt/qt5.5.1
$ cd ./qt-everywhere-opensource-src-5.5.1
$ ./configure --prefix=/opt/qt5.5.1 -no-openssl
# this would make compile faster, the number follow "j" depend on the number of core.
$ make -j4
$ sudo make install

And Then you would find that qt have been installed under /opt/qt5.5.1 directory.

2.2 Build fcitx-qt5

The next step is to build fcitx-qt5, which provides libfcitxplatformminputcontextplugin.so. The fcitx-qt5 source could clone from github.Here are the detailed process:

$ git clone https://github.com/fcitx/fcitx-qt5.git
$ cd fcitx-qt5
# Specify the qmake path of qt5.5.1
$ export PATH="/opt/qt5.5.1/bin/:$PATH"
$ cmake ./
$ make

And then you would find the so file under fctix-qt5/platforminputcontext,just copy it to corresponding directory of mendeley.

$ cp libfcitxplatformminputcontextplugin.so /opt/mendeleydesktop/lib/mendeleydesktop/plugins/platforminputcontexts

2.3 Quick way

Here I would provide the libfcitxplatformminputcontextplugin.so which compiles with qt5.5.1/x86_64, just copy it!
New version qt5.10.1/x86_64

DownLoad Address: libfcitxplatformminputcontextplugin.so

Of course, it can not solve the problem 2 that opening pdf file externally failed. However if you do not have the problem, it is the best and fast way.

此条目发表在LINUX, 软件安装分类目录,贴了标签。将固定链接加入收藏夹。

13 则回应给 Mendeley Fcitx Problem

  1. fef说: 2017年10月25日 上午8:04
    Firefox 56 Firefox 56 Ubuntu Ubuntu

    Hello,

    I found this article to be only useful one online about Mendeley. But, I use Ubuntu and wasn’t able to build PyQt5.5.1. Can you please help me the steps?

    • yinflying说: 2017年10月26日 上午11:35
      Firefox 55 Firefox 55 GNU/Linux GNU/Linux

      I dont know what happened to you ? Why should you build pyqt? I am sorry for my muddy thinking of the relationship between pyqt,ubuntu and mendeley…

  2. 匿名说: 2017年11月9日 上午1:03
    Vivaldi 1 Vivaldi 1 GNU/Linux GNU/Linux

    I had same input problem too, but solved with the way one.
    thanks!

  3. FindHao说: 2017年11月21日 下午4:05
    Google Chrome 62 Google Chrome 62 GNU/Linux GNU/Linux

    Debian 9 qt5.7
    无法使用系统的lib,博主提供的lib也无法使用。不准备手动编译,防止系统的qt被搞乱。。
    已经提交ticket给mendelay,希望他们能看到这个问题。。。

  4. Jackie说: 2017年12月18日 下午2:53
    Google Chrome 63 Google Chrome 63 GNU/Linux GNU/Linux

    直接下载下来放到指定目录没起作用。编译倒是不难,但是怕把系统 QT 搞坏了。
    这个问题在很多 QT 软件都有。我 Debian sid 下面不能用 Fcitx 的 QT-based 的软件包括 Mendeley Desktop,RStudio,福昕阅读器,Master PDF Editor 等。

    • yinflying说: 2017年12月19日 下午7:20
      Firefox 56 Firefox 56 GNU/Linux GNU/Linux

      “怕把系统的QT搞坏了”,指定好安装位置就不存这个问题,我的系统上就有着三个编译好的QT。你这么多都不能用还真是奇怪,至少以前的foxitreader我以前似乎可以直接用的。情况不明,不好说。

      • Jackie说: 2017年12月19日 下午8:27
        Google Chrome 63 Google Chrome 63 GNU/Linux GNU/Linux

        编译又会带来其他问题啊,Mendeley 是基于哪个版本 QT 我都不清楚,类似的问题还有福昕,RStudio 等。其次,现在 Mendeley 基于 QT x.y.z,我编译了可以了,下次 Mendeley 更新了基于 QT x.z.a 了难道又编译一次,这子子孙孙无穷匮啊。

      • Jackie说: 2017年12月20日 下午2:47
        Google Chrome 63 Google Chrome 63 GNU/Linux GNU/Linux

        UPDATE: 自己编译了两个版本 QT,先后解决 Mendeley 和 RStudio 里的问题了。

        • yinflying说: 2017年12月21日 上午11:50
          Firefox 56 Firefox 56 GNU/Linux GNU/Linux

          一般软件内置的qt更新速度都是非常慢的,另外如果功能满足的话,也用不着更新你的软件。另外,你编译的好的so文件能否共享?可以通过github的pr的形式,也可通过邮箱。方便后来者。

          • Jackie说: 2017年12月21日 下午12:30
            Opera 6 Opera 6 Android 8.0.0 Android 8.0.0

            可以啊,但是不知道放在哪里方便。有 GitHub repo 么?

          • FindHao说: 2017年12月21日 下午7:11
            Google Chrome 63 Google Chrome 63 GNU/Linux GNU/Linux

            内置的qt版本太低了,而且编译出来的so库都是动态库,而本身发行版的qt版本一般都很高,所以单独放so貌似没什么用 。

        • yinflying说: 2017年12月23日 下午12:05
          Firefox 56 Firefox 56 GNU/Linux GNU/Linux

          https://github.com/yinflying/BlogSource 专用于放本博客的资源。
          由于各系统的编译环境并不相同,直接放so文件是存在一定的动态库兼容性问题,这种情况无法避免,但是相同的系统下一般问题是不大的。

          • Jackie说: 2017年12月23日 下午2:54
            Opera 6 Opera 6 Android 8.0.0 Android 8.0.0

            PR 你了。第一次 PR,不太会用。

发表评论

电子邮件地址不会被公开。