
Following IronMan Challenge posts not only for the sake of seeing What Color of Hair & Shirt ends up with Matt but the posts have been much enlightening. Recently in IronMan Challenge, there’s been much talk about one of Miyagawa’s project, App::cpanminus. Basically, cpanminus is a tool to install perl module from CPAN, without the verbosity of cpan|cpanplus, which also means, more newbie friendly.
The beauty of cpanminus is, it does not ask dozens of question before it installs. Instead, cpanminus will use the most suitable defaults & start downloading dependencies and install it. By default, cpanminus will not tell every action and result on the screen, which “scare” less.
In short, cpanminus improves or makes perfect the experience of installing modules from CPAN. Since the first time trying cpanminus, love it and loving it more seems inescapable :p
Enough talking, here’s how to install cpanminus :
Read More »

FreeBSD is an excellent operating system, be it on a Desktop (PC-BSD) or Server. Its stability and flexibility was never an issue, nor even software availability (21135 ports currently available to deploy).
Most of the time, ports will install the necessary dependencies to fulfill its requirement. But certain ports installs the X11 (X window system) libraries. Which we don’t need it if the installation is meant to run on a server environment.
In this case, we will need to tell ports not to include the X11 libraries. This will certainly save some hard disk space, compilation time and avoid unnecessary security vulnerabilities.
Here is how to specify NOT to include X11 related libraries during ports installation :
Read More »

There are various way of managing ports, using utilities. The usual “cd /usr/ports/<ports directory>; make; make install; make clean“, portmaster, portupgrade and others. Today, this post will brief on how to use portmanager to install, upgrade and delete ports.
Using portmanager to manage ports have a few advantage :
- portmanager scans for what dependencies are needed and then determine what needed to be upgrade or install in order to fulfill the dependencies. At this stage, the dependencies are identified install/upgrade which is good as other utilities tends to fail in the mid of the installation just because some ports are too old or cannot install.
- portmanager supports output its messages to a log file. This is especially useful for trouble shooting what port / dependencies are giving problem.
- portmanager is also able to backup the current port/dependency before installing the new port. This useful when the new port cannot be install or interrupted during the installation, resulted a state where new port fail to install and new port have been deleted.
- portmanager collects its data by scanning the ports tree rather then building an index for the installed ports and depend on it. This is very less likely to cause problem as indexes are tend to be corrupted when abruptly (Ctrl-C) stopping installation in the halfway.
- portmanager gives a summary when installing dependencies/port. This gives an idea how many ports needs to be install or upgrade. This also means how much caffeine needed :p
Enough talking. Here are some example on how to manage ports using portmanager :
Read More »

When too many icon clogging on the Menu Bar, re-arrange them might look better. The shortcut key to arrange the icons is :
Cmd + mouse left click
on an icon then start arranging them.
Adios !!!

The default download program for ports is using fetch. fetch is fine but my personal preference is wget. wget uses 1 connection to download, unlike my previous post that mentioned “Download ports simultaneously with multiple connections“.
But wget gives extra bell and whistle like date/time of the download, log to file, continue from a partially downloaded file, rate limit of the download & others.
The below is how to setup ports to use wget to download :
Read More »

Ports gets it’s sources from internet. If the sources is big or there are multiple tens of sources, the tendency to fail in the mid of the ports installation increases.
Scenario 1:
Bumpy internet broadband internet connection, like mine, will disconnect halfway when downloading big files (> 10 MB)
Scenario 2:
Large ports that depends on tens if not hundreds of other ports. e.g. KDE4 or other window manager.
Scenario 3:
Limited online time frame and will need to take the machine off line after a period of internet usage.
Scenario 4:
Need to download the sources so that it can be moved to another box for compilation. A box that does not have reasonable or slow internet bandwidth to download.
Often, the above scenario are stuck with me, unfortunately. But the fortunate part is, while meddling with ports, a few steps can be taken to reduce the chances of these hiccups.
For illustration purpose, we’ll use installation of KDE4 (the excellent Desktop environment) as an example. KDE4 depends on hundreds of other ports. The download of the sources alone will take some time and this serve as a good example. Here are the steps :
Read More »

Ports randomly gets it’s source server list from /usr/ports/Mk/bsd.sites.mk, as defined by the port maintainer. But the top 1st choice of the list may not be the one physically near to us and thus the download speed is much desirable. Most of the time compiling ports doesn’t necessary takes a long time (like my 3 years AMD athlon 1.8Ghz perform fairly good). In fact, downloading of the sources is the one that takes a long time.
In this case, we’ll need to tune the ports so that it fetches the sources from the nearest (physically) server. A nearer server normally means less latency and less latency means faster connection (this may not be the whole truth but truth is in it. :p)
The port “fastest_sites” will test the latency of the server listed in /usr/ports/Mk/bsd.sites.mk and output to a file. The file is suitable to be included in /etc/make.conf which tell ports where to fetch the sources from.
Here it is how to:
Read More »

