Unrar and 7zip packages

Filemanagers, partitioning tools, etc.
Message
Author
User avatar
SirDuncan
Posts: 829
Joined: Sat 09 Dec 2006, 20:35
Location: Ohio, USA
Contact:

Unrar and 7zip packages

#1 Post 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.
Attachments
unrar-3.7.8.pet
for .rar files, executable is "unrar"
(88.12 KiB) Downloaded 17150 times
Be brave that God may help thee, speak the truth even if it leads to death, and safeguard the helpless. - A knight's oath

Dark_Fire
Posts: 22
Joined: Sun 22 Jun 2008, 15:26

#2 Post by Dark_Fire »

lol, seem to keep bumping into your stuff...

Thanks man :)

User avatar
SirDuncan
Posts: 829
Joined: Sat 09 Dec 2006, 20:35
Location: Ohio, USA
Contact:

#3 Post by SirDuncan »

Glad to be of service.
Be brave that God may help thee, speak the truth even if it leads to death, and safeguard the helpless. - A knight's oath

catepa
Posts: 3
Joined: Tue 30 Jan 2007, 09:00

a very little contribution

#4 Post 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.

User avatar
Botanic
Posts: 240
Joined: Wed 05 Sep 2007, 10:54
Location: Toulouse, France

Re: a very little contribution

#5 Post 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.
:)
Puppy 2.16 on HP Vectra VL400 - PIII 800 MHz - 320M RAM
Wary on Acer Aspire X3200 - Phenom X4 - 2.2GHz - 4G RAM

idrak3
Posts: 3
Joined: Mon 08 Sep 2008, 05:28

#6 Post by idrak3 »

thanks a lot, now i more like puppylinux..viva puppy
:lol: :lol: :lol:

User avatar
Vyse
Posts: 30
Joined: Sat 15 Aug 2009, 15:30
Contact:

#7 Post 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.

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#8 Post 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
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

zandarian
Posts: 117
Joined: Wed 14 Oct 2009, 21:10

#9 Post 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)
Last edited by zandarian on Mon 26 Oct 2009, 20:51, edited 1 time in total.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#10 Post 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
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

zandarian
Posts: 117
Joined: Wed 14 Oct 2009, 21:10

#11 Post 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".

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#12 Post 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

zandarian
Posts: 117
Joined: Wed 14 Oct 2009, 21:10

#13 Post 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

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#14 Post 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
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

zandarian
Posts: 117
Joined: Wed 14 Oct 2009, 21:10

#15 Post 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?

User avatar
capoverde
Posts: 232
Joined: Wed 28 Jun 2006, 21:36
Location: Sanremo (Italy) with fine seaview

#16 Post 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

EamonM
Posts: 22
Joined: Fri 14 Aug 2009, 20:28

Thanks

#17 Post 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
[b][color=green]Go n-éirí an bóthar leat![/color][/b]

User avatar
SirDuncan
Posts: 829
Joined: Sat 09 Dec 2006, 20:35
Location: Ohio, USA
Contact:

#18 Post by SirDuncan »

I'm glad people are still finding these useful.
Be brave that God may help thee, speak the truth even if it leads to death, and safeguard the helpless. - A knight's oath

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#19 Post 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
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

#20 Post 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/

Post Reply