May 25, 2008

PCMan File Manager: 7z and rar archives

By default, pcmanfm will not extract/create 7zip and Rar archives. Extracting rar archives is already implemented but not enabled by default while the ability to extract 7z archives is not implemented at all. To enable the extraction of rar and 7zip archives and the creation of 7zip archives open src/ptk/ptk-file-archiver.c:


Uncomment:


{
"application/x-rar",
NULL,
"unrar -o- e",
".rar", TRUE
}

And add this below:


{
"application/x-7z-compressed",
"7zr a -bd -y",
"7zr x -bd -y",
".7z", TRUE
}

Next, insert a comma, after the end bracket of the rar section.
The archive handlers section should endup looking like this:

const ArchiveHandler handlers[]=
{
{
"application/x-bzip-compressed-tar",
"tar --bzip2 -cvf",
"tar --bzip2 -xvf",
".tar.bz2", TRUE
},
{
"application/x-compressed-tar",
"tar -czvf",
"tar -xzvf",
".tar.gz", TRUE
},
{
"application/zip",
"zip -r",
"unzip",
".zip", TRUE
},
{
"application/x-tar",
"tar -cvf",
"tar -xvf",
".tar", TRUE
},
{
"application/x-rar",
NULL,
"unrar -o- e",
".rar", TRUE
},
{
"application/x-7z-compressed",
"7zr a -bd -y",
"7zr x -bd -y",
".7z", TRUE
}
};
C0mpile with a standard ./configure; make; make install or ./configure; make; checkinstall.

5 comments:

Josh Stroud said...

What the hell is with your sick fascination with linux?

Steven said...

It's not a sick fascination; it's a healthy interest. Linux, in my opinion, is a much better operating system than both windows and MacOS.

Robert Mushkatblat said...

My name is Robert Mushkatblat.
I just wanted to say that I think your blog is wonderful. I stumbled on in while I was web-browsing maybe a week ago, and it's one of the few really hard-core technical Linux blogs I've been able to find. Being a devout RedHat man, I find a blog like yours catering to specific interests to be refreshing. Don't listen to Josh Stroud: linux is awesome.

Steven said...

Robert: Thanks.

Robert said...

Please ignore the above comment by... well, me.
I suspect that JOSH STROUD decided to troll my name and post it for his amusement; he has done similar things in the past.

Thanks, Robert.

Post a Comment