HOWTO: Installing and compiling the latest latex and kile packages in Ubuntu Dapper Drake

July 31, 2006

Tetex is no longer mantained (see http://www.tug.org/tetex/), so if we want the latest and greatest, we must install the latex system from the latest TeX live cd install.

First of all remove tetex-base, tetex-common, tetex-bin and kile from the repos.

The tetex package is no longer mantained so get the TeX Live Cd and kile source code from :

http://www.tug.org/ftp/texlive/Images/

http://kile.sourceforge.net/download.php

Get the packages texlive2005-inst-20051102.iso.zip and kile-1.9.1.tar.bz2

Once downloaded the tex live cd iso image unzip it by:

unzip texlive2005-inst-20051102.iso.zip and you’ll get the iso image. Burn it using your preferred burning app.

Installing the Tex system:

Go to the directory where the TeX Live cd is mounted /media/cdrom and execute:

sudo bash ./install-tl.sh

You’ll get a menu with several options:

Type S (Scheme) and C (install everything).

Type D (Directory) and you’ll get the predefined installation directories. You don’t have to change them if you don’t want to. The 2 option I changed it to /usr/local/texmf-local but the default is Ok.

Press R to return to the main menu and type I (install). It will take a while to install the tex system in your computer. Once finished you’ll get the following:

texconfiguraciolivecd.png

Add the following line to your .bashrc:

PATH=$PATH:/usr/local/texlive/2005/bin/i386-linux
close the Console, open a new one and you’ll get all the latex tools in the command line :-)

When running latex if you get the error:

/home/yourusername/.texlive2005/texmf-var/ls-R: Permission denied

then go into the /home/yourusername/.texlive2005/texmf-var/ and type

sudo chown username:username ls-R

Installing Kile from source

Install the following packages from the repos:

kde-devel

xlibs-dev

Take into account that kde-devel has more than one hundred dependencies, but it takes less than 15 minutes to download them and install them if you are in a broadband connection.

type:

tar -xjvf kile-1.9.1.tar.bz2

cd kile-1.9.1

type kde-config – -prefix and you’ll get /usr

then

./configure – -prefix=/usr

if you don’t get any errors, then

make

and sudo make install. That’s all

If you need the latex2html package download it from http://www.latex2html.org/ and get the package

latex2html-2002-2-1.tar.gz

type:

./configure

make

sudo make install

Happy TeXing!!


HOWTO: Checking md5 sums in Linux

July 30, 2006

Everyone of us has downloaded an iso file sometime or will download one sooner or later. But, how to check for errors in the downloading process. Probably, the server which you are downloading the iso file will have an .md5 file. Once you have downloaded the iso file, download the md5 file, then type:

md5sum -c nameofthefile.md5

and it will check for errors. Note: the iso file must be in the same directory as the md5 file.


HOWTO: Backup your data to an external usb hard drive with rsync

July 29, 2006

Linux has a wide range of applications to perform backups, some of them very powerful. In this howto, I’m going to introduce you to rsync, a powerful yet simple command line application. With rsync we can perform exact copies of directories, partitions or whatever, mantaining the file permissions, soft links, and all. So, you have an exact copy. Running rsync daily allows us to mantain a synchronized copy of a partition to an external hard drive. If something wrong happens, we will have the latest copy of that partition saved in an external device. In my case, I always have an exact synchronized copy of my /home directory. If I have to upgrade my OS, I install the latest OS and then just copy the files to my /home directory without losing permissions, obviously if I mantain the same username.

Backing up with rsync

Type:

rsync -av – -stats /sourcedirectory /targetdirectory

With this command, I’ll have an exact copy of sourcedirectory in targetdirectory. Take into account if you delete some file in sourcedirectory and it has been backed up previously it will not be deletec in the targetdirectory in future backups. To delete it, just type:

rsync -av – -delete – -stats /sourcedirectory /targetdirectory

If you want to exclude a directory from being backed up, then use the – -exclude command like follows:

rsync -av – -exclude=directorytoexclude – -delete – -stats /sourcedirectory /targetdirectory

where directorytoexclude is the directory’s name. It is not necessary to be the whole path.


HOWTO: Recording audio from the command line

July 28, 2006

Recording any sound that goes through your computer is a feature that you don’t have to miss out. Mostly if this sound is music. There are lots of internet streaming mp3 sources that stream audio that you can listen with your computer and why not, you can record to mp3 and have an enormous mp3 library. In this howto I’m going to give you powerful tools to record sound directly to an mp3 file or ogg file from the command line. So, you will be able to record for hours and hours your favourite music without having to worry about your hard disk space.

First of all you have to set up the recording channels by doing

alsamixer

Once there, select the capture view by typing the tab key. You’ll get the next screen:

alsamixer.png

With the arrow keys select the column Capture and set it to the CAPTUR mode with the space key as in the screenshot. Adjust the recording volume with the arrow keys. You can also set it up with the gnome volume control panel going to the capture tab.

Recording sound to an mp3 file

You’ll need the lame mp3 encoder. Install it by doing

sudo apt-get install lame

Type the following command

