Monday, April 16, 2007

SBC PC in the kitchen

In the kitchen?

A PC in the kitchen... whatever for? We often get people over who has the need to "use the internet". Then I take them into the study and they use my PC. Afterwards, I find that:
  • some bookmarks was created
  • windows was moved around
  • stuff downloaded onto my desktop of all things!
First solution was to let them use my laptop, but I had the same problems. Then came this solution: put a PC in the front of the house for general usage. Maybe like a very small little internet cafe. But a real PC presented issues of its own, the biggest of which is the noise from fans.

Enter my friend the IB300. We used them on some projects at the office, but have since replaced them with a difference SBC (SingleBoardComputer). I was able to put my eager little hands on one and started playing.

Parts

The parts that I used:
  • 1x IB300
  • 1x 128Mb RAM
  • 1x 128Mb compactflash (used to be in the digital camera, but that was upgrade to 1Gb)
  • 1x 5V powersupply (thanks Tiaan)
  • 1x standard 15" LCD screen (thanks for the donation Tanya! Proving again that you love me more than most...)
  • 1x USB keyboard
  • 1x USB mouse
  • a couple of M3 standoffs and allencap screws
  • some CAT5 for the network connection
  • 1x Linux machine to be the terminal server

Step 1

The Linux server was already up-and-running with FC4, so I just installed the LTSP software (version 4.2). For this I pretty much followed the installation instructions as supplied. The one thing that was a bit hard, is to get your DHCP server to work with you. Mine happen to be Dnsmasq running on a OpenWrt-enabled Linksys WRT54G. Here is the config that I added:
dhcp-vendorclass=pxe,PXEClient
dhcp-vendorclass=eth,Etherboot
dhcp-boot=net:pxe,/lts/2.6.17.3-ltsp-1/pxelinux.0,pion,192.168.22.2
dhcp-boot=net:eth,/lts/vmlinuz-2.6.17.3-ltsp-1,pion,192.168.22.2
dhcp-option=17,192.168.22.2:/opt/ltsp-4.2/i386
dhcp-option=48,192.168.22.2 # font-servers
dhcp-option=49,192.168.22.2 # x-display-manager
dhcp-option=66,pion # tftp-server-name

Here is the config from lts.conf

[Default]
SERVER = 192.168.22.2
XSERVER = auto
X_MOUSE_PROTOCOL = "PS/2"
X_MOUSE_DEVICE = "/dev/psaux"
X_MOUSE_RESOLUTION = 400
X_MOUSE_BUTTONS = 3
USE_XFS = N
SCREEN_01 = startx
SCREEN_02 = shell

[192.168.22.118]
X_MODE_0 = 1024x768
X_MODE_1 = 1024x768
X_VERTREFRESH = 60
SCREEN_01 = startx
SCREEN_02 = shell

Step 2

The IB300 runs of 5V DC. The power supply I could get had strange "uk/euro" (not sure which) plug and I was not able to get a real adapter for it. With some soldering, a couple of short cables and plenty help from the glue gun I ended up with this:
5v plug

Step 3

I needed to get the IB300 to boot from a local device. This is where the compact flash comes in. With Slackware it is very easy to do a bare-as-you-can-get installation. Now I download a zlilo image from magic and add that into the lilo config. In the end I do not use any of the local installed Slackware software except for LILO to do the boot.
note to go and get the LILO config file to show here...

Step 4

At last I can assemble the entire "PC". I use the standoffs to make a little platform on which the IB300 is mounted. This platform is then fixed to the side of the bookcase. You can see some photos of the final result here.


. current status

ib300 mounted

Notes...

  • It takes about 90seconds from poweron to login prompt.
  • The only noise is a single BEEP on startup (and it rarely reboots!)
  • Need to get the sound working under LTSP. This will enable me to also replace the CDplayer in the kitchen by playing mp3's on here.
  • I have a TV-tuner card in the Linux server: how to stream the FM radio here? More toys!
  • Still need to do some cleanup of the cables!

HDD failure hassles

So, I had a little HDD failure on my desktop at home. Not unheard of, at least I was able to scp all my important files off it. Problem I now had, was that all my photos had a creation date of today! This does not play well with my applications like Picasa.

Lucky for my is that Phil Harvey is a smart and generous person: he created exiftool and gave it to the world! This enabled me to write this little script to modify the date of all my image files to the data provided in the standard EXIF data.

for f in $(/usr/bin/find . | egrep -i "\.jpg"); do echo "$f"; SNAP_DATE=`exiftool "$f" | egrep "^Create Date" | awk '{print $4,$5}' | sed 's/ //g;s/://;s/://;s/://;s/:/\./' | awk '{print substr($1, 1, 15)'}`; echo "$SNAP_DATE -> $f"; touch -t $SNAP_DATE "$f"; done
Thanks Phil...

Saturday, January 06, 2007

Animal cruelty- newspapers

On the night of the little incident with one of my cats I also sent an email to the local newspaper. They want to do a little story on it! I am very excited about it, so let's see what happens.

Wednesday, December 20, 2006

Animal Cruelty - follow-up

Just heard back from the vet: the cat is going to be just fine. They opened the wound and cleaned it nicely. He will be coming back this afternoon. I am not sure about his mobility as yet... will just have to wait and see.

That is the good news.

Today my anger has abated a little. What is left a big disappointment in my fellow-man. The person that did this is also breaking the law can be fined up to R2000 or 1 year in prison. I will open a case with the police in order to have this on record if this happens to someone else's animals as well.

I am also thinking of putting up a couple of posters around our area. Maybe this person will see it and come clean? Perhaps my trust in other people might be restored a little after that... but I am not betting money on it!

Animal Cruelty

Animal cruelty images

Yes- that is how my cat came home tonight. Some person used him for target practice... how can this person do such a thing??? What angers me even more is the fact that this was done by a person in my extended neighborhood!

The arrow only entered the skin itself (we think). The vet will open him tomorrow to have a closer look.


To the coward attacker: I hope you sleep well tonight... but tomorrow you really should read this and hope I never find out who you are:
The law protecting this animal

Monday, October 02, 2006

Linux tools is so neat

So, my little internet connection at home is a Telkom ADSL line. It is driven by a Open-WRT enabled Linksys WRT54G routers. For a while now, I wanted to do proper transparent proxy on it. But my proxy server is on a different machine. Then I found this helpfull howto that works just great.

On my linksys firewall I add this to /etc/firewall.user:

#method 2
iptables -t mangle -A PREROUTING -j ACCEPT -p tcp --dport 80 -s 192.168.22.3
iptables -t mangle -A PREROUTING -j MARK --set-mark 3 -p tcp --dport 80
ip rule add fwmark 3 table 2
ip route add default via 192.168.22.3 dev br0 table 2


And I also add this to my proxy machine:
iptables -A PREROUTING -t nat -p tcp -s 192.168.0.0/16 --dport 80 -j REDIRECT --to-port 3128


And that is it...

Sunday, October 01, 2006

web design

I am a very strong believer in open standards. That is why I like the people from W3C so much. I happen to have to do some sort of web development from time-to-time. But having the pure CSS knowledge etc. does not help you to make a site look good... the solution?

Having found a great new site (thanks Graeme) called OpenWebDesign even I can make a website look really good. To this end I update my own little website: privet