Contents
Intro
My CV

Me:
   Me@Home
   Me@Work
   Me@Education

Junk:
   Short Quotes
   Longer Quotes
   Internet Wisdom

About this site

Email me
Mail me
Short Introduction

What is this document? It describes my computer set up. It is not a general tutorial, it won't be useful to you unless you want a similar setup to me and are starting from the same level of knowledge.
Why bother? This is my hobby and I need a place to store the information I adquire (I have the memory of a gold-fish). It should also give hope to others that they can have their own home network and web-server (if I can do it, anyone can!).

Starting point (pre Jan 2003)

When I started this quest I had two computers. A 10 year-old Pentium 166MHz (called bob), and a 1 year-old P4 1400MHz (called cassandra) both running windows 98 fast. Windows 98 is old but it does the job fine, since I discovered Linux at Uni I'd never buy a new copy of windows.

  • Pentium 1, 166MHz (running win98 OK)
  • Pentium 4, 1400MHz + 56k modem (running win98 very fast).

I connected to the Internet through pay-as-you-go dial-up modem, and I transfered files between computers with floppy disks or a serial cable.

First purchase (Jan 2003)

Network Starter kit

As a complete beginner I was interested in setting up a network:

  • I wanted to share files between computers
  • I wanted to play networked games

I walked into PC world and bought a network started kit for £30 ("Belkin-Starter Network Kit - free with Quake III Arena").

Installation: The manual was completely inadequate.
Problem: There was a little cable that was supposed to be attached from the network card to the motherboard. This was fine with the newer computer but there was nowhere to connect it on the older computer. Was it important?
Time for research: The little cable is for Wake-on-LAN, the generic name for the AMD "Magic Packet" technology. WOL is a standard that allows you to turn on a computer from another location over a network connection. The basic idea is that the network adapter has a very-low-power mode to monitor the network for special packet data that will wake up the machine.
Solution:I didn't didn't use the WOL cable on the older computer.

The new hardware showed up in "[Control Panel -> System -> Hardware -> Device Manager -> Network adapters]".

Installation successful! Now for configuration ...

Configuration: I played around with the settings in "[Control panel -> Network]". Windows did offer to "Automatically assign IP address" for me but this didn't work so I decided that if I had to manually assign a IP I'd better research what the hell an IP address actually is?

Explanation of IP

Computers nearly always communicate with each other using TCP/IP (the Internet Protocol), they use IP whether they are communicating over the internet or inside a private home network (LAN). What you have to understand is that when you connect to the internet you use the modem and when you connect to the LAN you use the computers network card (NIC - Network Interface Card):

  • The modems IP address is something assigned to you by your ISP and uniquely identifies your computer so web pages you request while browsing have a destination to return to.
  • Each computers network IP address is something you have control over because although they have to be unique inside the network, they don't have to be unique in the world. why? well, the world won't see the NIC IP address, it'll see the ISP assigned modem IP address. Your network appears to the internet as one machine.

How can windows "Automatically assign IP addresses"
There's software built into windows that handles the IP addresses in a Network for you. This means the IP address is dynamic (may change whenever you start up your PC - like your ISP assigned modem IP address). A static IP address is one that doesn't ever change. Since "Automatically assigning IP addresses" didn't work I had to try using static IP addresses.

How do I know what IP to use?
The Internet Assigned Numbers Authority has reserved the following three blocks of the IP address space for private networks.

RESERVED PRIVATE NETWORK ALLOCATIONS
Network ClassNet-maskNetwork Addresses
A (Big)255.0.0.010.0.0.0 - 10.255.255.255
B (Medium)255.255.0.0172.16.0.0 - 172.31.255.255
C (Small)255.255.255.0192.168.0.0 - 192.168.255.255

"what the hell is a Net-mask anyway"? Read a networking howto such as the "Linux Networking HOWTO". The understanding will enrich your life :) . If you can't be bothered then it is enough to say that a IP address for a computer is composed of a network address and a address unique to the machine in the network (host address). The Net-mask is what determines which part of the IP address is the network address and which part is the host address.

My setup

  1. I set the IP address of one machine to 192.168.0.1 and the other to 192.168.0.2. [Control panel -> Network -> Configuration - > TCP/IP (of network card) -> properties -> IP address]
  2. I set both computers workgroup to the same thing eg "MSHOME". [Control panel -> Network -> Identification - > Workgroup]
  3. I set both computers to have different names. [Control panel -> Network -> Identification - > Computer name]
  4. I turned on file sharing. [Control panel -> Network -> Configuration - > File and Print Sharing ...]
