Saturday, 21 November 2009

Install and Configure quickly a DHCP Server

NOTE: These commands have been tested in Debian version unstable.

DHCP stands for Dynamick Host Configuration Protocol. This protocol allows to automatically obtain an IP address and set the network configuration.

We install a DHCP server:
#aptitude install dhcp3-server

Next step is configuring the DHCP server:
We have to set correcty the /etc/dhcp3/dhcpd.conf file.

There is a configuration file example at:
/usr/share/doc/dhcp3-server/examples/dhcpd.conf

e.g: I added these lines to my /etc/dhcp3/dhcpd.conf


subnet 192.168.1.0 netmask 255.255.255.252 {
range 192.168.1.2 192.168.1.3;
option routers 192.168.1.1;
option domain-name-servers 212.73.32.3, 212.73.32.67;
}


subnet and netmask indicate the network addresses of our network:
e.g: subnet 192.168.1.0 netmask 255.255.255.252 match 192.168.1.0, 192.168.1.1, 192.168.1.2 and 192.168.1.3 IP addresses.

range means which addresses can be returned by our dhcp server, here, it can return 192.168.1.2 and 192.168.1.3

routers indicates the gateway

domain-name-servers shows all dns addresses separated by commas.


Once we have correctly set dhcpd.conf file we restart the dhcp daemon:
#/etc/init.d/dhcp3-server restart


If everything has gone fine, we will execute in a client computer:
$sudo dhclient eth0

and the dhcp server will associate an IP adress to eth0 interface.

NOTE: dhcp3-client package provides dhclient command.
#aptitude install dhcp3-client

Sunday, 1 November 2009

Shell Script that shows Network Speed

The following shell script shows current download and upload speeds for the network interface you choose.

Copy the shell script in a file named, i.e: net_speed.sh

Then after setting execution permissions:
$chmod a+x net_speed.sh

You can run the shell script passing as the first argument the network interface you want to monitor:
./net_speed.sh eth0


You will get a line like that:
ppp0 DOWN:15 KB/s UP:880 B/s

This script works parsing /proc/net/dev file and calculating the difference between current transmitted or received bytes and their values one second ago.


#!/bin/bash

# This shell script shows the network speed, both received and transmitted.

# Usage: net_speed.sh interface
# e.g: net_speed.sh eth0


# Global variables
interface=$1
received_bytes=""
old_received_bytes=""
transmitted_bytes=""
old_transmitted_bytes=""


# This function parses /proc/net/dev file searching for a line containing $interface data.
# Within that line, the first and ninth numbers after ':' are respectively the received and transmited bytes.
function get_bytes
{
line=$(cat /proc/net/dev | grep $interface | cut -d ':' -f 2 | awk '{print "received_bytes="$1, "transmitted_bytes="$9}')
eval $line
}


# Function which calculates the speed using actual and old byte number.
# Speed is shown in KByte per second when greater or equal than 1 KByte per second.
# This function should be called each second.
function get_velocity
{
value=$1
old_value=$2

let vel=$value-$old_value
let velKB=$vel/1000
if [ $velKB != 0 ];
then
echo -n "$velKB KB/s";
else
echo -n "$vel B/s";
fi
}

# Gets initial values.
get_bytes
old_received_bytes=$received_bytes
old_transmitted_bytes=$transmitted_bytes

# Shows a message and waits for one second.
echo "Starting...";
sleep 1;
echo "";


# Main loop. It will repeat forever.
while true;
do

# Get new transmitted and received byte number values.
get_bytes

# Calculates speeds.
vel_recv=$(get_velocity $received_bytes $old_received_bytes)
vel_trans=$(get_velocity $transmitted_bytes $old_transmitted_bytes)

# Shows results in the console.
echo -en "$interface DOWN:$vel_recv\tUP:$vel_trans\r"

# Update old values to perform new calculations.
old_received_bytes=$received_bytes
old_transmitted_bytes=$transmitted_bytes

# Waits one second.
sleep 1;

done

Sunday, 11 October 2009

Howto Compile the Linux Kernel in GNU/Debian and Ubuntu

NOTE: Tested in GNU/Debian Sid. Ubuntu versions should also work.


OBTAIN KERNEL SOURCE CODE:

Obviously the first step is obtaining the source code.

It is recommended to place and build linux kernel source code in /usr/src directory, although it is not required.

We create our "Linux_Kernel_Source" directory for this task.
$mkdir Linux_Kernel_Source
$cd Linux_Kernel_Source


