For years, I have been using midnight commander to manage zip archives. Since the 15.3 upgrade, clicking on the archive opens ark in a separate window which is absolutely not what I need.
How can I get back the regular “ascii behaviour”?
And please do not refer me to the mc documentation, I know how to manage the settings which also have not changed. As far as mc is concerned, it still is set to ascii-view. But I believe it is KDE that now, since the upgrade, thinks that I want to manage the zip outside the shell, and I want it to stop messing up midnight commander.
Thank you, I have probably not been clear enough to indicate that midnight commander is a brilliant piece of software that runs inside a konsole window, not in anything graphical like dolphin.
Also I prefer not to mess with the settings you refer to because, a) I find them exceedingly complicated, and b) they should not have anything to do with what I do in “pure ascii” mode inside the shell.
So my question is rather how I can stop KDE to even touch anything I do inside the midnight commander. Probably somebody, somewhere, thought that this was a nice “feature” to have during the upgrade, but I don’t and I would like to have the previous behaviour back…
I can mot combine your description in post #1 with that in post #3.
You work in a terminal (which may be an emulator in a GUI, like konsole), or you work in a GUI. When you “click on the archive”, that is in a GUI and certainly not “pure ascii mode inside the shell”. I assume KDE. And then KDE uses the associated program to open the file. And that is what deano_ferrari assumed.
When you do different, please explain extensive every action.
Thanks Henk, I assume that you are unfamiliar with midnight commander which is an ascii application that runs inside a terminal. For this reason, it is incredibly fast and responsive. It allows, among many things, to select a zip file and instantly show, and even manipulate, its content. All inside the console. And it should stay that way, but somehow someone has decided that I want it to interact with the GUI, which is not the case.
Can you please leave out all the superfluous “fast”, “responsive”, etc. And stay to to technical facts.
How do you select a zip file (or what you think is a zip file) inside that console. I at least, have still no idea what you are doing. Let alone that I can suggest any place where to configure something.
In the meantime, I tried to do what you apparently didn’t (at least you show no sign of having done so and then got stuck somewhere), browsing through
man mc
There is mentioned that the “extenions file” should define which extentions (not file types) should be handled by which programs.
/usr/share/mc/mc.ext
The default system-wide extensions file. ~/.mc/bindings
User’s own extension, view configuration and edit configuration file. They override the contents of the system wide files if present.
Isn’t that a starting point to go and look in there?
Thank you again, Henk, I don’t know what is wrong about noting speed of an operation as a plus, but I also said in my first message that I know very well how to manipulate the extensions file from mc, which on my system has not been changed since many years and also just has the content it is supposed to have.
What I am observing, and what made me ask for help is that, since the 15.3 upgrade, the GUI somehow captures things in my console (in this case the activation of the ascii-based unzip facility inside mc) and decides that I want something done outside the console. I am trying to figure out how to not have it do that. I never asked the GUI to interfere, and nobody ever told me during the upgrade that it would intervene here.
So I keep hoping that someone actually familiar with midnight commander could provide some help…
Just dropping in to say that I did not observe this behaviour after doing an in-place upgrade from 15.2 to 15.3 - midnight commander functions as before and opens up, at least, zip packages internally (and yes; I have KDE and run it from konsole occasionally).
Those would the MC bindings that hcvv linked above - perhaps grepping them or mc in /etc/ for ark would give hints as to why it’s doing this.
I installed 15.3 in a VM (with KDE Plasma) and then installed mc to see if fresh install would cause this - it also did not exhibit the issue you ran into. It’s really puzzling.
I cannot reproduce by clicking on an archive file (.bz2) either. Could the problem be another that’s solvable by logging out of Plasma, deleting ~/.cache/*, then logging back in?
Midnight Commander is text mode console application. This thread is on its second page and you still did not explain how you “click” in console and where exactly do you “click”.
I have browsed very quick through the man page. It says that there is a part of the console that shows files (like file manager), and that those file names are clickable.
I have no idea how this technically works as a terminal/console has IMHO no interface for “mouse position”.
I am curious liek you, but OTOH when the OP says that it functioned earlier as he expects, we can accept that he does something that relates an action to a filename. And that then earlier the correct action (apparently based on the suffix of the file name) was taken and now it isn’t.
After deano_ferrari pointed him to where those connections are configured in KDE and I pointed him tho the place where I think (result of reading the mc man page) it is configured for cm I guess that at least I am out of steam. The more because the OP seems to be reluctant to even show what is in those configuration file(s) with respect to the .zip suffix.
Again OTOH, I can understand a bit of frustration of the OP. Apparently there aren’t much mc users her, who would probably understand better what he experiences.
Except problem has absolutely nothing to do with “clicking” on anything.
Since version 4.8.26 MC calls “file -z” to “improve” detection of compressed file type. For ZIP archive this looks inside and apparently returns type of (the first?) file inside archive and calls action associated with it. Default action often happens to be xdg-open which now opens program that is registered as default (zip) archive handler in DE.
There is workaround for it (I hesitate to call it “fix”)
commit c3848a689c0323ba7958e2943878fe831369af01
Author: Andrew Borodin <aborodin@vmail.ru>
Date: Sun Mar 28 15:36:42 2021 +0300
Ticket #4180: reorgzanize mc.ext.
$ file -L image.zip
image.zip: Zip archive data, at least v2.0 to extract
$ file -L -z image.zip
image.zip: JPEG image data, JFIF standard 1.01, resolution (DPI),
density 96x96, segment length 16, baseline, precision 8, 1024x768,
frames 3 (Zip archive data, at least v2.0 to extract)
Since in mc.ext
type/^JPEG
is evaluated before
type/\(Zip archive
mc assume image.zip is a image not an archive.
To solve this, since we use "file -z", match file name at first
(regex/ and shell/), then type/.
but it is not yet in any released version.
If OP cares, OP should open bug report against Leap 15.3 and request to include this patch.
As you may have read, I am utterly confused about this clicking since the OP said in his first post above " Since the 15.3 upgrade, clicking on the archive …", while working on a program in a terminal (emulator).
I am glad that you seem to understand not only what the OP means, but also what his problem is. :good:
I am glad that I can retire from this confusing thread.
I found the bug which was internal in the mc software. It seems that the unzip facility in mc 4.8.26 is broken and will be fixed during the next version upgrade. Installing an older version solved my problem.
Actually, I found this attempt to obtain help from the forum frustrating. I do not really appreciate being lectured about something by people who do not want me to explain why something is useful (speed is a factor of usefulness for me) and who clearly did not even attempt to understand which software I am using.
Looks like in the future I will look elsewhere for help.
But for the availability of MC in Gnu/Linux distros RedHat and Mandrake last century when I was first exposed to them it would have taken me many more years before embracing Linux as a switch from OS/2 as my primary OS. To me, O.F.M.](http://www.softpanorama.org/OFM/Paradigm/)s, of which MC is one of the oldest for Linux, are an indispensable set of tools, useful whether running a GUI terminal emulator, or native text mode framebuffer.
For this thread I did roughly the same thing as OP, using Plasma on 15.3, clicking on the name of a .bz2 archive file. Behavior was exactly as expected: opening the file in MC’s own archive file viewer, and seeing its content no differently from the way an ordinary directory is displayed on entry, and subsequently striking F3 to view a contained .txt file little differently than any GUI “file manager” might be capable of, other than not opening a new window in another app to display that file’s content.
In MC, whether to open a file for editing or viewing is is an option configurable via its pulldown menu. MC’s user options are maintained in a plain text file in ~/.config/mc/, with packaged defaults in /etc/mc/. What might have happened is the packaging of MC changed in 15.3’s MC version to make external the defaults for view and/or edit rather than internal. I did not try MC with a virgin user account to test that possibility.
I rarely use command line tools like bz2 or zip for extraction or inspection. Instead, I “enter” the archive using MC, then view or copy out just as though the archive was an ordinary directory. While MC supports mouse actions, the only time I use a mouse with it is for tests such as I did here. For touch typists, like me, keyboard actions in any OFM](https://en.wikipedia.org/wiki/Orthodox_file_manager) are far more efficient and faster than a pointing device.
I do use mc, though not very often. I have stayed out of this thread until know.
What I see is people attempting to understand what problem you are having, and asking for a clearer description. And you have been unable to provide that. Please don’t blame the people who have been honestly trying to help.
When I use mc, I use cursor keys to move around and the ENTER key to select something. So you were using “click on” in a way that is not familiar to me, and apparently not familiar to the people who tried to help.