I found an interesting Go project on GitHub (https://github.com/ichinaski/pxl) that I wanted to try. How to compile it?
(This project “pxl” can display images in the terminal).
GOBIN=$(pwd) GOPATH=/tmp/gobuild go get github.com/ichinaski/pxl
Under Manjaro I had to install the package “gc”, which contains the official Go compiler.
What I love in Manjaro is that it contains the latest software versions. For instance, I installed tmux and on Manjaro it’s version 2.1.
On Ubuntu 14.04 it’s still version 1.8 in the reposotories…
How to upgrade tmux 1.8 to 2.1 on Ubuntu?
Install these packages:
$ sudo apt-get install exuberant-ctags cmake libevent-dev libncurses5-dev
Then download the source of tmux from the official home page. Then build and install:
$ ./configure && make $ sudo make install
This tip is from here.
When compiling AUR packages, only one core is used. How to use more cores and speed up the compilation?
I found this tip here.
Edit the file “/etc/makepkg.conf” and modify this line:
It will use all your cores. Or, you can specify how many cores to use:
Now two cores will be used for the compilation.
Wandbox is a project that allows you to try several languages in your browser. Just paste the code and Wandbox will compile/interpret it and show you the result.
The service can be called via an API too! The API doc. is here: https://github.com/melpon/wandbox/blob/master/kennel/API.rst.
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 220.127.116.11 while the PPA contains the version 18.104.22.168 (updated on Sept. 15, 2010).
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”.
- If it was successful then you should have a binary “
mc” file in the
src/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'
Installing mc from source is now integrated in jabbatron.
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?
pdftops -eps file.pdf
This tip is from here.
Here I had another difficulty: EPS images are not supported by
pdflatex. Great! So I had to switch back to the old
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
You want to compile Truecrypt from source but suddenly you realize that it’s not that trivial.
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:
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:
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:
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:
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
- 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: