Solve a problem installing the kio_krarc.so file and related ones.
Closed, ResolvedPublic

Description

In Kubuntu 16.04 LTS Beta 2: Krusader can be compiled and executed but if the user tries to browse a a compressed file named FILE.7Z then in his panel he sees that "Error: The directory FILE.7z" does not exist." and in the command line he can see that error message:

couldn't create slave: "Unable to create io-slave:\nklauncher said: Unknown protocol 'krarc'.\n"

Note: When sudo make install is executed then those files are mentioned:

[...]
/usr/lib/x86_64-linux-gnu/plugins/kio_krarc.so
/usr/share/kservices5/krarc.protocol
/usr/lib/x86_64-linux-gnu/plugins/kio_iso.so
/usr/share/kservices5/iso.protocol
/etc/xdg/kio_isorc
[...]

Thanks!


Update. Date: 2016/04/04

Using Kubuntu 16.04_LTS_beta2, after some attempts to make Krusader browse .zip, .7z, etc. files:

To make Krusader browse .zip, .7z, etc. files, and consequently to avoid the error message that Krusader writes in the command line:

couldn't create slave: "Unable to create io-slave:\nklauncher said: Could not find the 'kio_krarc' plugin.\n"

it can be executed:

sudo mv /usr/lib/x86_64-linux-gnu/plugins/kio_krarc.so /usr/lib/x86_64-linux-gnu/qt5/plugins/

Although now the error message

error() called twice! Please fix the KIO slave.

appears in the command line each time that a .zip, .7z, etc. file is browsed.

To make Krusader browse .iso files, and consequently to avoid the error message that Krusader writes in the command line:

couldn't create slave: "Unable to create io-slave:\nklauncher said: Could not find the 'kio_iso' plugin.\n"

it can be executed:

sudo mv /usr/lib/x86_64-linux-gnu/plugins/kio_iso.so /usr/lib/x86_64-linux-gnu/qt5/plugins/

Although now the error message

KArchive: Null device specified

appears in the command line each time that a .iso file is browsed.

Additional information

In the Kubuntu 16.04_LTS_beta2 command line: that was seen when browsing a .7z file, after this a .zip and after this a .rar one:

$ /usr/bin/krusader 2>/dev/null
kdeinit5: Got EXEC_NEW '/usr/lib/x86_64-linux-gnu/qt5/plugins/kio_krarc.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/qt5/plugins/kio_krarc.so'
error() called twice! Please fix the KIO slave.
error() called twice! Please fix the KIO slave.
error() called twice! Please fix the KIO slave.
kdeinit5: PID 13167 terminated.

and in the Kubuntu 15.04 command line: nothing was seen when browsing a .7z file, after this a .zip and after this a .rar one:

$ /usr/bin/krusader 2>/dev/null    

Update. Date: 2016/04/05

Looking for more information I read that "QT_PLUGIN_INSTALL_DIR is deprecated" was explicitly stated, that can also be seen in

http://api.kde.org/ecm/kde-module/KDEInstallDirs.html
/usr/share/ECM/kde-modules/KDEInstallDirs.cmake

because QT_PLUGIN_INSTALL_DIR is written there between square brackets.

As seen in http://irclogs.ubuntu.com/2015/05/21/%23kubuntu-devel.html, if it's executed

qtpaths --plugin-dir    # // It substitutes the old `kde4-config --qt-plugins`

it shows

/usr/lib/x86_64-linux-gnu/qt5/plugins/

which is the place where a lot of plugins are in Kubuntu 16.04 LTS beta2, for example:

$ ls /usr/lib/x86_64-linux-gnu/qt5/plugins/*kio*
/usr/lib/x86_64-linux-gnu/qt5/plugins/kcm_kio.so           /usr/lib/x86_64-linux-gnu/qt5/plugins/kio_fonts.so
/usr/lib/x86_64-linux-gnu/qt5/plugins/kio_about.so         /usr/lib/x86_64-linux-gnu/qt5/plugins/kio_kdeconnect.so
/usr/lib/x86_64-linux-gnu/qt5/plugins/kio_activities.so    /usr/lib/x86_64-linux-gnu/qt5/plugins/kio_obexftp.so
/usr/lib/x86_64-linux-gnu/qt5/plugins/kio_applications.so  /usr/lib/x86_64-linux-gnu/qt5/plugins/kio_remote.so
/usr/lib/x86_64-linux-gnu/qt5/plugins/kio_bluetooth.so

because nowadays some distributions allow having different Qt versions of a plugin.

After some attempts, adding

-DKDE_INSTALL_USE_QT_SYS_PATHS=ON

to the cmake command achieves the goal of making kio_krarc.so and kio_iso.so work, without needing the

sudo mv /usr/lib/x86_64-linux-gnu/plugins/kio_krarc.so /usr/lib/x86_64-linux-gnu/qt5/plugins/
sudo mv /usr/lib/x86_64-linux-gnu/plugins/kio_iso.so /usr/lib/x86_64-linux-gnu/qt5/plugins/

commands that were talked about yesterday. Consequently that way Krusader, kio_krarc.so and kio_iso.so get executed correctly (*).

(*) Note: The forementioned error messages like

"error() called twice! Please fix the KIO slave." 
KArchive: Null device specified

keep appearing, although compressed files seem to be managed suitably.

Several KDE developers are recently seen using

-DKDE_INSTALL_USE_QT_SYS_PATHS=ON

and sometimes talking about it in:

asensi created this task.Apr 3 2016, 8:26 PM
asensi updated the task description. (Show Details)Apr 4 2016, 8:13 PM
asensi moved this task from TODO to In progress on the Krusader board.Apr 5 2016, 10:25 PM
asensi updated the task description. (Show Details)Apr 6 2016, 8:19 AM

As I was saying in related D1323 - thanks a lot for intel search!

I've noticed that when I browse an archive (7z) and want to open e.g. PDF in okular it always say krarc is unknown protocol. Even when writing to archives is disabled and even with KDE_INSTALL_USE_QT_SYS_PATHS ON. Is this also happening to you?

asensi added a comment.EditedApr 6 2016, 11:11 PM

Thank you, Martin:

I've noticed that when I browse an archive (7z) and want to open e.g. PDF in okular it always
say krarc is unknown protocol. Even when writing to archives is disabled and even
with KDE_INSTALL_USE_QT_SYS_PATHS ON. Is this also happening to you?

Yes. In the command line it's seen "Could not open krarc:/FILE.7z/INSIDE_FILE.pdf. Reason: Could not start process Unable to create io-slave:
klauncher said: Unknown protocol 'krarc'."

There's an explanation there: https://bugs.kde.org/show_bug.cgi?id=356920

gengisdave moved this task from In progress to Done on the Krusader board.Oct 10 2016, 8:47 PM