Page 1 of 2

Unrar and 7zip packages

Posted: Fri 25 Jul 2008, 18:17
by SirDuncan
Many files on the internet come in either .rar or .7z format. Puppy 2.17 (the last Puppy I stuck with for any period of time) had unrar by default, but Dingo does not. Nor do we have 7zip support. Well, I had some free time and decided to compile and package them.

These have been compiled under Puppy 4.00 from the source on the T2 Project website. Since the 7z executable and the 7za executable handle multiple formats that Puppy already has programs for, I replaced them with symlinks to the 7zr executable which should only handle .7z files.

These are recognized by XAarchive, but you have to open XArchive and then open the files, I can't figure out how to make XArchive open them by default (it tries to add them to a new archive).

If these give you trouble, you can also look for PeaZip which will handle both formats.

Posted: Mon 04 Aug 2008, 15:09
by Dark_Fire
lol, seem to keep bumping into your stuff...

Thanks man :)

Posted: Mon 04 Aug 2008, 15:40
by SirDuncan
Glad to be of service.

a very little contribution

Posted: Mon 17 Nov 2008, 05:19
by catepa
Right click over a rar file, then select the option "Set run action", then at the line at the bottom enter the command

xarchive "$1"


thats all. Next time you click on a rar file, puppy will open xarchive.

Re: a very little contribution

Posted: Tue 30 Dec 2008, 19:27
by Botanic
catepa wrote:Right click over a rar file, then select the option "Set run action", then at the line at the bottom enter the command

xarchive "$1"


thats all. Next time you click on a rar file, puppy will open xarchive.
:)

Posted: Sat 22 Aug 2009, 03:24
by idrak3
thanks a lot, now i more like puppylinux..viva puppy
:lol: :lol: :lol:

Posted: Sat 22 Aug 2009, 12:07
by Vyse
Thanks for the .pets. I hope that in future versions of Puppy Xarchiver will be tweaked to extract files from these archives...

I have been using Peazip for a long time now.

Posted: Sat 22 Aug 2009, 15:42
by ttuuxxx
Vyse wrote:Thanks for the .pets. I hope that in future versions of Puppy Xarchiver will be tweaked to extract files from these archives...

I have been using Peazip for a long time now.
Those 2 pets do work with xarchiver, but not with xarchive :)
download which ever pet from above and install xarchiver from http://www.murga-linux.com/puppy/viewtopic.php?t=37276
Or if you want to replace xarchive with xarchiver I also have a pet for that :)
http://distro.ibiblio.org/pub/linux/dis ... Zip-v5.pet
ttuuxxx

Posted: Mon 26 Oct 2009, 16:01
by zandarian
(Specially for beginners, but also for everybody else)

(Problem at bottom: specially for experienced, but also for everybody else)

1. To extract from .rar files in just one click:

+ Download + install unrar
+ In /root/my-applications/bin create a new file, called for example rar_xtrct
+ Make it executable (right click -> File .... -> Permissions -> a+x ...... -> Yes)
+ Open it as text
+ Copy and paste this:

Code: Select all

#! /bin/sh

xterm -e unrar e "$@"
+ Save it
+ Right click on any .rar file - File .... - Set Run Action...
+ Replace the text in "Enter a shell command" with rar_xtrct "$1"
+ Click on "Use Command"

Problem: It always extracts to /root , no matter where the .rar is.

(continues 2 messages down)

Posted: Mon 26 Oct 2009, 19:15
by technosaurus
There are wrapper scripts in /usr/local/lib/xarchive/wrappers that control these functions. I recently patched the tar wrapper to accept 'xz' and 'lzma' tarballs. I just used the gz and bz2 as a template. For 7z and rar the zip may be a better model. They are just bash scripts - so if you are decent at bash you may be better able to fix it.

I also compiled the latest 7za and 7zDec in the 4.4 CE phase 1 pet test thread (7zDec is the best bang for the buck at <20kb pet) The latest 7za supports more formats but is a bit larger, so I will probably go with 7zDec only in the release... better to just convert them to .tar.xz after extraction anyways.

To extract

Code: Select all

7zDec -e 7zarchived_file.7z
To list

