You are not logged in.

#1 2022-04-16 09:59:31

blacktav
Member
From: Alloue, France
Registered: 2012-04-14
Posts: 11

Midnight Commander (mc) and Opening/Viewing zip files

Hey

mc appears to have changed its behaviour preferring XDG helpers (i.e. Thunar) rather than uzip: to open zip files - totally daft for a command-line utility IMO

How can I get zip files to open in mc with uzip?

I have tried

  • editing mc.ext which is set correctly as

    Open=$cd $p/uzip://
  • hacking /usr/lib/mc/ext.d to remove xdg

Also zipfiles cannot be viewed either - throws an error
 

identify: no decode delegate for this image format 'ZIP'@ error/constitute...

evidently there is no valid viewing option (in xdg?)

Thanks


Mack

Offline

#2 2022-04-16 12:02:19

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: Midnight Commander (mc) and Opening/Viewing zip files

It looks like the change happened approx 9 years ago, see https://midnight-commander.org/ticket/2118


https://wiki.archlinux.org/title/Midnight_Commander#Opening_files wrote:

mc reads the MC_XDG_OPEN environment variable to open files, which defaults to xdg-open when unset. [2]

try setting MC_XDG_OPEN to /usr/bin/false  (instead of hacking /usr/lib/mc/ext.d to remove xdg)  .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2022-04-17 13:03:54

blacktav
Member
From: Alloue, France
Registered: 2012-04-14
Posts: 11

Re: Midnight Commander (mc) and Opening/Viewing zip files

@Lone_Wolf: Thanks for the idea.

That disabled XDG OK but mc still tried to open a graphical window to open a zip file

After further investigation: turns out the file (which was a download from Google's photo app) was being interpreted as an image file - specifically a JPG file possibly because it contained JPG files. Within mc, image detection occurs before compressed file detection so for these files they were handed off as images before they could be determined as zip files.

Anyways, I have a raised a ticket up-stream


Mack

Offline

Board footer

Powered by FluxBB