Linux kernel source code is freely available in Internet:
http://www.kernel.org
specifically, version 2.6:
http://www.kernel.org/pub/linux/kernel/v2.6

We download and uncompress latest source code (2.6.31 when this article was written):
#aptitude install wget bzip2 # packages needed to get the kernel source code and uncompress it.
$wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2

Uncompress the source:
$tar xvjf linux-2.6.31.tar.bz2

/usr/src/linux is a symlink to linux sources or at least linux kernel headers. It is required.
#ln -s linux-2.6.31 /usr/src/linux

$cd linux-2.6.31


KERNEL CONFIGURATION:

There are several ways to configure the linux kernel build process. We are gonna use the console way (using make menuconfig).

#aptitude install ncurses-dev # This package is needed to execute make menuconfig.


NOTE: If we would want to execute make gconfig (gtk configuring way) we would need to install:
gtk+-2.0, glib-2.0 and libglade-2.0

We exec:
make menuconfig

A console menu will appear. There always are three options:
select: selects which kernel part to configure. Pressing SPACE key you can select if it is going to be built as a kernel module or built in within the kernel itself.
exit: To exit from the kernel part we are configuring or to exit the configuration process.
help: Provides good info about what choices do you have.


If you do not want to configure everything in the kernel again (It is huge!), you could search in the /boot directory for configuration files:

Every configuration file begins with config followed by its kernel version.

We copy one of them to our linux kernel source directory:
$cp /boot/config-2.6.26-1-686 /usr/src/linux

To select that configuration file you have to select "load alternate file" in the make menuconfig configuration process.
To make permament the changes you have done, and include them in the compilation, select "save alternate file" and save it as ".config"



BUILDING AND COMPILING THE KERNEL:

Once we are finished configuring the kernel compilation process, we are going to compile it.

To get some help about options we have:
$make help # shows all different options we could choose.

We now build the kernel and its modules:
$make

Then we install the kernel in /boot directory, as vmlinuz-"your kernel version"
#make install

To install kernel modules:
#make modules_install # installs kernel modules in /lib/modules/2.6.31


CREATING A INITRD IMAGE FILE

We need also to create a initrd image file to be able to boot in two steps:

#aptitude install initramfs-tools

#mkinitramfs -o /boot/initrd.img-2.6.31 2.6.31
We set the output image file using -o option.
We have also to indicate which kernel version are we using. e.g: 2.6.31


UPDATING GRUB:

Last step is setting correctly the bootloader so it will boot the recently compiled kernel.

We assume the GRUB bootloader.

Next lines show an example grub entry in /boot/grub/menu.lst file.

(hd0,6) and /dev/sda7 should be changed to match your system configuration.

title  Debian GNU/Linux, kernel 2.6.31
root (hd0,6)
kernel /boot/vmlinuz-2.6.31 root=/dev/sda7 ro
initrd /boot/initrd.img-2.6.31



INSTALL GRUB IN YOUR DRIVE

NOTE: Be careful or you will not be able to boot your system.

/dev/sda is the hard disk where boot sector is installed, change it to match your system.
#grub-install /dev/sda


REFERENCE:

http://www.howtoforge.com/howto_linux_kernel_2.6_compile_debian

Sunday, 4 October 2009

Installing Mediawiki using SQLite Database in GNU/Debian

NOTE: These article commands have been tested in GNU/Debian Sid. They should also work in Ubuntu flavours.

THIS ARTICLE IS BASED ON:
http://linuxclues.blogspot.com/2008/04/installing-configuring-mediawiki-ubuntu.html
http://linuxclues.blogspot.com/2008/04/backup-restore-mediawiki-ubuntu.html


First we need to install php, apache and SQLite if they are not installed. This command will do the trick:
#apt-get install php5-sqlite

Following mediawiki recommendation we add some extensions to php for SQLite to work:
Edit /etc/php5/apache2/php.ini
Add these two lines in that file:

  extension=php_pdo_sqlite.so
extension=php_pdo.so


To solve servername warning when launching apache daemon:
#echo "ServerName localhost" >> /etc/apache2/httpd.conf

We start apache web server:
#apache2ctl start


DOWNLOAD MEDIAWIKI SOURCE CODE

#cd /var/www

We get latest mediawiki source code tarball (current one when writting this article is 1.15.1):
#wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.1.tar.gz

Uncompress it:
#tar xvfz mediawiki-1.15.1.tar.gz
#cd mediawiki-1.15.1
#ln -s mediawiki-1.15.1 mediawiki

We set writting permissions to config directory so we will be able to configure our wiki:
#chmod a+w config


