0

I am switching from Windows to Ubuntu. I need to open and view a file stored in an old 7z archive file. To do this, I installed P7zip - Desktop (P7ZIP 16.02 [64-bit]) to my Ubuntu Desktop notebook. I opened my 7z archive file with P7ZIP and selected a text file in the archive. Normally, by pressing F3 or F4, I should be able to view or edit this text file. However, P7ZIP extracts the selected file into a temporary location, but does not start any external viewer or editor. (The file's location seems to be a directory something like /tmp/snap.1000_p7zip-desktop_z4QNCd/tmp/xxxxxxxxxx/ which changes with every menu item invocation.). The error that it throws to the console is something like this:

DEBUG : ExecuteFileCommand(id=544)-2
execvp(vi) failed with error 13!

The Linux version of P7ZIP does not contain any Tools | Options... dialog box, so I am not able to configure P7ZIP and define another viewer and editor.

What am I missing?

  • I suspect it's what the snap is missing - i.e. a copy of vi (or any other viewer/editor, even if you could configure it) to edit the file in – steeldriver Mar 8 at 15:57
1

As you and steeldriver pointed out, you are trying to use the snap version of p7zip. Snap packages were created with a few goals in mind, and one of the important ones was increased security. Because of this, snap packages are usually containerized, meaning that they are isolated from the rest of the system, so they have limited access to your personal files and other programs installed.

The default package manager that comes with ubuntu, called file-roller (archive manager), can open 7z files without a problem, as long as you have the required tools installed. There are also many other alternatives, like engrampa, xarchiver, etc.

To make sure you have the required tools to open 7zip files open the terminal and type sudo apt install p7zip-full. It is probably already installed, but it is better to guarantee. If you would also like to add support for rar files, you can add unar to the end of the first command, so it would be like: sudo apt install p7zip-full unar.

After making sure it is installed, you can simply double click on your .7z, and the default file manager will be able to use it without a problem. When you try to open a file directly from it, it will use the default program to open said file. They will be temporarily placed at your cache folder, that is hidden by default. The path is /home/USER/.cache/

Gnome applications are becoming a bit different from what many users are used to, in an attempt to become more beginner friendly and simplify things. If you dislike the design and aesthetics of the default archive manager, let me know and I can recommend you different ones.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.