Would there be a tool to integrate the navigation in the content of an archive in Nautilus
, instead of using Archive Manager
?

- 327
- 1
- 4
- 18
2 Answers
This won't let you open archives seamlessly within the same instance of nautilus, but will allow you to open a zip file in a second, new instance of nautilus via a script (to be placed in ~/.local/share/nautilus/scripts
and made executable).
#!/bin/bash
# see: https://askubuntu.com/a/295312/480880
urlencode() {
# urlencode <string>
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
case $c in
[a-zA-Z0-9.~_-]) printf "$c" ;;
*) printf '%%%02X' "'$c"
esac
done
}
# taken from xdg-mime;
# xdg-mime itself is not used, as it's slow and we're already assuming presence of gvfs utils anyway
mime_type() {
gvfs-info "$1" 2> /dev/null | grep standard::content-type | cut -d' ' -f4
}
echo "$NAUTILUS_SCRIPT_SELECTED_URIS" | while read uri
do
mime_type="$(mime_type "$uri" )"
if [ "$mime_type" = "application/zip" ] # add mime-types as necessary
then
archive_path="archive://$(urlencode "$uri" )"
gvfs-mount "$archive_path"
gvfs_path="$( echo "$archive_path" | sed 's/%/%25/g')" # yes, the percentage signs are encoded, again!
# zenity --entry --entry-text="$gvfs_path"
nautilus "$gvfs_path"
fi
done

- 975
I advise you to use Ark
It manages various archive formats, including tar, gzip, bzip2, rar and zip, as well as CD-ROM images. Ark can be used to browse, extract, create, and modify archives. This package is part of the KDE SC utilities module.
sudo apt-get install ark
Another good option is Xarchiver
It is a lightweight desktop independent GTK+ frontend for manipulating 7z, arj, bzip2, gzip, rar, tar, zip, rpm and deb files. It allows you to create archives and add, extract, and delete files from them. Password protected archives in the arj, 7z, rar and zip formats are supported.
sudo apt-get install xarchiver

- 84,289
-
Thank you, but this is not what I want. I'd like to be able to browse the archive content in nautilus... like in widnows – Gaël Barbin Mar 14 '14 at 08:28