Gimp stands for “GNU Image Manipulation Program“, which is an open source image editing problem. It’s capability often compare to professional software but fortunately, Gimp acceptance as Pro image editing software is getting better. Even so, Gimp is still popular among beginner up to hobbyist user.
Gimp’s available on multiple platform and since it is open source, you can bet it’s available on BSDs.
This post will brief through how to transform a logo or picture to transparent background, suitable for dark or colored web page background.
Read More »

While adding GUI Desktop environment into my development box, an error encountered when compiling KDE4, the stable and nice looking Desktop environment. Compiling KDE4 can take quite some time as it depends on few hundred other ports. Alternatively, you can install KDE4 from the packages by using the command :
pkg_add -r kde4
But installing programs using ports is always my preference. Although ports takes additional time to compile but the flexibility to configure what options to enable or disable is preferred. By using ports, it also allows us to search (make quicksearch name=port-name) the local repository (/usr/ports) on what other related programs we can have.
Back to the topic. Halfway ports compiling KDE4, it halted with an error compiling the port “kdebase-runtime-4.3.4“. Instead of searching the errors in a one big whole of logs, manually compile /usr/ports/x11/kdebase4-runtime to zoom in the error. Below is what the ports complained about while installing /usr/ports/x11/kdebase4-runtime (which is part of the dependencies of KDE4) :
[ 2%] Built target kcm_mailtransport_automoc
[ 2%] Built target mailtransport_automoc
[ 2%] Built target microblog_automoc
[ 2%] Built target kpimtextedit_automoc
[ 2%] Built target syndication_automoc
Scanning dependencies of target gpgmepp
[ 2%] Building CXX object gpgme++/CMakeFiles/gpgmepp.dir/gpgmepp_automoc.o
Linking CXX shared library ../lib/libgpgme++.so
[ 7%] Built target gpgmepp
Scanning dependencies of target gpgmepp-pthread
[ 7%] Building CXX object gpgme++/CMakeFiles/gpgmepp-pthread.dir/gpgmepp-pthread_automoc.o
Linking CXX shared library ../lib/libgpgme++-pthread.so
[ 11%] Built target gpgmepp-pthread
[ 11%] Building CXX object akonadi/CMakeFiles/akonadi-kde.dir/itemserializer.o
In file included from /usr/local/include/boost/parameter/aux_/arg_list.hpp:14,
from /usr/local/include/boost/parameter/aux_/tagged_argument.hpp:10,
from /usr/local/include/boost/parameter/aux_/tag.hpp:8,
from /usr/local/include/boost/parameter/keyword.hpp:10,
from /usr/local/include/boost/parameter/name.hpp:8,
from /usr/local/include/boost/graph/named_function_params.hpp:15,
from /usr/local/include/boost/graph/depth_first_search.hpp:21,
from /usr/local/include/boost/graph/topological_sort.hpp:16,
from /usr/ports/deskutils/kdepimlibs4/work/kdepimlibs-4.3.4/akonadi/itemserializer.cpp:40:
/usr/local/include/boost/parameter/aux_/maybe.hpp:13:53: error: boost/python/detail/referent_storage.hpp: No such file or directory
In file included from /usr/local/include/boost/parameter/aux_/arg_list.hpp:14,
from /usr/local/include/boost/parameter/aux_/tagged_argument.hpp:10,
from /usr/local/include/boost/parameter/aux_/tag.hpp:8,
from /usr/local/include/boost/parameter/keyword.hpp:10,
from /usr/local/include/boost/parameter/name.hpp:8,
from /usr/local/include/boost/graph/named_function_params.hpp:15,
from /usr/local/include/boost/graph/depth_first_search.hpp:21,
from /usr/local/include/boost/graph/topological_sort.hpp:16,
from /usr/ports/deskutils/kdepimlibs4/work/kdepimlibs-4.3.4/akonadi/itemserializer.cpp:40:
/usr/local/include/boost/parameter/aux_/maybe.hpp:90: error: 'boost::python' has not been declared
/usr/local/include/boost/parameter/aux_/maybe.hpp:90: error: expected unqualified-id before '<' token
/usr/local/include/boost/parameter/aux_/maybe.hpp: In member function 'typename boost::add_reference::type>::type boost::parameter::aux::maybe::construct2(const U&) const':
/usr/local/include/boost/parameter/aux_/maybe.hpp:59: error: 'm_storage' was not declared in this scope
/usr/local/include/boost/parameter/aux_/maybe.hpp: In member function 'void boost::parameter::aux::maybe::destroy()':
/usr/local/include/boost/parameter/aux_/maybe.hpp:72: error: 'm_storage' was not declared in this scope
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 2
1 error
*** Error code 1
Stop in /usr/ports/deskutils/kdepimlibs4.
From the errors, it seems kdepimlibs4 is missing of a dependencies related to “boost::python“.
Read More »

Use the command :
swapinfo
Specified the parameter “-h” to convert the bytes to “h”uman readable form :
swapinfo -h
Sayonara !!!