Welcome to the computer help page. Through various experiences of my own, I have had to solve a few problems. A lot of these were solved with the help of other people's web pages that detailed a similar process. Others were just figured out on my own. You can take these with a grain of salt as some problems arise from a particular configuration rather than something general enough to apply to all people. Anyway, you will find quite a few tips for Linux here as well as some Windows tips and hardware recommendations for performance and support overall (but also in Linux). For other troubleshooting tips, check out Trish's Hardware Hell.
- How to Write OpenGL Programs in Linux
- How to use Borland C++ 5.02 and GLUT to write OpenGL Programs in Windows
A lot of this information is rather dated. I originally posted it here after reconfiguring my system in 1999. As such, things may not apply anymore. However, these items may still provide a reference for some individuals. I will remove them if they are no longer valid, or update them if I happen to go through the process again.
I am currently running Red Hat Linux 7.2, with kernel 2.4.19. Visit www.redhat.com for information on obtaining this distribution.
There are several sites you can visit in order to find help, but the source of
biggest help you will find you already have. The files located in your
/usr/doc/HOWTO directory will provide a great resource. If you chose
not to install the documentation during installation, it is available at
- Configure a Linux System to Share a Windows 98 SE Internet Connection
- Installing Mesa and GLUT on your System
- Using the new Microsoft Intellimouse with
Intellieye and USB support
- Using an internal ATAPI Zip drive
- Downloading and Unpacking a New Kernel
- Recompiling the Kernel
Most programs have changed their distributions to include better readme files. Most of the time they will do a good job telling you what you must do to use their program. The basic drill is the following:
- The volume control disappears from the system tray
- Icons randomly change to other icons
- What happened to my status bar in Internet Explorer?
- How to backup or restore Outlook Express Email and settings
- What is that tilde (~) file that appears on the Desktop?
With a bunch of new technology coming out daily, it is important to know what to buy and what not to buy. I have provided my opinions to aid you in purchases that I have made and have worked well.
Network Equipment: 3Com or Linksys. Cisco has recently acquired Linksys, so their products are certainly high quality. I've also had a 3Com network card in my computer for over 5 years without any problems. I buy exclusively Linksys home networking equipment.
On a general note of networking, if you are using RJ-45 cabling and making your own cables, make sure to wire properly. For regular wires (when the transmit and receive pins are in their regular places), pins 1 and 2 must be a twisted pair and pins 3 and 6 must be a twisted pair. The remaining wires are unused and can be placed in the remaining slots. If the pairs of pins previously mentioned do not come from a twisted pair, you may or may not get anything to work. If it does, it's likely to only work about 10 Mbps and other, properly wired clients on your network won't recognize that computer very well, if at all. Check out a graphic of proper pin wiring, provided by Linksys.
Hard Drives: Hitachi. Avoid: Maxtor.
Hitachi and IBM are now the same when it comes to hard drives. Hitachi has taken over for IBM, so their drives are now the best. I have owned two Maxtor drives in my life and they have both crashed.
Mice: The only real mouse is the optical Microsoft Intellimouse. Don't concern yourself with the Logitech mice. They are a good emulation of the Microsoft mouse, but you want to have the real thing.
Processors: Intel is the king of CPU's. Don't listen to the marketing propaganda put out by Apple and AMD about how clock speed doesn't matter. They are only bringing up the matter because they can't compete with Intel.
Printers: Hewlett Packard printers are high quality. They do break down like everything else, but you get a lot of use out of them before they do. Plus, they don't take hours to print high quality like Lexmark printers do.
Writing OpenGL code is difficult enough until you get the hang of it. Compiling your code is even more complicated. All the libraries must be specified since they are not loaded by default. I have made a makefile that I change bits and pieces of for my OpenGL programs. This is a simple makefile that you can use to write small, single-file programs, but will need a bit of work if you are going to have multiple targets in the file or if you compile many separate files into objects before making the executable. If you don't know about makefiles, I will try to explain this so that you can still use this file for your OpenGL programs. However, you really should learn about them. For more information, read The Makefile Manual.
Basically all you need to put in your source code is the following line with the rest of the #include's
This automatically includes gl.h and glu.h so you don't need to do that. If you don't use GLUT, this makefile and the following instructions probably won't be much use to you... but then again, you should know what you're doing if you don't use GLUT.
View/Download the makefile. Put it in the directory with your source code. If you followed the instructions for Installing Mesa and GLUT on your System, then you shouldn't have to change the GLLIB or GLULIB variables. If you installed Mesa and GLUT at a different time, then edit these variables to whatever your libraries are named. If you are running a Red Hat Linux installation, you probably won't have to modify the XLIB variable either.
Simply change the EXECUTABLE variable to hold the name of your program. Then change the rule to reflect your program's name (i.e. change the line "pyramid: pyramid.cxx" to reflect the name of your application and its associated source code). When you no longer need debugging information, edit the CFLAGS variable and remove the -gstabs option. If you do not have a Pentium system, also remove the -O3 option. If this option works for you but you need a smaller code size, try -O2 instead. For more information read the g++ man page. When you are finished, save your changes. Simply type make in your directory and your program will be built.
One benefit from using GLUT is that your programs are almost instantly portable to other operating systems that have GLUT ported to them. Microsoft Windows is one example. For information on developing (and recompiling) OpenGL applications for Windows with Borland C++, go here.
Two books that I would highly recommend for OpenGL programmers are the red book and the green book (for those in the know). The red book is "OpenGL 1.4 Programming Guide, Fourth Edition" by the OpenGL Architecture Review Board et al (2003). It is operating system independent and teaches the basics of OpenGL programming. The green book is "OpenGL Programming for the X Window System" by Mark Kilgard (1996). It details programming for X in Linux and introduces GLUT. For a quick reference, the blue book is "OpenGL 1.2 Reference Manual, Third Edition" by Dave Shreiner et al (1999). This books lists all of the OpenGL commands, what they do, and the parameters they take. Look for the Fourth Edition of the printed book in March 2004. Material from the first edition of this book is online here. I find it just as easy to reference this web site. However, for the newer and more advanced commands, you will need to buy the book. The second edition of the red book is also available online here.
I realized there are a ton of documents describing how to set up a Linux box to be physically connected to the Internet and share this connection to other computers in a home. This is, perhaps, the best way to go for a permanent setup. However, if you're like me, my computer goes with me to school and I'd only like to access the Internet for a short while when I'm home. Thus, I'd just like to plug in my computer into the existing network and have it work. I did not find any documents on how to do this. So, I will detail it here. First, there are two very important prerequisites. The first is a working, Internet-sharing network in your home where you wish to connect your machine. The second is that your Linux machine be fully set up to handle an ethernet configuration defined by DHCP (probably not the best wording). My setup is as follows:
- At Home:
- Two computers running Windows 98 Second Edition
- Both with 10 MB/s ethernet cards installed
- One computer also has a modem which is used to access the ISP and also uses the Internet Connection Sharing utility.
- At School:
- One computer dual-booting Windows 98 Second Edition and Red Hat Linux 6.0
- A 3Com 3C905B-TX 100 MB/s ethernet card installed and configured to use the school's ethernet Internet access.
Provided you have a setup like this where the two components work separate of each other, here is how I integrated them.
- Switch to the root user with
- Run the network configuration (
- On the names tab,
Hostname: Whatever you want to call your machine (optional to change)
Domain: 192.168.0.1 (Not sure what this does, probably required)
Search for hostnames in additional domain: (blank)
Nameservers: 192.168.0.1 (Required)
- Leave the hosts tab alone; it will be used automatically with DHCP.
- On the interfaces tab, edit the eth0 device.
- Pick an IP that is not used on the network and specify it (192.168.0.105 for example). The netmask should fill in automatically along with the network and broadcast address. Now, erase your IP as it will be dynamically configured.
- Click Done.
- On the routing tab, click Network Packet Forwarding (IPv4).
Default Gateway: 192.168.0.1
This way, the kernel will route all outgoing connections to this address rather than trying to establish a direct connection with the site. If you have more than one ethernet card, it is important to put the device you are using to access the home network in Default Gateway Device. (If you have only one ethernet card, you can put
eth0in there if you wish).
- Click Save and then Quit.
You should be all set up now. If it doesn't work immediately, try deactivating and reactivating the eth0 device. If that doesn't work, reboot.
If you're not lucky enough to have a professional OpenGL implementation on your system, install Mesa which works just like an OpenGL implementation. If you haven't already, go to www.mesa3d.org and download the Mesa package. Get the Unix gzip'd tar files (both the source and the demos). If you aren't going to be writing any OpenGL programs, then you probably don't need the demos if you don't wish to get them.
Now, go to http://www.opengl.org/developers/documentation/glut/ and download GLUT 3.7. Get both the source and the image datafile distribution. If you aren't going to be writing any OpenGL programs, then the image datafile distribution probably isn't necessary.
Evidently there is a new way to install Mesa as of this writing. It
uses the traditional
commands. I have not installed Mesa this way yet and do not know about it.
The commands listed below are for installing it the "old" way.
- Unpack the Mesa source and demos.
tar xzvf MesaLib-3.1.tar.gz
tar xzvf MesaDemos-3.1.tar.gz
- Change to the directory just created and delete the
rm -r glut
- From this current directory, unpack the GLUT source and demos.
tar xzvf ../glut-3.7.tar.gz
tar xzvf ../glut_data-3.7.tar.gz
- First install Mesa. Type
maketo see a list of supported configurations. Assuming you are running Linux without a 3DFX card (like me), have support for elf (or shared) libraries (you probably do if you are running Red Hat 6.0), and have an Intel chip, then you probably want to run
- Become root (
cp -r include/GL /usr/local/include
cp -d lib/* /usr/local/lib
- It seems to be important that you NOT put the lib OpenGL files in a
separate GL subdirectory. Now, make a few symbolic links:
ln -s libMesaGL.so libGL.so
ln -s libMesaGLU.so libGLU.so
- Mesa should now be installed. Change to the
glutsubdirectory under the directory where Mesa was unpacked. This directory is referred to as
$GLUT_HOMEin the readme files and such.
- There are a few modifications necessary in order to build GLUT on a
Linux system. They are detailed in the
linuxsubdirectory. First thing, copy the new configuration file:
cp linux/Glut.cf .
$GLUT_HOME, build the makefiles:
- Copy the Linux modified makefile to build the library.
cp ../../linux/Makefile .
- Build the library.
- Make a few symbolic links:
ln -s libglut.so.3.7 libglut.so.3
ln -s libglut.so.3.7 libglut.so
- Copy these files to
/usr/local/libso other programs can see them in a more standard place.
cp -d libglut.so.3.7 libglut.so.3 \
libglut.so.3.7 libglut.so /usr/local/lib
- Build the rest of GLUT:
- Add the new directories to the shared library configuration file.
/etc/ld.so.confand add the line
- Update the library database to recognize the new libraries.
- To build the rest of the demos, go to
Now programs will most likely be able to see your OpenGL files. For information about writing OpenGL programs, go here.
After you do this, run one of the configuration utilities (make menuconfig). Since this involves configuring a developmental kernel, the options have already changed as of kernel 2.3.39. These instructions work well with kernel 2.3.35. See the web site below for the latest instructions on the developmental kernels.
- Under Support for USB, select Support for USB.
- Select UHCI (intel PIIX4 and others) support, OHCI (Compaq and some others) support, or OHCI-HCD (other OHCI opt. Virt. Root Hub) support depending on what motherboard you have.
- Also select USB mouse support.
- I did not configure these as modules, but as integrated into the kernel. Configure the rest of the kernel as you had before. Save, exit, recompile, and add the new image to LILO.
- Reboot with the new kernel. Before starting X, you need to add a
device to interface with the mouse. Perform a su and change to the
mknod /dev/usbmouse0 c 180 16
/dev/mousefile is a symbolic link to the actual mouse device and all system programs look at
/dev/mouseinstead of the actual device. This way, by changing
/dev/mouseto point to
psaux(the PS/2 mouse port), all applications will immediately be updated. Perform the following command in your
ln -sf usbmouse0 mouse
- In my XF86Config file, I previously used a PS/2 Intellimouse so
nothing needed to be changed. If you used something else
previously, replace your Pointer section with the following:
Section "Pointer" Protocol "IMPS/2" Device "/dev/mouse" ZAxisMapping 4 5 EndSection
- I had to change one last thing to get the mouse to work in a console
/etc/rc.d/init.d/gpm. On the line where the gpm daemon is actually started (you'll see something like
daemon gpm -t $MOUSETYPE), change it to read
daemon gpm -m /dev/mouse -t $MOUSETYPEso that the device is specified.
- If this doesn't work, make sure that your
/etc/sysconfig/mousefile is properly configured for an Intellimouse. My file reads as follows:
FULLNAME="Microsoft IntelliMouse (PS/2)"
I've noticed that it doesn't work so well in the console, but works flawlessly in X. Gnome is configured to support the wheel (and the ZAxisMapping line helps a few other programs to use the wheel), but not all applications can yet use the wheel effectively. Anyway, at least it is as functional as a normal Intellimouse again. For information on other devices, visit www.linux-usb.org.
Although I don't use this program, I've heard that imwheel will allow other programs to use the functionality of the wheel. Go to www.freshmeat.net and search for imwheel. However, if the idea of running a separate daemon simply for the wheel on your mouse bothers you or you only need the wheel in one application, visit the X mouse wheel scroll page for a collection of hacks in various programs to get the wheel working.
I recently purchased a Zip drive and would like it to work under Linux with everything else. First, you need to know how your Zip drive is configured (that is, primary slave, secondary master, etc.) One way to do this is to type
dmesg | less
This will give you a text version of all the configuration your computer did at boot-up. Look for the line similar to the following
hdd: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
It might also begin with
hdc depending on your configuration. After you have determined
the device it is represented as in Linux, the next step is to mount the
drive so you can access it. This also means you need to have kernel support
for ATAPI floppies. I had to change my kernel to include "ATAPI floppy
support" and recompile it. If you
do not have this included in your kernel, you will get the message
mount: hdd is not a valid block device or something similar.
After this, it was a simple formality to get the drive working. A Zip disk
formatted for Windows uses partition 4. This is for compatibility reasons
with Macs. Thus, if you are mounting a Windows disk, the device will be
hdd4 (or whatever third letter your drive is configured as).
To mount the disk, you must first create a location to mount it. Type
mount -t vfat /dev/hdd4 /mnt/zip
replacing the directory in the first and second commands
with whatever you wish. Note that the ext2 partition on a Linux-formatted
Zip disk is partition 1, meaning your device will be
To simplify mounting the drive, add the following line to your
/dev/hdd4 /mnt/zip vfat noauto,user 0 0
This allows any user to mount and unmount the drive with the simpler commands
If you require only root to be able to mount drives,
remove ",user" from the above line in
/etc/fstab. For more
information relating to the Zip drive, view the
Zip Drive Mini-HowTo.
To download a new kernel source, go to
and choose the location nearest you in order to download the kernel. The
source is in the
pub/kernel subdirectory after connecting to a
mirror site. Stable kernel releases have even numbers as their major
revisions (2.0.x, 2.2.x) and developmental kernel releases have odd numbers
as their major revisions (2.1.x, 2.3.x). After downloading, move the file
/usr/src directory (you will need to be root). The
linux subdirectory should be a symbolic link to another
directory (such as
linux-2.2.5 or something). Type
ls -l to see a longer directory listing and to determine if
linux directory is a link (It will point (
to something if it is). If it is NOT, type the following
mv linux linux-2.2.5-15
replacing the final argument with the version of the
kernel you are currently using (type
uname -r if you are
unsure). Realistically, though, if you needed to do these last few
instructions you either a) already know enough to recompile your kernel or
b) probably shouldn't be recompiling your kernel.
Now, create a new folder with the name of your new kernel version. For
example, if you just downloaded version 2.3.35, make a directory called
linux-2.3.35. Make the
linux directory point to
this new folder:
ln -sf linux-2.3.35 linux
Then extract your new kernel source:
tar xzvf linux-2.3.35.tar.gz
Now your new kernel source is in
You can change the kernel options in several ways. You must be root in
/usr/src/linux directory to start with. Then type
make config (not recommended),
make menuconfig (my preference, best in a console
window). After making changes to your system, you now need to recompile.
For more information, read the
Linux Kernel HOWTO.
- Hopefully, you extracted the new kernel properly. If not, read Downloading and Unpacking a New Kernel.
- Two commands that aren't always necessary but are proper form for
recompiling the kernel are
make dep ; make cleanRunning these commands makes sure that all of the file dependencies (such as include files) are in place, and any object files or other things an old version leaves behind are removed. However, if you choose not to run them, any dependencies will be made automatically, anyway.
- Create the new boot image
make bzImageYou may be told to use another option. Use
make bzImageif it works as it results in a smaller kernel.
- After this is done (it may take a long time depending on your
processor's speed: e.g. 10 minutes on a P2 400), copy the system map
and the new kernel to the boot directory.
cp system.map /boot/system.map-2.3.35
cp arch/i386/boot/bzImage /boot/vmlinuz-2.3.35Replace the last argument of the system map and the kernel with the name of your kernel version.
/etc/lilo.confand add the following lines so that you can select your new kernel image next time you boot.
image=/boot/vmlinuz-2.3.35 label=newlinux root=/dev/hdb1 read-onlyChange the
image=line to represent the actual name of your kernel image. Change the
label=line to whatever you wish to type at the
LILO:prompt to boot this image.
- Rerun lilo to update your boot data.
- Change the system.map to point to your new system map. (If this
doesn't work, type
ln -sf system.map-2.3.35 system.mapChange the name of the first file to match that of your kernel version.
- Reboot using your new kernel. If you wish to check to make sure you
are using the new version, type