Adding Hard Drive to CENTOS Logical Volume Group

October 16th, 2010

I was trying to add a new IDE hard drive to a logical volume group.
made sure that the new hard drive was found:
dmesg | grep drive

now activating the new hard drive as follows
/sbin/fdisk /dev/hdb

n   add a new partition
t   change a partition’s system id (selected 8e for logical volume)
w   write table to disk and exit

/usr/sbin/vgscan –mknodes
/usr/sbin/vgchange -ay
/usr/sbin/lvscan /usr/sbin/lvextend -L+74.5G /dev/VolGroup00/LogVol00

after reboot, made sure the drive was found

/sbin/pvscan

went out and got the correct install CD (instead of the Live CD which doesn’t have this feature)

wget ftp://mirror.atlantic.net/pub/centos/5.5/isos/i386/CentOS-5.5-i386-bin-1of7.iso

burned the cd
cdrecord -v speed=4 dev=/dev/hdc -eject -pad -dao CentOS-5.5-i386-bin-1of7.iso

rebooted with install CD

when the install disk prompts just run
linux rescue

follow the prompts but say no to mounting the file system when asked.

The rest of the job was easy.

make the volumes available for editing
lvm vgchange -ay

now for some house-keeping to make sure our drives are ready and have no errors

e2fsck -f /dev/VolGroup00/LogVol00

after waiting a long time for the above check to run the below command to resize the VG:

resize2fs /dev/VolGroup00/LogVol00

reboot

check to make sure we now have that extra 74.5GB available.
df -h

ALL DONE.


Adding a Network Printer as a Samba Share for a Windows 7 Home Premium Client

June 1st, 2010

I spent a lot of time trying to add a printer to my wife’s Windows 7 Home Premium machine. My printer is shared under Samba on my CentOS server. When I first tried to add a network printer using the Windows 7 “add network printer dialog,” Windows 7 would not display the driver for the HP6540 printer (even though the driver for my HP printer is automatically provided with Windows 7 per MS documentation). When I typed in the correct diver name, Windows 7 insisted it could not find the driver.

Solution: I finally gave up and connected the Windows box directly to the printer’s USB port. Windows 7 detected the printer and successfully added the local printer. After the driver was installed, I just repeated the add network printer dialog and, scrolled down through the available drivers and, voila, there was the correct HP driver. After I selected the new driver, Windows 7 detected and added the network printer without complaint.


Using Linux Searches for Organizing Digital Photos

February 20th, 2010

SEARCHING EXIF DATA:

If you are like me, you have a huge number of digital photos scattered across a number of directories.  Linux has some great tools for searching and organizing your digital pictures using the EXIF data stored with each .jpg (please note that some of these searches are case sensitive, e.g. .JPG / .jpg)

list all files in a test file named temp.txt
find . -iname '*.jpg' >temp.txt

count all jpegs in a directory and subdirectories (iname finds both JPG and jpg)
find . -iname '*.jpg' | wc -l

list all jpeg dates in a directory by date
exifprobe -Ln *.jpg | grep DateTimeOriginal