CONFIGURING THE WIKI

We open a web browser: http://localhost/mediawiki/

We observe that: It detects correctly SQLite drivers!!

Some clues about configuring first time the wiki are pointed in this article:
http://linuxclues.blogspot.com/2008/04/installing-configuring-mediawiki-ubuntu.html

NOTE: SQLite is userless, and therefore requesting to fill usernames and passwords for it is pointless in configure page.
However it is needed to write something in those fields to continue the configuring process.

NOTE: SQLite Data directory field is needed to store SQlite database. Remember to give to it writting permissions!!


If everything goes fine you will get: Success!!


CONFIGURING LocalSettings.php FILE

Edit LocalSettings.php following http://linuxclues.blogspot.com/2008/04/installing-configuring-mediawiki-ubuntu.html instructions.

Now we set adequate permissions to this file:
#cd var/www/mediawiki
#mv config/LocalSettings.php . # mv LocalSettings.php to parent directory.
#chown root:www-data LocalSettings.php
#chmod 0640 LocalSettings.php

NOTE: When finished your configuration you should delete config directory to prevent the wiki being configured again.


CREATING A NORMAL USER

In the web browser: http://localhost/mediawiki

You will need to login as WikiSysop user.

Navigate to: SpecialPages --> Login in / create account --> Then create a new normal user account.


BACKING AND RESTORING THE SQLITE BASED MEDIAWIKI

SQLite has no users so we will not need a administrator user. Nevertheless we will set root permissions to prevent other users to access AdminSettings.php file:

Creating AdminSettings.php file
#cd /var/www/mediawiki
#cp AdminSettings.sample AdminSettings.php
#chown root:root AdminSettings.php
#chmod 600 AdminSettings.php


We will need php console cli command:
#aptitude install php5-cli # php command.

BACKING UP THE WIKI
Create the xml backup file:
#cd /var/www/mediawiki/maintenance
#php dumpBackup.php --current > ~/backup.xml

RESTORING THE WIKI
#cd /var/www/mediawiki/maintenance
#php importDump.php ~/backup.xml


REFERENCE:

href="http://www.mediawiki.org/wiki/Manual:SQLite

Sunday, 15 March 2009

Creating a FEDORA 10 CHROOT Environment in DEBIAN SID

Fedora is a linux distribution supported by a community: fedoraproject.org and by Red Hat enterprise.
Fedora (Wikipedia)

Current release name is Fedora 10.


Fedora packages are provided in rpm format. We can manage these packages using rpm tool, and use yum to deal with repositories.

Debian sid provides the rpm tool so our first task will be installing it in our Debian system:
#aptitude install rpm

This tool will allow us to install fedora packages in our debian system using a separate database and a different directory than / .


We create the directory to place our Fedora chroot environment:
$mkdir Fedora
$cd Fedora
$mkdir Distro


We are going to download the minimal amount of rpm packages required for our Fedora distro.

Navigating through fedora project web page we can find some mirrors, e.g:
http://glup.uv.es/mirror/fedora/linux/
http://ftp.uni-kl.de/pub/linux/fedora/linux/
Choose one near you.

Within those mirrors we find where packages are:
http://glup.uv.es/mirror/fedora/linux/releases/10/Fedora/i386/os/Packages/
http://ftp.uni-kl.de/pub/linux/fedora/linux/releases/10/Fedora/i386/os/Packages/


We can download every package we need using wget tool.
Although we only show the installing rpm command, you will have to download every rpm package prior to install it.
NOTE: Package version may not coincide, but the same package name and same installing order are mandatory.

If we need some file to satisfy a dependency, but don't know which package contains it, this web page can help us:
http://rpmfind.net


Our goal is to install a minimal working Fedora distro. Some important packages are needed to acomplish that: bash, rpm and yum.

Bash will provide us a shell, rpm is needed to manage rpm packages, and yum will allow us to continue installing packages in our chroot enviroment using some rpm repositories and solving dependency problems.


We begin installing the packages:
/home/foo/Fedora/Distro is the directory where our chroot environment will be placed.

#export FEDORA_DISTRO_DIR="/home/foo/Fedora/Distro"
rpm --root $FEDORA_DISTRO_DIR/ -i setup-2.7.4-1.fc10.noarch.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i filesystem-2.4.19-1.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i basesystem-10.0-1.noarch.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i libgcc-4.3.2-7.i386.rpm


"--nodeps" option is needed because glibc package has cross dependencies.
rpm --root $FEDORA_DISTRO_DIR/ -i glibc-2.9-2.i686.rpm --nodeps

