A chronological documentation test project, nothing serious, really!

30 Sep 2007 Text to image using imagemagick

convert -size 200x30 xc:transparent -font /usr/share/fonts/dejavu/DejaVuSansMono.ttf -fill black -pointsize 12 -draw "text 5,15 'this is just a test'" test.png

Tags: , ,

Posted by

28 Sep 2007 Ubuntu Linux 7.10 Beta on HP Compaq 8510p (laptop)

I experienced problems booting the install-CD for both Ubuntu 7.04 and Fedora Core 7 on my HP Compaq 8510p laptop because the kernel didn’t have the correct SATA driver, so I decided to try the beta of Ubuntu 7.10.

The booting problem was fixed on 7.10 Beta and the installation process halted at 88% “importing documents and settings”.

The solution I came up with was to disable the migration tool and then run the installer from a terminal window with the following option:

ubiquity --no-migration-assistant

Tags: , , , , , , ,

Posted by

28 Sep 2007 sudo a command as another user than root

sudo -u username command

Posted by

27 Sep 2007 Install Geo::IP Perl Module on Debian Etch

This post describes how to install MaxMind Geo::IP perl module on Debian Etch.

You need the GeoIP C library (that includes also the free GeoLite Country database). This is fortunately available in the Debian repositories.

apt-get install libgeoip1 libgeoip-dev

To install the GeoIP perl module, we need to download the perl module locally from MaxMind or from CPAN. Uncompress the file and compile.

perl Makefile.PL
make test
make install

Tags: , , ,

Posted by

26 Sep 2007 Advanced APT user tricks

Debian/Ubuntu apt-get tricks.


Install software

apt-get install foobar

Search software

apt-cache search foobar

You can query files to see which packages own them, or query packages to see which files own them.

Installing apt-file

apt-get install apt-file

Build apt-get file information cache

apt-file update

Query through the packages to determine which package contains the file

apt-file search mysqld

Query the other way around, you know the package name and would like info about all the files which are provided by a given pacage:

apt-file list mysqld

List all installed software/packages

dpkg --get-selections > software.txt

That will save your installed list to a file called software.txt. That list is every piece of software required to reproduce the state your PC is currently in.
Another way to get a full list of installed software is to run the command

dpkg --list

To restore a PC the list above

# dpkg --set-selections < software.txt
# apt-get dselect-upgrade

Clearing up space
Delete archived packages that are considered old.

# apt-get autoclean

Delete all archieved packages

# apt-get clean

Remove every file from a package

apt-get remove foobar --purge

Tags: , , , , ,

Posted by