Browsing the content of an archive with Konqueror (.zip, .gz, .jar, etc.)

In Dolphin if I select the file icon of a .zip, .gz, or .jar file, it opens Ark. In Konqueror, both .zip and .gz files are directly browseable as if they were directories, e.g., zip:/home/hattons/opt/com/oracle/jdk1.7.0_60/, where is a zip archive.

Once upon a time, I believe I could browse .jar files in a like manner using Konqueror. Can this be done with Konqueror 4.11.5?

If I manually put the zip: in front of the file name, e.g., zip:/home/hattons/opt/com/oracle/jdk1.7.0_60/lib/ant-javafx.jar I can browse the .jar file in Konqueror. Looking in Konqueror->Settings->Configure Konqueror->File Management->File Associations, .zip and .jar files look very similar. One noticeable differences are that .zip files are associated with a type zip, whereas .jar files are associated with a mimetype-looking x-java-archive. Another difference is that in the *Embedding *tab for .zip, the radio buttons are grayed out. The are selectable for *x-java-archive. *Selecting Show file in embedded viewer, causes Konqueror to embed the Ark view, which is different from using the zip: protocol in the URI.

Is there a way to configure Konqueror to use the zip: protocol for .jar files?

Dolphin can do that as well (obviously, as Konqueror just embeds dolphin for file management).
You can enable it in Configure Dolphin->Navigation.

Is there a way to configure Konqueror to use the zip: protocol for .jar files?

I don’t think that’s possible.
Maybe by editing /usr/share/kde4/services/zip.protocol, but I haven’t tried that yet.
You might try to change the “File Associations” settings so that jar files are recognized as zip, might work maybe.

This does indeed work.

So copy /usr/share/kde4/services/zip.protocol to ~/.kde4/share/kde4/services/, open the copy in a text editor, and add “x-java-archive” to the list of mimetypes.


Then run “kbuildsycoca4 --noincremental” (all of that as user) and restart Konqueror/dolphin, and it should work.
If not, try to logout/login or reboot.

Yes, that worked. Thanks. Strangely, Dolphin worked immediately after the kbuildsyscoca4 executed. Konqueror required a re-login.