rpm --root $FEDORA_DISTRO_DIR/ -i ncurses-base-5.6-20.20080927.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i ncurses-libs-5.6-20.20080927.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i bash-3.2-29.fc10.i386.rpm

Bash is now installed so we could execute chroot if we would want.

rpm --root $FEDORA_DISTRO_DIR/ -i tzdata-2008h-1.fc10.noarch.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i glibc-common-2.9-2.i386.rpm


rpm --root $FEDORA_DISTRO_DIR/ -i ncurses-5.6-20.20080927.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i libsepol-2.0.33-1.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i libselinux-2.0.73-1.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i libstdc++-4.3.2-7.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i pcre-7.8-1.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i zlib-1.2.3-18.fc9.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i info-4.12-4.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i grep-2.5.1a-61.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i libattr-2.4.43-1.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i libacl-2.2.47-3.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i libcap-2.10-2.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i audit-libs-1.7.8-6.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i cracklib-2.8.12-2.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i cracklib-dicts-2.8.12-2.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i db4-4.7.25-5.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i coreutils-6.12-17.fc10.i386.rpm -nodeps
rpm --root $FEDORA_DISTRO_DIR/ -i pam-1.0.2-2.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i popt-1.13-4.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i logrotate-3.7.7-1.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i bzip2-libs-1.0.5-3.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i compat-db45-4.5.20-5.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i elfutils-libelf-0.137-3.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i readline-5.2-13.fc9.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i lua-5.1.4-1.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i file-libs-4.26-3.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i nspr-4.7.2-2.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i sqlite-3.5.9-2.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i nss-3.12.2.0-3.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i crontabs-1.10-23.fc10.noarch.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i e2fsprogs-libs-1.41.3-2.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i keyutils-libs-1.2-3.fc9.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i krb5-libs-1.6.3-16.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i libidn-0.6.14-8.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i ca-certificates-2008-7.noarch.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i openssl-0.9.8g-11.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i cyrus-sasl-lib-2.1.22-19.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i openldap-2.4.12-1.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i libssh2-0.18-7.fc9.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i libcurl-7.18.2-7.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i curl-7.18.2-7.fc10.i386.rpm
rpm --root $FEDORA_DISTRO_DIR/ -i rpm-libs-4.6.0-0.rc1.7.i386.rpm --nodeps
rpm --root $FEDORA_DISTRO_DIR/ -i rpm-4.6.0-0.rc1.7.i386.rpm


RPM ACOMPLISHED!! We would be able to enter the chroot environment an install packages with rpm.


Packages needed to create new users and change their passwords:
rpm -i shadow-utils-4.1.2-8.fc10.i386.rpm
rpm -i gamin-0.1.9-6.fc10.i386.rpm --nodeps
rpm -i glib2-2.18.2-3.fc10.i386.rpm
rpm -i libuser-0.56.9-1.i386.rpm
rpm -i passwd-0.75-2.fc9.i386.rpm


Terminal to login in the system: (actually we will use agetty instead)
rpm -i mingetty-1.08-2.fc9.i386.rpm


Packages needed to install YUM tool.
rpm -i expat-2.0.1-5.i386.rpm
rpm -i gdbm-1.8.0-29.fc10.i386.rpm
rpm -i python-libs-2.5.2-1.fc10.i386.rpm --nodeps
rpm -i python-2.5.2-1.fc10.i386.rpm
rpm -i libgpg-error-1.6-2.i386.rpm
rpm -i libgcrypt-1.4.3-2.fc10.i386.rpm
rpm -i libksba-1.0.4-1.fc10.i386.rpm
rpm -i pth-2.0.7-7.i386.rpm
rpm -i dirmngr-1.0.2-1.fc10.i386.rpm
rpm -i libusb-0.1.12-20.fc10.i386.rpm
rpm -i chkconfig-1.3.38-1.i386.rpm
rpm -i pinentry-0.7.4-5.fc9.i386.rpm
rpm -i gnupg2-2.0.9-3.fc10.i386.rpm
rpm -i gpgme-1.1.7-1.fc10.i386.rpm
rpm -i pygpgme-0.1-8.fc9.i386.rpm
rpm -i python-iniparse-0.2.3-3.fc9.noarch.rpm
rpm -i rpm-python-4.6.0-0.rc1.7.i386.rpm
rpm -i python-urlgrabber-3.0.0-10.fc10.noarch.rpm
rpm -i libxml2-2.7.2-1.fc10.i386.rpm
rpm -i yum-metadata-parser-1.1.2-10.fc10.i386.rpm
rpm -i yum-3.2.20-3.fc10.noarch.rpm