Then, through network neighborhood I could see the other computers files. Horray!

Trouble?
To find out about the computers IP configuration go to a dos prompt and type IPCONFIG or WINIPCFG. To find out whether a particular IP address is reachable in the network use ping ip.ip.ip.ip.

Sharing a internet connection
I then wanted to connect to the internet from both computers, rather than just the one with the modem in. I tried windows "internet connection sharing" but couldn't get that working so my girlfriend installed a "proxy server", which worked a treat but doesn't compare to broadband...

Second purchase (March 2003) - a broadband modem

Rather than having a network of two computers connected directly, one can have a network of any number of computers all plugged into a centeral point called a switch. I bought a little box from eBay that is three things:

  1. A ADSL modem - This is a broadband modem that communicates with my broadband provider to give fast internet access.
  2. A router - This is used to connect different networks together. It is a bridge between my small LAN network and my broadband providers network that will give me access to the internet. My local LAN traffic will stay one side of the router whereas internet traffic will pass through the router. For this, it uses the subnet mask to identify which IP addresses share the same network address and so shouldn't be sent out to another network. Use Traceroute to see the route that IP packets take to get to a domain (tracert www.howstuffworks.com).
  3. A switch - This is used to get IP packets from one machine in the network to another machine in the network, If host A sends a packet to host B then only host B will receive this packet. Packets are not broadcast across all cables connected to the switch and so a switch prevents flooding the whole ethernet, unlike a hub. You can think of a hub as a box which connects all the cables together. Any packet from any host is broadcast across all cables connected to the hub.

One of the great advantages of broadband is that the connection is "always on" making it possible to run a free webserver. You can read "How I setup a free web server" in a separate document, this document continues with the home network side of things.

Having a modem/router in one helps to minimise clutter and seems to be a simple solution to getting more that one computer connected to the web.

This is what my setup looks like:

Configuring broadband internet connection
My ADSL modem/router is a bridge between the LAN and the internet, it therefore has two IP addresses:

  • The "WAN IP" is the ISP assigned modem IP address (the one the internet will know about). Its almost certain that this isn't static, your ISP will change it every couple of weeks.
  • The "LAN IP" is the router IP address from inside the LAN. It defaults to "10.0.0.2".

Typing http://10.0.0.2 into a web browser gets to the complicated modem/routers configuration interface. Here you are connected directly to the modem/router and can change settings and save them to it's memory.