search recursively through directories for a date [(in this case, October, 2009) (thanks to Neonsignal @ linuxquestions.org):

find /home/username/Pictures/halloween/ -iname '*.JPG' -exec /bin/bash -c '[[ $(exif -t DateTimeOriginal -m "{}") =~ ^2009:10:.. ]]’ \; -print

RETURNS OUTPUT LIKE THIS:

/home/username/Pictures/test2/halloween_IMG_0921.JPG
/home/username/Pictures/test2/IMG_0958.JPG

Perl programmers are the ninjas of the Linux universe in my opinion.  I tried F-Spot, Picassa, and other organizing tools but found a perl script that worked better for me.  The script compares and collecting all unique photos to a single directory structure (this is a great way back up the photos scattered across your directories).  The script came from http://www.nooblet.org/blog/2007/exifsort/

/home/userl/Pictures/ -type d -exec /home/user_username/exifsort.pl {} \;

As you may have discovered editing your pictures sometimes changes or destroys EXIF data.  Linux can help you recover or create new EXIF data.

MANIPULATING EXIF DATA:

You can create a minimal EXIF data (for an edited digital picture or even a scanned photograph).  By default, jhead will use the file date assigned by Linux to the digital photograph.

jhead -mkexif target.jpg

You can change the default date to one of your choosing (here January 1, 20001 at 12:00 noon)

jhead -ts2001:01:01-12:00:00 target.jpg

If you kept your original digital picture, you can transfer the EXIF data from the original jpg to the target jpg

jhead -te original.jpg target.jpg


Find, Delete, and Copy Recursively Through a Directory Tree

January 28th, 2010

I have lots of files in a directory tree (web_photos) and need to delete unwanted files and place the remainder in a single directory (all_in_one_directory) using the following two steps:

find /home/user/web_photos/ -name "*.sized.jpg" -exec rm -f {} \;

find /home/user/web_photos/ -name "*.jpg" -exec cp {} /home/user/all_in_one_directory/ \;

Services to Disable on a Linux Home Server

January 28th, 2010

Services to Disable on a Linux Home Server

Note: This list assumes you have a very simple SE Linux-enabled server providing web, samba and mail services. 

/sbin/chkconfig –level 345 acpid off
/sbin/chkconfig –level 345 bluetooth off
/sbin/chkconfig –level 345 portmap off
/sbin/chkconfig –level 345 nfs off
/sbin/chkconfig –level 345 nfslock off
/sbin/chkconfig –level 345 rpcidmapd off
/sbin/chkconfig –level 345 rpcgssd off
/sbin/chkconfig –level 345 mdmonitor off
/sbin/chkconfig –level 345 hidd off
/sbin/chkconfig –level 345 firstboot off
/sbin/chkconfig –level 345 kudzu off
/sbin/chkconfig –level 345 jexec off

To check your current services,

/sbin/chkconfig –list | grep 3:on

apmd

0:off

1:off

2:on

3:on

4:on

5:on

6:off

auditd

0:off

1:off

2:on

3:on

4:on

5:on

6:off

autofs

0:off

1:off

2:off

3:on

4:on

5:on

6:off

crond

0:off

1:off

2:on

3:on

4:on

5:on

6:off

cups

0:off

1:off

2:on

3:on

4:on

5:on

6:off

dovecot

0:off

1:off

2:on

3:on

4:on

5:on

6:off

gpm

0:off

1:off

2:on

3:on

4:on

5:on

6:off

haldaemon

0:off

1:off

2:off

3:on

4:on

5:on

6:off

hplip

0:off

1:off

2:on

3:on

4:on

5:on

6:off

httpd

0:off

1:off

2:off

3:on

4:on

5:on

6:off

ip6tables

0:off

1:off

2:on

3:on

4:on

5:on

6:off

kudzu

0:off

1:off

2:off

3:on

4:on

5:on

6:off

lvm2-monitor

0:off

1:on

2:on

3:on

4:on

5:on

6:off

mcstrans

0:off

1:off

2:on

3:on

4:on

5:on

6:off

messagebus

0:off

1:off

2:off

3:on

4:on

5:on

6:off

microcode_ctl

0:off

1:off

2:on

3:on

4:on

5:on

6:off

mysqld

0:off

1:off

2:off

3:on

4:on

5:on

6:off

named

0:off

1:off

2:off

3:on

4:on

5:on

6:off

network

0:off

1:off

2:on

3:on

4:on

5:on

6:off

ntpd

0:off

1:off

2:off

3:on

4:off

5:on

6:off

pcscd

0:off

1:off

2:on

3:on

4:on

5:on

6:off

postfix

0:off

1:off

2:on

3:on

4:on

5:on

6:off

rawdevices

0:off

1:off

2:off

3:on

4:on

5:on

6:off

readahead_early

0:off

1:off

2:on

3:on

4:on

5:on

6:off

restorecond

0:off

1:off

2:on

3:on

4:on

5:on

6:off

setroubleshoot

0:off

1:off

2:off

3:on

4:on

5:on

6:off

smartd

0:off

1:off

2:on

3:on

4:on

5:on

6:off

smb

0:off

1:off

2:off

3:on

4:off

5:on

6:off

spamassassin

0:off

1:off

2:off

3:on

4:on

5:on

6:off

sshd

0:off

1:off

2:on

3:on

4:on

5:on

6:off

syslog

0:off

1:off

2:on

3:on

4:on

5:on

6:off

xfs

0:off

1:off

2:on

3:on

4:on

5:on

6:off

xinetd

0:off

1:off

2:off

3:on

4:on

5:on

6:off

yum-updatesd

0:off

1:off

2:on

3:on

4:on

5:on

6:off


Ubuntu 9.10 Wireless WEP with Static IP

December 7th, 2009

This article explain how I used Ubuntu 9.10′s network manager to establish a static ip address with WEP encryption.

I had several difficulties making my Wireless WEP connection using Ubuntu’s Network Manager.   I ran into two problems: (1) WEP did not seem to work; and (2) the default gateway had to be added manually using the command “sudo route add default gw 192.186.25.1.”   I tried to work around the problems by uninstalling the Network Manager and editing /etc/network/interfaces.  I even tried enabling a script /etc/rc.local. Neither worked.  This surprised me since I have manually configured many network cards and wireless connections with success. I finally reinstalled the Network Manager and ran through the configurations suggested in many conflicting posts.  These four screen shots show what I did to solve these two problems with my Netgear router. They show that WEP worked when I used the security settings for 40/128 bit key and authentication type “open” (instead of shared). They also show that the “blank” default gateway problem is fixed when you hit the ENTER key after typing the gateway setting.


Webalizer for Multiple Virtual Domains with Cron Job in Centos 5.3

October 9th, 2009

Webalizer is a good free program to analyze your apache webserver’s logs. It will give a a rough idea of who is visiting your site and who referred the vistor and what search terms were used to find your site.

To install, simply open a terminal and
sudo /usr/bin/yum install webalizer

This will install the binaries and a simple configuration file.

cd /etc/webalizer

make a copy of your webalizer.conf example file for fyour first virtual domain. Our examples will be virtual_1_webalizer.conf. After we customize this file to meet your server’s needs, we will simply copy and rename virtual_1_webalizer.conf for each of your other domains (virtual_2_webalizer.conf, etc)

First we’ll do a little prepatory work.  Create a directory for each of your virtual domains where webalizer can store its output.  You will need to do this if you want to let users access their webalizer results remotely.  In our example, mkdir /var/www/usage/

mkdir /var/www/usage/

mkdir /var/www/usage/virtual_1

Second, we’ll need to create a history file so that webalizer will accumulate statistics for more than a single day.

touch /var/lib/webalizer/virtual_1_webalizer.hist

mkdir /var/lib/webalizer/virtual_1

touch /var/lib/webalizer/virtual_1/webalizer.current

Open the virtual_1_webalizer.conf  in your favorite editor (I use vi).  I  have bolded the portions I had to modify.

vi /etc/webalizer/virtual_1_webalizer.conf

1.  Insert the name of your apache server’s access log for virtual_1.  In our example below, it’s www.yourdomain.com-access_log.

2.  Specify the file log format.  In our example below, its clf (common log format).

3. Indicate the output directory /var/www/usage/virtual_1

4. Tell webalizer where to find the virtual host’s history file /var/lib/webalizer/virtual_1_webalizer.hist

5. Tell webalizer where to fine the virtual host’s current file   /var/lib/webalizer/virtual_1/webalizer.current

6.  Now tell webalizer the name of the virtual domain www.your_domain.com

Now save the file.

#
# Sample Webalizer configuration file
# Copyright 1997-2000 by Bradford L. Barrett (brad@mrunix.net)
#
# Distributed under the GNU General Public License. See the
# files “Copyright” and “COPYING” provided with the webalizer
# distribution for additional information.
#
# This is a sample configuration file for the Webalizer (ver 2.01)
# Lines starting with pound signs ‘#’ are comment lines and are
# ignored. Blank lines are skipped as well. Other lines are considered
# as configuration lines, and have the form “ConfigOption Value” where
# ConfigOption is a valid configuration keyword, and Value is the value
# to assign that configuration option. Invalid keyword/values are
# ignored, with appropriate warnings being displayed. There must be
# at least one space or tab between the keyword and its value.
#
# As of version 0.98, The Webalizer will look for a ‘default’ configuration
# file named “webalizer.conf” in the current directory, and if not found
# there, will look for “/etc/webalizer.conf”.

# LogFile defines the web server log file to use. If not specified
# here or on on the command line, input will default to STDIN. If
# the log filename ends in ‘.gz’ (ie: a gzip compressed file), it will
# be decompressed on the fly as it is being read.

LogFile /var/log/httpd/www.yourdomain.com-access_log

# LogType defines the log type being processed. Normally, the Webalizer
# expects a CLF or Combined web server log as input. Using this option,
# you can process ftp logs as well (xferlog as produced by wu-ftp and
# others), or Squid native logs. Values can be ‘clf’, ‘ftp’ or ‘squid’,
# with ‘clf’ the default.

#LogType clf

# OutputDir is where you want to put the output files. This should

# should be a full path name, however relative ones might work as well.
# If no output directory is specified, the current directory will be used.

OutputDir      /var/www/usage/virtual_1

# HistoryName allows you to specify the name of the history file produced
# by the Webalizer.  The history file keeps the data for up to 12 months
# worth of logs, used for generating the main HTML page (index.html).
# The default is a file named “webalizer.hist”, stored in the specified
# output directory.  If you specify just the filename (without a path),
# it will be kept in the specified output directory.  Otherwise, the path
# is relative to the output directory, unless absolute (leading /).

HistoryName     /var/lib/webalizer/virtual_1_webalizer.hist

# Incremental processing allows multiple partial log files to be used
# instead of one huge one.  Useful for large sites that have to rotate
# their log files more than once a month.  The Webalizer will save its
# internal state before exiting, and restore it the next time run, in
# order to continue processing where it left off.  This mode also causes
# The Webalizer to scan for and ignore duplicate records (records already
# processed by a previous run).  See the README file for additional
# information.  The value may be ‘yes’ or ‘no’, with a default of ‘no’.
# The file ‘webalizer.current’ is used to store the current state data,
# and is located in the output directory of the program (unless changed
# with the IncrementalName option below).  Please read at least the section
# on Incremental processing in the README file before you enable this option.

Incremental     yes

# IncrementalName allows you to specify the filename for saving the
# incremental data in.  It is similar to the HistoryName option where the
# name is relative to the specified output directory, unless an absolute
# filename is specified.  The default is a file named “webalizer.current”
# kept in the normal output directory.  If you don’t specify “Incremental”
# as ‘yes’ then this option has no meaning.

IncrementalName /var/lib/webalizer/virtual_1/webalizer.current

[PORTION OMITTED]

# HostName defines the hostname for the report.  This is used in
# the title, and is prepended to the URL table items.  This allows
# clicking on URL’s in the report to go to the proper location in
# the event you are running the report on a ‘virtual’ web server,
# or for a server different than the one the report resides on.
# If not specified here, or on the command line, webalizer will
# try to get the hostname via a uname system call.  If that fails,
# it will default to “localhost”.

HostName       www.your_domain.com

[OMITTED REST OF FILE]

Now create a script called run_webalizer.sh

touch /etc/webalizer/run_webalizer.sh

insert the following:

for i in /etc/webalizer/*.conf; do webalizer -c $i;
echo “webalizer has run”;
done

Now, make the script executable.

chmod + /etc/webalizer/run_webalizer.sh

Now, run the script.

sh /etc/webalizier/run_webalizer.sh

NOTE:  You may get an error message like

"Error: Unable to save current run data"

The message probably indicates some permissions error.  I haven’t figured out how to fix it but it does not appear to prevent webalizer from doing its basic job.

Now, let’s check our work.  You should now be able to see your output using your web browser at:

http://server_address/usage/virtual_1/

Now we want to add the other domains.  Just copy the above steps for each domain (e.g. copy virtual_1_webalizer.conf to virtual_2_webalizer.conf)

Now we want webalizer to run automatically for all our virtual hosts at 12:01 each morning and mail the output to us.  To do this we will add it to the cron file

crontab -e

1 0 * * * sh /etc/webalizer/run_webalizer.sh 2>&1 | mail -s “webalizer ouput” root@your_domain.com

By default, webalizer is only viewable locally (localhost).  To enable others to view it, you will have to edit the file:

vi /etc/httpd/conf.d/webalizer.conf

To make this less accessible, you can assign passwords by modifying your apache server configuration file like this

vi /etc/httpd/conf/httpd.conf

and insert this file into the virtual domain’s directory

<Directory> /var/www/usage/virtual_1>
AuthType Basic
AuthName “Password Required”
AuthUserFile /var/www/pass/.virtual_1.password
Require valid-user user_name
</Directory>

Now make a directory for your passwords like this

mkdir /var/www/pass

htpasswd -c /var/www/pass/.virtual_1.password/ username

Explanations of the data displayed by webalizer can be found here:


Configuring Sound and Wireless for IBM Thinkpad 600E with Ubuntu

December 26th, 2008

These are my notes on activating the sound card on an IBM Thinkpad 600E, Model 2646-AAU. Ubuntu is usually pretty automatic but but the sound and the wireless network card do not work out of the box. I am using a lighter version of Ubuntu called Xubuntu  (Intrepid Ibex 8.10 release).

The major difference from my earlier install notes is that we are loading the snd-cs4232 for alsa.  For more general reference for sound issues, see the excellent article for Ubuntu Basic Troubleshooting Sound.

There were three big problems.
1. The install locked up if the Netgear MA401 wireless card was inserted during install. I just removed the card and reinstalled with no further trouble.
2. The wireless Netgear card didn’t work (another lockup). I had to blacklist hostap_cs drivers in order to allow the orinoco_cs drivers to load. (additional configurations were required–see below).
3. The sound requires quite a few module and blacklist incantations. For example, you have to load the snd-cs4232 module in /etc/modules but your configuration in /etc/modprobe.d/alsa-base refers to the snd-cs4236 module. I don’t know why but it works.  To add to the drama, when I got the sound working, my wireless card stopped working. I had to exclude IRQ 3 in /etc/pcmcia/config.opts.

Ok, so lets start the receipe.  Prepare your Thinkpad by making sure that you have disabled “FastBoot” in the bios. You can check this by booting your machine while holding down the F1 key.  Before you start these steps, its a good idea to back up your original files like this:

sudo cp /etc/modules /etc/modules_bak

sudo cp /etc/modprobe.d/blacklist /etc/modprobe.d/blacklist_bak

sudo cp /etc/modprobe.d/alsa-base /etc/modprobe.d/alsa-base_bak

sudo cp /etc/pcmcia/config.opts sudo vi /etc/pcmcia/config.opts_bak (necessary only if you are configuring wireless)

1. Add these lines to /etc/modules:

sudo vi /etc/modules

sound
ad1848
uart401
snd-cs4232

2. Blacklist the incorrect sound card in /etc/modprobe.d/blacklist.

sudo vi /etc/modprobe.d/blacklist.conf

Add these lines as exactly as written below:
blacklist snd-cs46xx
blacklist cs46xx

3. Add these lines at the end of alsa-base:

sudo vi /etc/modprobe.d/alsa-base

alias char-major-116 snd
alias char-major-14 soundcore
alias snd-card-0 snd-cs4236
options snd-cs4236 isapnp=0 cport=0×538 port=0×530 sb_port=0×220 fm_port=0×388 irq=5 dma1=1 dma2=0
alias sound-slot-0 snd-card-0
alias sound-slot-1 snd-card-1

alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss

options snd cards_limit=1

4.  Open a terminal and run two tests to make sure your TP has recognized the card:

sudo aplay -l

You should get a response like:

**** List of PLAYBACK Hardware Devices ****
card 0: CS4236 [CS4236], device 0: CS4231 [CS4236]
Subdevices: 1/1
Subdevice #0: subdevice #0

Alternatively, you could:

sudo cat /proc/asound/cards
Your response should be someithing like

0 [CS4236         ]: CS4236 – CS4236
CS4236 at 0×530, irq 5, dma 1&0

5.  Now adjust your volume.  There are several ways to do this but I will show you the command line from the terminal.

sudo alsamixer

These are the settings I use on my TP 600E

These are the settings I use on my TP 600E

6.  Now just reboot or try restarting Alsa

sudo /etc/init.d/alsa-utils restart

That should do it!  On Xubuntu, you can play a drum sound by typing this in the terminal:

totem /usr/share/sounds/question.wav

7. I am using a Netgear MA401 wireless card.  To get mine working I had to tell pcmcia not to use IRQ 3:

a.  sudo vi /etc/pcmcia/config.opts

Add the line as exactly as written below:

exclude irq 3

b. The hostap driver locked up TP during install and on boot after install.  Since its just a PCMCIA card I just unplugged it and fixed the problem using a blacklist incantation.  This will allow the orinoco_cs module to load instead.  Edit your file like this:

sudo vi /etc/modprobe.d/blacklist

blacklist hostap
blacklist hostap_cs

c. reboot.

d. manually configure the wireless (I use static IP’s; not DHCP)

sudo iwconfig eth0 mode managed key xxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo ifconfig eth0 essid ”Network_Name”
(substitute your network name here)
sudo ifconfig wlan0 10.0.0.92 netmask 255.255.255.0
sudo route add default gw 10.0.0.1
sudo vi /etc/resolv.conf >> nameserver 10.0.0.15
(substitute whatever IP for your name server)

To make the card load its configuration at boot just:

chmod + /etc/rc.local

and modify /etc/rc.d/local like this:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will “exit 0″ on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#
# The essid name must be in “quotes” like this.  Don’t forget to sudo chmod +x /etc/rc.dlocal

ifconfig eth0 down
ifconfig eth0 10.0.0.10 netmask 255.255.255.0
route add default gw 10.0.0.1
iwconfig eth0 essid “essid_name”
iwconfig eth0 mode managed key xxxxxxxxxxxxxxxxxxxxxxxxx
ifconfig eth0 up

exit 0


Dillo Install problems

December 8th, 2008
I failed in trying to install Dillo using the fltk-2.0.x-r6525 and dillo-2.  Thanks in
advance for any help you might suggest.

Step 1:
Removed old Dillo
  • apt-get remove dillo
Step 2:

Installed the packages "build-essential", "auto-apt", and "checkinstall".
  • apt-get install build-essential auto-apt checkinstall
Step 3:

Set up auto-apt by running the following commands:
Code:
  • auto-apt update
  • auto-apt updatedb
  • auto-apt update-local
Step 4:

Down loaded the fltk2 source tarball.

Step 5:

Extracted the fltk source tarball and go into the fltk-2.0.x-r6525
directory and executed the following commands:

sudo auto-apt run ./configure
sudo make
sudo checkinstall

Step 6:

Down loaded the dillo deb tarball and ran ./configure.
[[The only error message received was for the libssl-dev.  I could not
install this because I could not get the verifcation on the package to
work.  Since this package is optional I doubt this was the problem.]]

Step 7:

I ran make and received an error message.  Here is the output of make check
[[/usr/bin/ld: cannot find -lfltk2_images
collect2: ld returned 1 exit status
make[2]: *** [dillo] Error 1
make[2]: Leaving directory `/home/myusername/dillo-2.0/src'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/myusername/dillo-2.0/src'
make: *** [check-recursive] Error 1

posted to:

dillo-dev@dillo.org


Installing Gnuchess with GCompris

March 4th, 2008

GCompris is a great children’s educational game suite. Unfortunately, when used apt-get to install the chess software referenced by the suite, GCompris could not find it.  The notes on how I got the chess game to install in under Ubunti/Debris linux are below. I later found a simpler solution by just using links (e.g. ln -s /usr/games/gnuchess /usr/games/gnome-gnuchess).

In the following example, I installed the chess game in the correct directory (/usr/games/gnome-gnuchess). To do this, I downloaded the binary package, unzipped it, and configured the software to install according to a set of custom instructions. The below bold face type should provide a recipe when cut and paste into your terminal.

1. Install the packages you need to compile the software.

sudo apt-get install gcc g++ make

2. Download the packge

wget ftp://ftp.gnu.org/pub/gnu/chess/gnuchess-5.07.tar.gz

3. Unzip the package:

tar -xvzf gnuchess-5.07.tar.gz

4. Move into the directory you just created.

cd gnuchess-5.07/

5. Configure the software, including the name of the directory where GCompris can find it and avoiding an instruction that will crash the game.

./configure --prefix=/usr/games/gnome-gnuchess --without-readline

6. Now install the software

make

7. Check your work and make sure that your software installed where GCompris can find it (./usr/games/gnome-gnuchess). Change to the directory like this.

cd /usr/games/

Then list the directories.

ls

7. Restart everything in the windows manager like this:
sudo killall gnome-panel

Launch GCompris and click on the chess game under strategy games.

Potential problems worked around.

Problem one: Your configure might fail and give this error message at the end. If you get the below error message, you forgot to install the g++ package.
configure: error: C compiler cannot create executables
See `config.log' for more details.

Problem two: Your make might fail with an error code something like this. If you get the below error message, you forget to add the “–without-readline” modification suggested above.

input.c:95: error: static declaration of 'input_thread' follows non-static declaration
common.h:719: error: previous declaration of 'input_thread' was here

Problem three:

For some reason, these instructions gave the directory the wrong name the first time I ran them. I fixed the problem by renaming the directory like this.

sudo mv /usr/games/gnuchess /usr/games/gnome-gnuchess



© 2004 Michael A. Worden, All Rights Reserved.
Powered by CMSimple