Tuesday, February 02, 2016

Installing 7-Zip plugin in MobaXterm

I like MobaXterm http://mobaxterm.mobatek.net/

I like 7-Zip http://p7zip.sourceforge.net/
(In my previous version of this How-To I used 7-Zip for Windows from http://www.7-zip.org/ ) to open the downloaded archive, but now you can do it all from within mobaxterm.

To get 7-Zip working in MobaXterm I downloaded the 7-Zip package from a cygwin mirror... (find your closest one at https://cygwin.com/mirrors.html )

You can find the current version with this:
wget -qO- http://mirrors.kernel.org/sourceware/cygwin/x86/release/p7zip/ | sed -e 's/<[^>]*>//g'
Then download the version you want. e.g.:
wget -N http://mirrors.kernel.org/sourceware/cygwin/x86/release/p7zip/p7zip-15.14-2.tar.xz
You should now have this file in your current directory:
-rwxrwx---    1 Administ UsersGrp   1039440 Apr  5 05:12 p7zip-15.14-2.tar.xz
You can unpack the tar.xz with gnu tar:
tar xvf p7zip-15.14-2.tar.xz
You can then create the package using the p7zip from the unpacked tar file:
usr/lib/p7zip/7za.exe a p7zip.mxt3 -tZIP usr
Finally move the file you have created to C:\Program Files (x86)\Mobatek\MobaXterm Personal Edition
You will probably need to do that step from outside MobaXterm otherwise you won't have permission to write to the directory.

Then restart MobaXterm.

job done.

If you don't know where to find your home directory from Windows you can open it in Windows Explorer by doing:

$ open $PWD

from the command line in your home directory.

If you have trouble with the step creating the mxt3 file you can do it via Windows too:
Originally I opened the directory it created ( p7zip-15.09-1 ) in Windows Explorer and right clicked on the usr directory and chose 7-Zip -> Add to "usr.zip" (NB: Choose usr.zip, not usr.7z here)
This created a .zip file containing the usr directory.

I then renamed usr.zip to p7zip.mxt3