arecord -f cd -t raw | lame -x -r – out.mp3

Arecord captures the audio that goes through your computer and pipes it to the lame encoder, so you encode the audio directly to an mp3 file. You can specify more options to the lame encoder such as the bitrate with lame -x -b bitrate. Without specifying the bitrate it encodes to 128kbps constant bit rate cbr. If you want to record for an specific amount of time then:

arecord -f cd -d numberofseconds -t raw | lame -x -r – out.mp3

Recording sound to an ogg file

You’ll need the oggenc (the ogg encoder). Install it by doing

sudo apt-get install vorbis-tools

Type the following command

arecord -f cd -t raw | oggenc – -r -o out.ogg

And you’ll get your sound recorded to an ogg file. Take into account that we record directly to a compressed file, so there’s nothing in between, so you can record for hours saving an incredible amount of hard disk space.

Ripping shoutcast audio streaming

Streamripper allows us to rip audio streaming servers. Install it by typing

sudo apt-get install streamripper

You can connect to any shoutcast radio station with xmms. Once playing get the info and write down the url. Then type:

streamripper url

and you’ll get each song in a separate mp3 file.

Enjoy recording!!! :)
Interesting audio applications.

Audacity-Editing mp3/ogg files

Streamripper-ripping audio streaming servers

Streamtuner-Stream directory browser


HOWTO: Formatting and partitioning your external usb hard drive

July 27, 2006

So, you have just bought a brand new external usb hard drive where you’ll store your backup data. Well, then now the question. How I format my new external usb hard drive using Ubuntu Linux or any tool available in the Linux world? In Ubuntu, there are two tools that aim to format and partition your hard drive which are Gparted and Qparted. Both of them nearly equal, so I’m going to introduce you to Gparted and afterwards DiskDrake

GPARTED

Using Gparted with an installed Ubuntu Os is quite difficult and buggy because your external hard drive must be unmounted and Ubuntu mounts it automatically. The best way to do it is using the Gparted live cd which can be found in:

http://gparted.sourceforge.net/livecd.php

It starts a fluxbox window manager with Gparted launched automatically. Then you can very easily format and partition your external usb hard drive. Your external hard drive will always be in /dev/sdaX.

DISKDRAKE

You can use DiskDrake with another live cd, but in this case a Linux Os live cd such as PCLinuxOS which can be downloaded from:

http://www.pclinuxos.com/news.php

Once you download the image, burn it, and boot from it. Enter the OS with user=root and password=root. It will go into a KDE Desktop. Open the K menu and run the command diskdrake. The DiskDrake partition editor will pop up. Then, there you are. It’s very easy to use. Partition and format your hard drive as you want.

Volume Labels?

With the apps pointed out, you will not be able to add labels (volume), but don’t worry, the linux command line is here to help us. Just once you have formatted your hard drive type:

df -k

and some lines will appear such us:

/dev/sda5 100789972 131232 95538828 1% /media/usbdisk

You see that Ubuntu automatically mounts the formatted harddrive with the generic label usbdisk. But you want an specific name. Then type:

e2label /dev/sda5 nameofthelabel

Once done, unmount the hard drive and plug it in again. Ubuntu will mount automatically the hard drive and a folder with the name of nameoflabel will appear in your desktop. Another issue. Most probably, Ubuntu will mount the hard drive with root permissions. To change the permissions, so you can write in your hard drive change them by writing this:
chown yourusername:yourgroupname /media/nameofthelabel

and all the changes will be remembered for future mounts. Cool!!!


Ubuntu Servers restored

July 24, 2006

It was due to a power outage in London. All Ubuntu related domains were down for more than four hours. Happily, all has been restored and all the services are up and running.


Ubuntu Servers Down

July 23, 2006

I can live without the ubuntuforums, but it seems that the ubuntu servers are down at the moment. No one can connect to ubuntu.com or ubuntuforums.org. Let’s await and see what has happened, but at this very moment ubuntu servers have been down for more than four hours.


My wonderful coffee machine

July 22, 2006

In this photo you can see the most beloved device in my home. A Nespresso Coffe machine. It makes incredible coffees with a delicious froth. Just take a look
Nespresso coffee


All against piracy

July 18, 2006

I have read the following news from Reuters about Microsoft suing resellers over piracy. Link http://today.reuters.com/news/NewsArticle.aspx?type=technologyNews&storyID=2006-07-18T131235Z_01_N18333266_RTRUKOC_0_US-MICROSOFT-LAWSUITS.xml
Well, I find it very good. If people can’t get software because is too expensive then just don’t steal it. If you want a cheap solution, try free and open source software, which is very powerful and in fact free.


Linux Support

July 16, 2006

The Linux support is awesome these days. For example if you go to Ubuntu Forums and post a question you’ll get an answer in a few minutes. It’s true that sometimes you can’t get a satisfactory answer and you can’t get a solution for your problem, but do you know what’s going on in the windows world? There are by far more difficult problems, such as viruses, spyware, adware and lots more, something that does not affect Linux at all. That’s why I love Linux, because of its power, its community and its way of doing things. By far, the best operating system on earth.