I had to:

  1. Fill in the user-name box (so BT-broadband know I'm a registered user).
    [Configuration->WAN->PPP->UserName]
  2. Change the modems administration password (for security).
    [Passwork Configuration->admin]
  3. Save the new settings to flash memory.
  4. Tell windows to stop using the old dial-up modem when trying to connect to the web.
    [In Control Panel->Internet Options->Connections, remove dial-up and tick "automatically detect settings" in the LAN settings]

Result: Success! Using "Obtain an IP address automatically" in TCP/IP properties of the network adapter. Network and Internet work for both machines. But Failure! Using "Specify an IP address". The network is ok but the internet doesn't work. Nevermind, for the moment I will have to use dynamic IP addresses.

Take a note of the "WAN IP address" in the modem/router configuration page. This is the modems IP address from outside the LAN (the one the internet will know about). So, at work you could type it in and you'd get the same modem/router configuration page as if you typed http://10.0.0.2 from your LAN. Its almost certain that this isn't static, your ISP will change it every couple of weeks.

What do I have to do to get "Specify an IP address" to work? In trying to understand why the internet wasn't working with a static IP address I tried to understand the windows network options.

  1. Network Components - Lists the network clients, adapters, protocols and services that are installed on your computer.
    • Client software enables you to use files and printers shared on other network computers.
    • An adapter is the hardware device that physically connects your computer to the network.
    • A protocol is a the language a computer uses to communicate over a network. Computers must use the same protocol to communicate with each other.
    • Some services enable you to share files and printers with other people on the network. Other services include automatic system backup, remote registry, and network monitor agent.
    This shows the computer to have two adapters and a protocol for each one (old dial-up modem+network card).
  2. Primary Network Logon - This determines when the computer connects to the network. It can connect when you log on or it can use the "Client for Microsoft Networks" service for more connection options.
  3. File and Print Sharing ... - This sets up the "File and Printer sharing" service.

  1. Computer Name - This must be a unique name on the network
  2. Workgroup - This must be common to all the computers on the network.
  3. Computer Description - It doesn't matter what you put here.

TCP/IP properties for the network card

  1. Bindings - what network components will use the TCP/IP protocol over your network card.
  2. Advanced - Additional settings, e.g. "Allow Binding to ATM" (Asynchronous Transfer Mode), flashy network technology that isn't needed.
  3. NetBIOS - The thing that makes your LAN work! Network Basic Input Output System, an API that adds functions for local-area networks. Almost all LANs for PCs are based on the NetBIOS. NetBIOS relies on a message format called Server Message Block (SMB)
  4. DNS Configuration - The Domain Name System (DNS) is a distributed Internet directory service. DNS is used mostly to translate between domain names and IP addresses. Most Internet services rely on DNS to work, and if DNS fails, web sites cannot be located and email delivery stalls. We can disable this because it will be handled by the ISP.
  5. Gateway - A node on a network that serves as an entrance to another network. In enterprises, the gateway is the computer that routes the traffic from a workstation to the outside network that is serving the Web pages. In homes, the gateway is the ISP that connects the user to the internet.
  6. WINS Configuration - Windows Internet Naming Service, a system that determines the IP address associated with a particular network computer. DNS is an alternative system for name resolution suitable for network computers with fixed IP addresses. We don't need WINS as NETBIOS does a good enough job at figuring out names on a simple network.
  7. IP Address - Gives the option to supply an IP address or for windows to sort one out for you.

After playing around a bit I discovered that "Obtain an IP address automatically" works because windows can sense it's connected to the router/modem which is a DCHP server and not only hands-out IP address but provides a gateway to the internet and points to a name-server via the ISP, thereby making surfing possible.
If you want to specify a staic IP address then you need to use the "TCP/IP properties" to fill-in a IP address, fill-in a Gateway as your router (e.g. 10.0.0.2), and fill-in a DNS server as your router (make up a host and domain name, e.g Host:bob Domain:tomfotherby.com).

Adding another computer to the network(May 2003)

My Aunt had a spare computer. Our network switch is now full:

  1. WorkStation 1 (Pentium 4, 1.4 GHz)
  2. WorkStation 2 (New Pentium 3, 733 MHz)
  3. Webserver (Pentium 1, 166 MHz)
  4. A XBox with XBox live for on-line gaming.

KVM Switch(May 2003)

Problem! We don't have enough desk space for 3 monitors however, since the web-server doesn't need accessing very often it doesn't need it's own dedicated monitor.

Solution:

  1. One solution would be to not attach a screen to the web-server and remotely access it from another computer on the network via telnet or ssh. However there is a cooler way ...
  2. I bought a 2-way KVM switch for £50. In theory an excellent piece of kit where you plug one monitor, mouse and keyboard into it and attach a special cable from it into two computers. Then you can switch the mouse, monitor and keyboard between the two computers with the press of a button.

Problem! The KVM switch isn't without problems.

  1. Windows wouldn't recognize the mouse and keyboard unless it's got control of them when it boots up. This problem seems to change randomly to Windows being fine with the keyboard but not recognizing the mouse at startup until it's rebooted. I don't use the KVM switch for the mice anymore.
  2. I have to use a no-frills mouse and keyboard because my wireless one was causing problems when switching back to Linux. The mouse was going mad when it was moved - solved by using the keyboard to run a service called KUDZU (the Linux hardware probe). I guess I need to install the correct driver on Linux.
  3. The monitor goes wobbly and blurry in Windows. This can be solved by trying different screen resolutions untill you find one that works (but it seems to only be weird ones that work).
  4. It beeps loudly when switching. It's annoying!
I couldn't find much help on the net. Belkins do have a KVM troubleshooting place at Belking.com support faqs.

What my setup looks like now:

An upgrade (September 2004)

A new game (Chaos League) came out that I really wanted to play but my windows computer was too slow.

  • Motherboard = 8TX Pentium 4 processor motherboard = GA-8TX. Intel 850 chipset
  • Processor= Intel Pentium 4 1.4GHz.
  • RAM = 2*64MB RAMBUS PC800-45ns non-ECC. Samsung MR16R0824BN1-CKBIN
  • Graphics card = 32MB NVidia GeForce2 MX 200 (64 bit bus) - TV out.

I did a bit of ebaying and bought:

  • RAM = 2 * 256MB PC800-45ns ECC RAMBUS RDRAM. Samsung MR18R1628AF0. (£64)
  • Graphics card = GeForce FX5200 128MB W/TV W/DV1. manufactorer=XFX. Chipset=nVidia. (£35)

My purchases were a disaster:

  • My new 512MB of RAM was ECC and my old 128MB of RAM was non-ECC. It seems that my computer didn't like the two types to be mixed even though there was a bios setting to disable ECC. I think a slight difference in latency was causing a PFN_lIST_CORRUPT error in a blue screen of death. I ran a memory testing program called "Memtest86 - A stand-alone Memory Diagnostic". It didn't report any errors. There was nothing I could do except remove my old RAM and I'll have to sell it on ebay.
  • The Graphics card seemed good but my computer started randomly rebooting. It would happen suddenly with no warning or errors. I made sure I had the latest nVidia drivers but it didn't help. It was a particular problem while playing Sims 2 or any other high spec game. In the end I removed my faulty new card and will have to make do with the old one.
    • I did try turning off the "Auto Reboot on Error" option in Windows to try and crash to a blue screen rather than just reboot. This didn't help. To turn it off, right-click on MY COMPUTER > PROPERTIES > ADVANCED > under START UP AND RECOVERY hit SETTINGS, then under System Failure (middle of the page) Uncheck AUTOMATICALLY REBOOT.

My guide to buying Memory

I found it hard to identify the properties of the memory that I needed. There was some obvious and not some obvious characteristics.

The Obvious:

  • Type: DRAM (Dynamic Random Access memory
    • Sub-type: RDRAM (RAMBUS)
  • Socket Type: RIMM (RAMBUS inline memory module)
  • Number of Pins: 184

The not so obvious:

  • Memory speed: PC800
  • Frequency: 45ns
  • Bandwidth: 32 bit
  • ECC: Error correction code RAM is designed for servers and mainframes. non-ECC is supposted to be faster.
For an easier life, don't mix RAM that differ in any characteristic. I'd even go so far as to say you should use RAM with the same manufacturer and part number! Make sure you install in pairs.

Making Digital Camera work with Linux (April 2005)

I have a Sony DSC-S70 digital camera which always worked easiy in Windows. I wanted to learn how to use it in Linux.

USB setup

  • Install hotplug >> apt-get install hotplug
  • Check my kernel version is good enough for USB >> uname -a
    Linux hantario 2.4.27-1-386 #1 Wed Dec 1 19:43:08 JST 2004 i686 GNU/Linux
    
  • Before plugging in the camera - Monitor the log file >> tail -f /var/log/messages
    • when it is plugged it I get this message:
      Apr  3 21:32:10 hantario kernel: hub.c: new USB device 00:1f.2-2, assigned address 3
      Apr  3 21:32:13 hantario usb.agent[3388]:      usb-storage: loaded successfully
      
  • Make a mount point >> mkdir /mnt/memory_stick/

Usage

  • Mount the camera at the mount point >> mount -t msdos /dev/sdb1 /mnt/memory_stick/
  • cd /mnt/memory_stick/
  • Photos are located at /mnt/memory_stick/dcim/100msdcf/
  • I guess it's really important that the camera is unmounted before it is unplugged! >> umount /mnt/memory_stick

Making Backups with Ubuntu (June 2005)

MySQL database backup

ackerTodo uses a database called "todo". mysqldump is a mysql command to backup data.

  • mysqldump -u root -p todo > todo_backup.sql
  • Then enter the root MYSQL users password.

This backup file can then be read back into MySQL with:

  • mysql database < backup-file.sql

Simple hey!

FileSystem database backup

Use this command to backup a directory tree to a compressed archive

  • sudo tar -czvf today_webSite_2005Aug23.tar.gz /var/www/html/

CD Burning

If using KDE, there's great burning software called K3B - It's everything one could want and it worked straight after installation without any hassles.

  • apt-get update
  • apt-get install k3b
  • apt-get install cdrdao

The first thing I used it for was to burn Knoppix and the second thing was to backup my data.

Windoze Stuff
  1. I always increase my screen refresh rate even if the screen doesn't seem to flicker.
    In Win ME, go to "Display properties"->settings->Advanced->Adaptor->"Refresh Rate". Set it to no less than 80.
  2. I have a virus called "dupator" and tonnes of scumware on my windows computer. I got it from installing Kazaa (never again).
    • AntiVir is a free anti-virus program which can scan your computer and then run a guard to watch for infected files being run. AntiVir doesn't fix the problem and it pops up warnings so often that I had to disable it until I could remove the virus.
    • I downloaded rmdptor.exe to clean dupator from my computer.
    • Adware is a promising free anti-scumware program but it doesn't do a perfect job.
    • If you use SpyBot as well as Adware then your computer does start to feel clean.
  3. If you want to start a dos prompt in a particular directory, put something like this in a bat file:
    • c:\WINNT\system32\cmd.exe /k "h:&&cd H:\TaskDiary\WebTools"
  4. If you want a summary of your computer hardware and software specifications, then type "dxdiag" into Start->Run. It is a direct X diagnostic tool which gathers a good amount of system information for you.
  5. IPX network problem: If you are trying to link two computers together to play network games against each other there is a Windows network testing tool called "net diag". I wanted to get "Tiberian Sun" networked and used "net diag" from the DOS prompt in order to test that the IPX network protocol was working.

Gimp
Adding Transparency to Images (method 1)
  1. Remembering that jpegs don't handle transparency, open up an image.
  2. Right click on the image and select "Color to Alpha" (Filters->Colors->Color to Alpha), a box will appear.
  3. Now get the pipet and select the colour on the image that you want to turn transparent.
  4. On the "Color to Alpha" box, right click the colour and select "Use Foreground Color", and hit OK.
  5. Save your new image.
Adding Transparency to Images (method 2)
  1. Remembering that jpegs don't handle transparency, open up an image.
  2. Right click on the image and select Layers->"Add Alpha Channel".
  3. Now get the eraser and where you erase should be transparent.
  4. Save your new image.

Emacs

I have a good windows .emacs file orientated towards using perl.

  • auto-fill-mode toggles line wrapping for the buffer.

Mozilla

I was having problems because Mozilla wouldn't access local files:

  1. Type "about:config" into the address bar
  2. right click "security.checkloaduri" and set value to false

I usually middle-click a tab to close it. This works in Windows but needs configuring in Linux (because by-default middle-click means paste):

  1. Type "about:config" into the address bar
  2. Right-click "middlemouse.contentLoadURL" and set value to false.

Perl

  • When I upgraded to activestate perl 6.8 in windows XP, the GD module stopped working. I use it for my online photo album. I did a search on google: "GD windows activestate", "GD no longer works", "GD installation problems", etc etc. This is the answer:
    1. In DOS type PPM to go to the perl package manager.
    2. Get GD by typeing install http://theoryx5.uwinnipeg.ca/ppms/GD.ppd
    3. That should be done. (simple if you know how, a weekend breaker if you don't).
  • To install GD in debian. Just type: apt-get install libgd-perl

A regexp that'll extract the function names from a C program contained in $file_text:

  • while ($file_text =~ /\w+?\s+(\w+?)\s*\([^();]*?\)[\n\s]*\{/sg ) print " \"$1\"\n";
    • the s flag makes "." match "\n" as well.
    • \w+? - the function return type
    • \s+ - one or more spaces
    • (\w+?) - the function name
    • \s* - possible spaces
    • \([^();]*?\) - arguments in brackets which do not include "(", ")" or ";" but can be anything else, including newlines
    • [\n\s]* - possible spaces or newlines
    • \{ - "{" the start of the function.

Bugs: finds "if" statments as well.

Ubuntu Breezy Badger (Nov05)

Out of the box, Breezy doesn't play most of my DVD's (xine complained of encrypted content). I had to install libdvdcss2 but it isn't in the apt-get reposotories, instead Ubuntu have put a script in /usr/share/doc/libdvdread3/examples called "install-css.sh" which will do the business. I also had to reboot before xine worked.

Ok so DVD's were playing choppy and it turns out the Breezy wasn't turning on DMA for my DVD drive. You can check using this command:

hdparm /dev/dvdrw
You can turn on DMA using this command:
hdparm -d1 /dev/dvdrw
You can turn on DMA at each boot by putting this in the "/etc/hdparm.conf" file:
command_line {
       hdparm -d1 /dev/dvdrw
}

Out of the box, Breezy did detect my hauppauge nova-t dvb tv card and I could watch digital tv (freeview) using the dvb tab in xine but I didn't get any sound (no audio) so I needed to install some sound codecs. I installed the following and dvb started working after a reboot:

sudo apt-get install gstreamer0.8-plugins
sudo apt-get install gstreamer0.8-ffmpeg
sudo apt-get install sox
sudo apt-get install ffmpeg
sudo apt-get install vorbis-tools