Skip to content

slowpeek/mc-squashfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

About

This is a SquashFS plugin for Midnight Commander. Having it installed, you could explore the content of your *.squashfs and *.sqfs files the same way you do with zip, 7z etc.

Notice: When you access some file via a vfs layer in mc, the file is extracted into a temp dir (in order of precedence: $MC_TMPDIR, $TMPDIR, /tmp). So, for example, it is not a very bright idea to browse into a big squashfs file inside some ISO image: the whole squash would be extracted into the temp dir.

Installation

The code is based on the unsquashfs tool. In Ubuntu it comes with squashfs-tools package.

Notice: Pathes used below are from Ubuntu. It might differ in your distro.

There are two relevant config files:

  • global /etc/mc/mc.ext (since 4.8.29: /etc/mc/mc.ext.ini)
  • local ~/.config/mc/mc.ext (since 4.8.29: ~/.config/mc/mc.ext.ini).

The global config is not loaded if the local one exists.

Config snippet for this script (check your mc version with F1 key):

till 4.8.28
# .squashfs, .sqfs
regex/\.(squashfs|sqfs)
    Open=%cd %p/usqfs://
    
4.8.29+
[squashfs]
Regex=\.(squashfs|sqfs)$
Open=%cd %p/usqfs://
    

Local

  • put the script under ~/.local/share/mc/extfs.d/ and make sure it is executable
  • in mc menu select Command, then Edit extension file
  • insert the snippet somewhere under ### Archives ###
  • save it and exit the editor
  • restart mc to apply the changes

Global

  • put the script under /usr/lib/mc/extfs.d/ and make sure it is executable
  • open /etc/mc/mc.ext (since 4.8.29: /etc/mc/mc.ext.ini) in some editor
  • insert the snippet somewhere under ### Archives ###
  • save it and exit the editor
  • restart mc to apply the changes

Releases

No releases published

Packages

No packages published

Languages