Voder-Vocoder

The Log of Hal Canary

Navigation: Home | THE LOG | Log Archives | Resume | Contact Info | Public Key | SSL | Math Applets | Feedback Form | Site Map | WP Backend | RSS2 | Atom

Archive for 2007-04

Presentation last night

Here’s the link to the presentation I gave last night. It would have been better had there been more people show up at LUG, but that happens.

Check out the fancy javascript on that page!

Hal Canary | Computers & Code | 2007-04-11 14:25:35 EDT
Permanent Link | Comments Off

(X)Ubuntu on my P3-700 laptop

This is a post I wrote almost a month ago and never posted:

2007-03-11

I went to the Linux Users Group the other night. The local LUG tries to have a presentation at every month’s meeting. This is ambitious goal, so I thought I’d help out. I went home and started putting together a presentation on F/OSS crytography tools.

Then I realized that if I was going to give a presentation in front of the Linux group, I ought to get Linux working on my laptop. This has been a problem since I got this used laptop two years ago, since the CDROM drive refuses to read any CDs I put in it. So I did more research this week and found out that I can bootstrap from inside windows a copy of linux to run a network installer.

I chose to install Ubuntu Linux because it has a reputation for good support for wifi cards. Without WiFi, a notebook is mostly useless to me. I had never installed Ubuntu before. In a sense, I still havn’t: I install XUbuntu instead. XUbuntu is a scaled down version of Ubuntu that is supposed to use less resources by replacing Gnome with Xfce.

$ cat /proc/cpuinfo | head -8
vendor_id       : GenuineIntel
cpu family      : 6
model           : 8
model name      : Pentium III (Coppermine)
stepping        : 10
cpu MHz         : 700.000
cache size      : 256 KB

$ cat /proc/meminfo  | head -1
MemTotal:       385828 kB

This thing has got a 700 MHz Pentium III (Coppermine mobile) processor, which makes the processor design almost seven years old.

Thoughts on this setup:

1) (X)Ubuntu works pretty well. I’m in the proccess of learning all about apt-get; otherwise a lot of my RH/Fedora knowledge translates over to Ubuntu.

2) Xfce is still a little rough round the edges, but it does what I want it to. I miss Gnome’s Rhythmbox and Gedit, but I should learn to make do with less.

3) The wireless drivers work perfectly, BUT the GUI frontend (network-admin) is useless. I ended up writing my own scripts. This one lists all the availible networks.

#!/bin/sh
## ~/bin/scanwifi
## 2007 Hal Canary
## Dedicated to the Public Domain
sudo echo 'Restarting and scanning Wifi...'
echo '>>> ifconfig eth1 down >>>'
sudo ifconfig eth1 down
echo '>>> ifconfig eth1 up >>>'
sudo ifconfig eth1 up
echo '>>> iwconfig eth1 essid any >>>'
sudo iwconfig eth1 essid any
echo '>>> iwconfig eth1 >>>'
sudo ifconfig eth1
echo '>>> iwlist eth1 scanning >>>'
sudo iwlist eth1 scanning
exit 0

This one connects to the selected network:

#!/bin/sh
## ~/bin/connectwifi
## 2007 Hal Canary
## Dedicated to the Public Domain
if [ "$#" -lt 1 ] ; then
	echo "useage:"
	echo "  $0 SSID"
	echo "or:"
	echo "  $0 SSID KEY"
	exit 1
fi
echo '########## iwconfig eth1 essid "'$1'" ########'
sudo iwconfig eth1 essid "$1"
if [ ! -z "$2" ] ; then
	echo '########## iwconfig eth1 key "'$2'" ########'
	sudo iwconfig eth1 key "$2"
fi
echo '########## dhclient eth1 ########'
sudo dhclient eth1
exit 0;

And this one connects to my home network (not my real key):

#!/bin/sh
## ~/bin/connectwifi.MySsid
connectwifi MySsid 0c0dc52de9fbc078f3c1411100

Disconnecting can be accomplished with a

sudo ifconfig eth1 down

or by simply removing the network card.

4) In theory this laptop’s battery has only about an hour’s charge on it, but I think that if I keep disc and CPU useage down to a minimum, it can last longer. I’ve been sitting here outside for almost an hour and it’s at 46%. This is to be expected with a LiIon battery this old. If I get a new battery for this thing, it would cost around $100. We got this whole laptop for less than that.

5) It’s geeting cold out, so I’m going to go home now.

6) Ubuntu disallows the use of the login name ‘hal’, reserving it for the hardware abstraction layer daemon. This makes me sad.

7) Ubuntu has a much more lax default security policy. Iptables is off my default. There is no SELinux.

Hal Canary | Computers & Code | 2007-04-11 14:13:25 EDT
Permanent Link | Comments Off

focus on getting the brand out

Jesus knew viral marketing.

In the Gospel of Mark, the disciple John complains that nondisciples are selling bootlegged copies of Jesus’ miraculous powers. “Teacher, we saw someone casting out demons in your name, and we tried to stop him, because he was not following us.”

Jesus tells John to quit obsessing about the intellectual property and to focus on getting the brand out. “Do not stop him; for no one who does a deed of power in my name will be able soon afterward to speak evil of me.” Jesus adds, “Whoever is not against us is for us.”

–Robert Wright in todays NYTimes (source)

Hal Canary | Theology | 2007-04-07 11:12:23 EDT
Permanent Link | Comments Off

genpasswd

#!/bin/sh
# genpasswd.sh
#   Generate a random password with almost
#   144 bits of randomness, making use of
#   /dev/random.
# Note:
#   Most online services have somewhat
#   arbitrary rules about what characters
#   can be included in a password. So we
#   limit ourselves to A-Za-z0-9.
# Copyright 2007 Hal Canary
# Dedicated to the Public Domain.
echo "Grabbing bits from /dev/random..." 1>&2
head -c 18 /dev/random | base64 | \
        sed 's/\//Z/g;s/+/z/g;'
# If you lack base64 on your system, try:
# head -c 18 /dev/random  | uuenview -b '' | \
#       sed 's/\//Z/g;s/+/z/g;'

Exactly how much entropy do we get?

Each character can be a z or a Z with a probability of 2/64 for each. The other 60 characters have a probability of 1/64 each. Apply the formula:

information entropy = \displaystyle{\sum_{i=1}^np(x_i)\log_2 \left(1/p(x_i)\right)}
= \displaystyle{\sum_{i=1}^{2}\frac{2}{64} \log_2 \left({\frac{64}{2}}\right)} + \displaystyle{\sum_{i=1}^{60}\frac{1}{64} \log_2 \left({\frac{64}{1}}\right)}
= 2 \left({\frac{2}{64}}\right) \log_2 \left({\frac{64}{2}}\right) + 60 \frac{1}{64} \log_2 \left({\frac{64}{1}}\right)
= 2 \left({\frac{2}{64}}\right) \left({5}\right) + 60 \frac{1}{64} \left({6}\right) = \frac{20}{64} + \frac{360}{64} = \frac{380}{64} = 5.9375

Mulitply by 24 for 24 characters, and get 142.5 bits of entropy.

Hal Canary | Computers & Code | 2007-04-05 14:05:04 EDT
Permanent Link | Comments Off

Copyright 1997-2007 by Hal Canary.
mailto: h3 at halcanary dot org
xmpp:halcanary@jabber.org
aim:halwcanary
http://halcanary.org