Archive
Install Midnight Commander from source
Problem
I’ve already noticed that the Ubuntu repositories are sometimes very out-of-date. A good example for this is the “mc” package. There is a PPA for Midnight Commander that should solve this problem but it’s also very old. At the time of writing (August 10, 2011), the current stable release is 4.7.5.3 while the PPA contains the version 4.7.0.9 (updated on Sept. 15, 2010).
Solution
Since I wanted to use a fresh release of MC, I installed it from source. Steps to follow:
- Download the latest stable source and unpack it.
- For a successful compilation I had to install this package too: “sudo apt-get install libslang2-dev libglib2.0-dev”.
./configuremake- If it was successful then you should have a binary “
mc” file in thesrc/folder. If it’s there, you can remove your current version with “sudo apt-get remove mc“. - Then install the new version with “
sudo make install“.
I also had to modify my .bashrc a bit:
# old: #alias mc='. /usr/share/mc/bin/mc-wrapper.sh' # new: alias mc='. /usr/local/libexec/mc/mc-wrapper.sh'
Update (20120505)
Installing mc from source is now integrated in jabbatron.
Convert PDF to EPS
Problem
I wanted to submit a paper but they required the LaTeX source too, including the images. They accepted EPS images but not PDF! WTF? All my images are in PDF format. How to convert them to EPS?
Solution
pdftops -eps file.pdf
This tip is from here.
Appendix
Here I had another difficulty: EPS images are not supported by pdflatex. Great! So I had to switch back to the old latex command…
Compilation with pdflatex:
#!/bin/bash MAIN=main.tex pdflatex $MAIN.tex bibtex $MAIN pdflatex $MAIN.tex pdflatex $MAIN.tex \rm *.aux *.blg *.dvi *.log *.bbl *.flg *.idx *.ind *.lof *.lot *.toc *.glo *.gls *.ilg 2>/dev/null
Compilation with latex:
#!/bin/bash MAIN=main.tex LATEX=latex $LATEX $MAIN.tex bibtex $MAIN $LATEX $MAIN.tex $LATEX $MAIN.tex dvips $MAIN.dvi -o $MAIN.ps ps2pdf $MAIN.ps \rm $MAIN.ps *.aux *.blg *.dvi *.log *.bbl *.flg *.idx *.ind *.lof *.lot *.toc *.glo *.gls *.ilg 2>/dev/null
Compile Truecrypt from source
Problem
You want to compile Truecrypt from source but suddenly you realize that it’s not that trivial.
Solution
Let’s install some necessary packages:
sudo apt-get install build-essential libfuse-dev libgtk2.0-dev sudo apt-get install nasm sudo apt-get install libwxgtk2.8-dev # This last one is for the problem "'wx/wx.h' is not found".
Download the source code of Truecrypt (link) and extract it to a folder. I put mine here: /opt/truecrypt-7.0a-source.
From the README of Truecrypt, we need this too: “RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20 header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20) located in a standard include path or in a directory defined by the environment variable ‘PKCS11_INC’.“
So, visit ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20 and download the .h files. Actually, you only need 3 of them; I collected their URLs here. I put these files in this directory: /opt/truecrypt-7.0a-source/PKCS11_INC. Then, register it in an environment variable:
export PKCS11_INC=/opt/truecrypt-7.0a-source/PKCS11_INC
Now you can try to compile it. Go to /opt/truecrypt-7.0a-source and execute the command make. The executable will be placed here: Main/truecrypt.
Optional
I’m not sure that this step is necessary. If you have problems compiling the source, follow these instructions too.
For a successful compilation, you might need the wxWidgets library too. Download the latest stable release (choose wxAll in the list). Mine is extracted here: /opt/wxWidgets-2.8.12.
Get Truecrypt to compile wxWidgets for you:
export WX_ROOT=/opt/wxWidgets-2.8.12/ make WX_ROOT=/opt/wxWidgets-2.8.12 wxbuild
It will create the directory /opt/truecrypt-7.0a-source/wxrelease.
Further help
- How to compile TrueCrypt from source – Ubuntu Forums
- ubuntu10.10编译 truecrpyt-kissthink
- Building TrueCrypt 5.0a on Linux | random neuron misfires
- Still having trouble building TrueCrypt [Archive] – FedoraForum.org
Remove the binary package
If you installed Truecrypt with the binary .deb package, here is how to remove it:
sudo truecrypt-uninstall.sh
Install ncurses
sudo apt-get install libncurses5-dev libncursesw5-dev
If you want to compile a source code and you get the “curses.h: No such file or directory” error, then these are the packages you need to install.
Tip from here.