Yum is now installed in our system. So we add a repository.

We edit and add this into $FEDORA_DISTRO_DIR/etc/yum.conf file:
Change baseurl to the mirror url you choose.

[Fedora10]
name=Fedora 10
baseurl=http://ftp.uni-kl.de/pub/linux/fedora/linux/releases/10/Fedora/i386/os


NOTE: We will need to run: #yum update to take into account this new repository, when our chroot environment will be working.


MOUNTING DIRECTORIES
Lets mount the directories needed for our chroot environment:

# cd $FEDORA_DISTRO_DIR
# mount --bind /proc proc
# mount --bind /sys sys
# mount --bind /proc/bus/usb proc/bus/usb
# mount --bind /dev dev
# mount --bind /dev/shm dev/shm
# mount --bind /dev/pts dev/pts
# mount --bind /tmp tmp # to use X-Windows
# mkdir -p lib/init/rw
# mount --bind /lib/init/rw lib/init/rw



We copy these files to be able to resolve localhost and dns
# cp /etc/hosts $FEDORA_DISTRO_DIR/etc/
# cp /etc/resolv.conf $FEDORA_DISTRO_DIR/etc/


Create a working /etc/mtab file:
# cp /etc/mtab $FEDORA_DISTRO_DIR/etc #edit this file to correct values. e.g:
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0


NOTE: You can left proc and sysfs only, if you want.

ENTER INTO THE CHROOT JAIL:
Sid:# chroot $FEDORA_DISTRO_DIR

We are now in the Fedora 10 environment!!


Now we import the repository key:
Fedora:# wget http://ftp.uni-kl.de/pub/linux/fedora/linux/releases/10/Fedora/i386/os/RPM-GPG-KEY-fedora-i386
Fedora:# rpm --import RPM-GPG-KEY-fedora-i386
Fedora:# yum update



We can install new packages. e.g:
Fedora:# yum install man-pages
Fedora:# yum install man


Fedora:# yum install iputils #ping utility.



Before login in the standar way we need to CREATE A NEW USER AND CHANGE PASSWORDS:

To solve password changing problem: "passwd: User not known to the underlying authentication module"
Fedora:# yum install shadow-utils
Fedora:# pwconv #to create /etc/shadow file.


We create fedoraUser:
Fedora:# adduser fedoraUser

Fedora:# passwd # change root password.
Fedora:# passwd fedoraUser # change fedoraUser password.





To ENTER INTO THE CHROOT JAIL IN THE STANDARD WAY, without CONTROLLING TTY error, we will use agetty command:

Fedora:# yum install util-linux-ng #to obtain agetty command.
Sid:$ su -c "chroot ChDistro /sbin/agetty 38400 $(tty)"

We can login as fedoraUser.




USING SID X-Windows:

Sid:$xhost +local:`hostname` # Allow connections from local machine.

Fedora:$ export DISPLAY=:0.0 if you are using 0.0 display in Sid distro.
Fedora:$ xclock





INSTALLING EMACS

Fedora:# yum install emacs

We get this error, to solve it we will install some fonts e.g dejavu ones:

# Emacs fonts problems it is solved installing some fonts:
"Pango-CRITICAL **: No fonts found:
This probably means that the fontconfig
library is not correctly configured. You may need to
edit the fonts.conf configuration file. More information
about fontconfig can be found in the fontconfig(3) manual
page and on http://fontconfig.org"


Fedora:# yum install dejavu-fonts




INSTALLING FIREFOX

Fedora:# yum install firefox


Some errors occur:

D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory

solved with:
#dbus-uuidgen --ensure


GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://www.gnome.org/projects/gconf/ for information. (Details - 1: Failed to get connection to session: Failed to execute dbus-launch to autolaunch D-Bus session)

solved installing:
#yum install dbus-x11 so /usr/bin/dbus-launch will be available.




SOUND SUPPORT IN OUR CHROOT

Fedora:# ls -l /dev/snd/*
We see a group number, 29 in my system. This is audio group in my Sid distro.
Fedora:# groupadd -g 29 audio
Fedora:# ls -l /dev/snd*
Fedora:# usermod -a -G audio fedoraUser

we can check if audio group was added:
Fedora:# groups fedoraUser

I use alsa in my system so:
Fedora:# yum install alsa-lib

Now we can use sound applications in our Fedora chroot environment.