Code: Select all

7zDec -l 7zarchived_file.7z

Posted: Mon 26 Oct 2009, 20:37
by zandarian
Thanks, technosaurus. Unfortunately I think my knowledge in these areas is much lower than yours. I'm quite newbie with Puppy ...

(I continue with my previous message)

(Specially for beginners, but also for everybody else)

(Problem and questions at bottom: specially for experienced, but also for everybody else)

2. To extract from .rar files using the context menu (compatible with 1.):

+ If not done already, the first 6 stepts of 1 have to be done (from Download ... to Save ..., both included)
+ In ROX-Filer (file manager), while holding shift key right click on any file or folder - click on Customise - click on OK
+ In that path ( /root/.config/rox.sourceforge.net/OpenWith ) create a directory and name it .application_x-rar
+ Go into the new folder (before click on the eye to show it -it's hidden because it begins by the dot-)
+ Open ROX-Filer again (it will open in a new window)
+ Go to /root/my-applications/bin
+ While holding Ctrl and shift keys drag rar_xtrct to the other ROX-Filer window (the one in /root/.config/rox.sourceforge.net/OpenWith/.application_x-rar ). This way a symbolic link will be created

To open the .rar file with the context menu:

a) Fastest: while holding shift right click on the .rar file and click on rar_xtrct (top)

b) Other option: right click on the .rar file - File .... - Open With... - rar_xtrct (top)

Problem: the same as in 1.: it always extracts to /root , independently of where the .rar file is located. I know why: xterm (in the code of rar_xtrct) opens the console, and this one (rxvt) opens by default in ~ ( /root in other words). I've had a look to http://linux.die.net/man/1/xterm to try to find how to open the console in the path you want; but I found nothing. ROX-Filer knows how to do that: right click-Window-Terminal Here. I hope somebody knows how to do it or can look into ROX code to find the "secret".

Posted: Mon 26 Oct 2009, 20:56
by amigo
Find the name of the directory where the archive is located, cd into that dir, then unpack there:
DIRNAME=$(dirname /path/to archive)
cd $DIRNAME
commands to run xterm/archiver or whatever

Posted: Mon 26 Oct 2009, 21:23
by zandarian
Thanks, amigo. I'm not sure if I understand well the stated by you. I think you are outlining how the solution could be found. Yes? Please, if you have found the solution, if you could say step-by-step (for newbies like me) how to execute it it would be appreciated. Thank you

Posted: Tue 27 Oct 2009, 01:49
by technosaurus
amigo was just saying to put

Code: Select all

DIRNAME=$(dirname /path/to archive)
cd $DIRNAME
before

Code: Select all

xterm -e unrar e "$@"
or whatever code so that it will go in the current directory

Posted: Tue 27 Oct 2009, 14:30
by zandarian
Thanks.

I've tried it but doesn't work. Searching in Google:
http://www.google.com/search?hl=es&clie ... =&aq=f&oq=

Only 1 result shows that "strange code" (this post). No other page.

Anybody knows the real code?

Posted: Mon 23 Nov 2009, 23:57
by capoverde
Hello SirDuncan,

downloaded your p7zip-4.58.pet and installed it in Puppy 4.3.1 in less than 20 secs; then Xarchive very quickly extracted a 244 MB ISO image with it (Syllable 0.6.6).

Thank you very much! :D

Thanks

Posted: Wed 20 Jan 2010, 21:46
by EamonM
Thanks to Sir Duncan for the pet, and to Catepa for the command. This allowed me to get unrar running quickly and with no difficulty.

E

Posted: Thu 21 Jan 2010, 14:55
by SirDuncan
I'm glad people are still finding these useful.

Posted: Thu 21 Jan 2010, 15:36
by ttuuxxx
SirDuncan wrote:I'm glad people are still finding these useful.
Thats nuts the rar has been downloaded like 5000 times, wow crazy, Its definitely your most popular application on puppy.
ttuuxxx

Posted: Sat 23 Jan 2010, 23:54
by abushcrafter
For the latest version there's a nice binary installer. The latest versions name is p7zip_9.04_x86_linux_bin.tar.bz2

http://sourceforge.net/projects/p7zip/files/