English blog

20120107: M-. retrieves previous argument in shell

I have just discovered M-. and my shell prompt. It works on bash and zsh. It pastes the last argument of the previous command. If you press it again it will retrieve the second to last and so on. I have found it tremendously useful so I thought I'd share.

20111230: Recovering root password on debian and grub2

Today I forgot my root password, it must be Alzheimer. Anyhow here is the quick recipe to reset it. On the grub boot screen type 'e' for edit. Next edit the line starting with linux, at the end add init=/bin/bash it should look like this.

<pre> linux /boot/vmlinuz-version root=UUID=hex ro quite init=/bin/bash </pre>

Next hit Ctrl-X to boot, you should land on a prompt without having to type your password. Next enter the following two commands:

<pre> mount -o remount,rw / passwd </pre>

Enter the new password twice, type the following:

<pre> sync reboot </pre>

You should be all set!

20111218: RIP Cesaria Evora

Yesterday the singer Cesaria Evora has died. I have enjoyed her music greatly and I will miss her.

20111129: YaCy a peer to peer search engine

Just stumbled on YaCy today. What a great idea! I hope these guys will take on Google for search.

20111105: Is Google Starting To Suck?

Google just updated their RSS Reader. As you can tell from the picture It's completely broken with Firefox 3.6. This browser is barely two years old! No I don't feel like updating my browser.

Clicking on +Ivan bring a new window which is completely unintuitive. I get the feeling that Google doesn't really care about its RSS Reader. I am not impressed with Google+ but that's a whole new post. So is just me or is Google starting to suck?

20111007: Exim Base64 unexpected header error

This error could be that your certificate is badly formatted. However in my case it was due to my private key being password protected. It is easy to fix, the following commands strip the password:

copy server.key server.key.orig
openssl rsa -in server.key.orig -out server.key

20110907: Kimuchi Instant Noodle

I just received a care package from Australia at work today. It was a pack of instant noodle. I was chatting with k-man on #emacs and he sent them over to me. It was many months ago and I completely forgot about it. They were very delicious but a tad too spicy!

20110830: Read Or Die

I love this anime. R.O.D starts with a Japanese author traveling to Hong Kong to promote her book. There she will meet three sisters who have special power with paper. The elder two are addicted to books and youngest hates them. The serie manages the unlikely feat to turn bookworms and a writer into heroes. The only annoyance is "fan service" as my friend Paul would call it. That is big and bouncing boobs.

20110824: Ten minutes of meditation per day

I am trying to do ten minutes of meditation per day. When things get hectic I don't stick to it. However when I do it I feel so much better. Ten minutes is not a long time however it feels like ages when I am meditating.

Since I am a geek I have written a little meditation script for Linux. It asks if you want sound or picture and how long you want to meditate. In that lapse of time a sound will play or the picture will go away.

20110722: Good Bye fetchmail, Hello getmail

Due to a bug in Gnus I need to fetch my e-mail in a mbox file. After looking around the manual of fetchmail I couldn't find a way to do this easily.

Someone on #emacs suggested getmail. I think it's really cool and easy to setup. The installation lacks a quick recipe so here we go. You'll need to create /.getmail/getmailrc with something like:

[retriever]
type = SimplePOP3Retriever
server = smtp.kanis.fr
username = ivan@foo.com
password = mysecretpassword

[destination]
type = Mboxrd
path = ~/tmp/ivan.mbox

[options]
delete = true

You'll need to create an empty mbox file:

touch ~/tmp/ivan.mboxc

You are all set!

20110716: Setting up bzr on OSX with MacPorts

It's harder than it should be. If you do a regular MacPorts install it will crash because it doesn't have the ElemenTree module.

So here's a quick recipe using bzr source code:

sudo port install py26-celementtree py26-elementtree
sudo port install py26-crypto py26-curl py26-distribute
sudo port install py26-paramiko py26-pyrex
sudo port select --set python python26
cd ~/src/bzr-2.4b5
python setup.py install --home ~/local
export PYTHONPATH=/Users/ivan/local/lib/python
export PATH=/Users/ivan/local/bin:$PATH

You should have a bzr that should be more usable than MacPorts. It's still not working for me as it takes 3G of memory, hits the swap and renders my computer useless. By now you probably realize that I think bzr sucks.

20110701: Windows 7 sucks

I have used Windows 7 for the last week and it managed to lose data twice. Furthermore I think the file manager is not improved compared to XP. For example the backspace key doesn't move up anymore but back in history. The difference between focused and inactive windows is so slight I can't tell them apart. All in all I am not impressed.

20110628: About zsh

I have used bash for over ten years. I just got a little curious and decided to study the competitor zsh.

I think it has a killer feature: shared history. The previous commands will be shared between instance of zsh. I find this very handy since I always run several shell with scree. The following lines turn it on:

# History sharing and huge size
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.history
setopt share_history
setopt append_history

I am not sure I will switch to zsh but it's interesting to change things a bit.

20110625: dd is slow and useless

There is well know tool in Linux called dd for disk transfer. For example if I wanted to copy from /dev/sda to /dev/sdb I used to do:

dd if=/dev/sda of=/dev/sdb

There is no need to use dd when a simple cat will do:

cat /dev/sda > /dev/sdb

Beside saving key strokes it copies three times faster!

20110623 The Pomodoro Technique®

Well I have been using the Pomodoro Technique® for a few months now. The idea is to work 25 minutes non stop and take a pause for 5 minutes. I think it's a very good idea for me as my mind gets numb after too much work. It is also a good regimen for time off. I find that 5 minutes is over very quickly when I am lurking in IRC. The hardest bit is to tell my co-workers that I don't want to be interrupted... I highly recommend to all IT workers.

20110520: The dumbest criminal on the planet

This is a long read but it's classic. A 419 scammer getting scammed for a symbolic 3 dollars.

20110514: Machete

A plot? Who needs a plot? Put your brain in a jar and watch Machete.

20110505: Ubuntu bloat

Installing 10.4 took 2Go, now 11.4 takes 4Go. Double the size in a year nice going!

20110504: 10 workplace rights you think you have - but don't

Reading this article makes me glad I work in France.

20110501: The Sigfried Haller time bomb clock

This clocks looks innocent but it apparently has a deadly spring.

"This unusual Anniversary clock has been nicknamed 'The German Time Bomb' because it normally ticks away happily for years, but suddenly and without any warning, its toothless ratchet can slip and the mainspring will unwind noisily. It can destroy itself in the process, and can cause injury to anyone near it at the time. It can shatter its own dome as it explodes."

All the gory details are in this pdf file.

20110408: Org camp april In Paris

I am on my way to Paris for org camp April, looking forward to it!

20110407: The Sentinel

A great game from the 80s : The Sentinel.

20110402: Retro games destroy new york

http://www.youtube.com/watch?v=Y4dH8xZLwvk

20110324: Youn Sun Nah sings Enter Sandman

You Sun Nah is a Korean jazz singer woman who lives in Paris. In this video she sings Enter Sandman by Metallica. It shouldn't work but it sounds great!

http://www.youtube.com/watch?v=dVehcCuwZeA

20110313: Hacked server

My server got hacked in February. I don't know how the intruders got in. I have learned a few things in the process of cleaning things up. First keep Debian updated with the latest stable release. I was running version 4.0 which didn't benefit from security updates anymore.

Next you'll want to install the following packages and configure them so that you get daily e-mails.

rkhunter
chkrootkit
aide
logwatch

The first two are root kit detectors and will alert you if you get infected. The software aide will report all files changed and logwatch sends parts of logs that are interesting.

On top of this you should run the following script every day with cron.

#!/bin/sh

apt-get -y update > /dev/null 2>&1
apt-get -y upgrade > /dev/null 2>&1
debsums 2> /dev/null | grep FAILED
netstat

It will update the security updates from Debian. Debsums showed me that my sshd was compromised so it's a good idea too. Running netstat showed me that people were accessing my server via IRC.

Linux is not as safe as advertised, keep up to date!

20110108: Inkscape better than Illustrator

I am working on postscript files that were generated from Word. I was changing some font in Inkscape but the kerning was all wrong. I thought "I'll try Illustrator, it will do a better job". So I open the file in Ilustrator and the accented characters were gone. I tried again with a PDF file, now the accented characters were upper cased. Postcript and PDF are both Adobe technology, I just can't believe Illustrator importer is crap!

20100825: My codes are perfect

20100824: Roma citizens expelled

"More than 200 Roma have been sent back to Romania and Bulgaria, after their camps were shut down. There are plans to remove hundreds of others by the end of the month (BBC.)" . I am ashamed to be French. I apologize to the Roma. Since they are European citizens I don't think they should have to apply for a work permit.

20100816: Climbing under the rain

We went climbing yesterday and we got rained on. I did my first lead climb in years racing up to the anchor so that we didn't lose gear. I fumbled on the anchor under pouring rain threading the rope through. Fun... not!

20100805: Halo 2600 the end

I just beat the boss. The games start again but much harder as the hero is moving at half the speed. I am not motivated enough to complete it a second time. It shows that fun doesn't equate with high speed 3D effects. A good game can weigh 4k and still be fun.

20100804: Halo 2600

Halo 2600 is a game made by Ed Fries for the Atari 2600. It has a nice retro feel and is fun to play. You will need the Stella emulator to play the ROM.

20100729: Trying out twitterfeed

So Jean Michel told me about twitterfeed, it should turn my RSS feed to Facebook and Twitter. Sounds neat!

20100710: Blublu graffiti art work

Just found out about blublu work and I was most impressed. His work illustrates the anguish of our time. Make sure you watch the Big Bang Big Boom video!

20100407: DoomRL finally complete!

I have finally beaten the Cyberdemon in DoomRL, what a great game!

20100209: Thunderbird 3.0.1 TLS + SMTP broken

What's wrong with the latest version of Thunderbird? It doesn't work with my server that uses STARTTLS. I generated a log file.

Send: EHLO patsy.makina-nantes.net
Response: 250-kanis.fr Hello 179.240.204-77.rev.gaoland.net [77.204.240.179]
Response: 250-SIZE 104857600
Response: 250-PIPELINING
Response: 250-STARTTLS
Response: 250 HELP
Send: QUIT

Well crap it should work. It did work on my father's Thunderbird a year ago . How annoying. So I told my client to use Pegasus Mail which doesn't look as pretty but it works.

20091201: What's wrong with the swiss?

A vote will forbid the construction of mosque. It's so silly, the words fail me...

20091122: Page of fine games

I have just added a page of flash games I like.

20090117: Picture of the new appartment

We have taken pictures of our brand new appartment. We will receive the keys next monday, after one more move I should finally settle.

20080225: My blog is back online

It's 3 AM and I am working tomorrow so I will not write much. RSS feed will soon be available.

20070629: New job

I will be starting work at Bouygues Telecom in Nantes on the 30th of July. This means one more move. I have moved ten times in the last five years. I hope I will find some stability with this new job.

20070605: Dual Screens of Different Size

I finally got dual screen working on my Inspiron 8100. It took me about two hours: I had a working configuration but I needed a hard reboot! I have used Xorg 7.2 on Ubuntu 7.04. Here is the relevant snippet of my xorg.conf:

Section "Device"
        Identifier      "Radeon"
        Driver          "radeon"
        Option          "MergedFB"              "true"
        Option          "CRT2Hsync"             "30-81"
        Option          "CRT2VRefresh"          "56-75"
        Option          "MonitorLayout"         "LVDS, CRT"
        Option          "CRT2Position"          "LeftOf"
        Option          "MergedNonRectangular"  "true"
        Option          "MetaModes"             "1600x1200-1280x1024"
EndSection

Section "Screen"
        Identifier      "Main Screen"
        Device          "Radeon"
        Monitor         "Generic Monitor"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                Modes           "1600x1200" "1280x1024"
                Virtual         2880 1200
        EndSubSection
EndSection

20070511: Cell Phone And Comics Binging

I now have a french cell number +33 6 31 36 93 26.

This is completely unrelated. Being unemployed, I have been comics binging lately. I highly recommend "Mom's Cancer" by Brian Fies. It is a very personal comics and I thought it was very good.

20070502: New Contact Number

Since I moved to France I don't have my UK cell number anymore. I can be contacted on the following french land line number +33 8 77 14 36 72.

20070130: Move To France

The title says it all: I have moved to Limoges in France. You can still join me on my English cell phone number. I will let the card run out and get a French number then.

20070108: TV Output With Radeon

I spent the day trying to get TV output on my laptop, a Dell Inspiron 8100. The graphic chip is an ATI Radeon Mobility 9000 R250 LF.

I installed Xorg version 7.1.1 with the ATI proprietary driver also known as fglrx version 8.28.8. I used the following command to setup xorg.conf:

aticonfig --initial=dual-head --tvf=PAL-B --tvs=VIDEO  --ovon=1 --ovt=Xv

I get TV output in color and it looks nice. I also have video overlay on both screens. Many people claim that it does not work, they must be talking about an older version of the ATI driver.

However when I play a video on the secondary screen a quarter is chopped off at the bottom. This happens even if the video is played inside a window, this makes me think there is a bug in the video overlay. It works fine on the primary screen.

There is also a mosaic of ghost videos on the primary screen. The driver is probably using wrong area of the video memory. The cursor is broken on the secondary display.

Close but no cigar.

This has nothing to do with the above but I was quite impressed that Ubuntu booted on a LVM partition.

20070102: Kanis Ltd.

I am busy setting up my own business. It is called Kanis Ltd., I know it's not very original. I am getting up to speed with accounting, VAT handling, etc...

Anyhow I am open for business and I have finished my first contract. I hope it is a good omen for the year to come.

20061201: Free CD

I received a Pavement super deluxe re-issue of Wowee Zowee. I won it on a BBC 6 Music competition. It was surprising to hear Steve Lamacq utter my name. I love free CD!

20061127: Perfect Dark

I have just finished Perfect Dark on the Nintendo 64. I must say the game is indeed perfect: great music, story, action, etc.... The people who made it can be proud of their achievment.

20061102: Tiny Accented Character With Emacs

This happens with Debian and the fix is trivial:

apt-get install euro-support-x

20061026: I resign from Accelrys

My manager and I have a difference of opinion that could not be resolved. Today was my last day at Accelrys. I have learned a lot about management and have actually discovered that I enjoy it.

I am now busy setting up my company and will do contracting work in Cambridge.

20060928: Smile Update

I should really give an update because I find this amusing.

I did send an e-mail to i_am_frowning@smile.co.uk with a link to this web page. I got nothing back beside the automated reply.

I broke down and called, here is how the conversation went:

(me): "hello"

(Smile) "hi"

"I screwed up with my application and you have sent me a check book, a debit and credit card with a bogus name."

"Oh I see, let me put you on hold. (later) You will need to send us a certified copy of your passport so that we can update your account."

"Wait you are telling me I should go through the hassle of making a certified copy and yet you sent me a credit card without checking my name?"

"Huh, I will put you on hold (much later) Let's close your account and re apply on the web for a new account."

"OK"

I cut up the cards and the check book went down the shredder. It's not fair to criticize without making some suggestions for improvement.

  1. Change your application form like so that it reads:

Forename (first name) Surname (family name)

I know I am a moron and got it mixed up. However your competitor HSBC does it, so should you.

  1. You should fix your secure web e-mail interface. People should be able reply to the message. I would have been able to contact you and mention my mistake. I think it's the least to ask of an Internet bank.

20060821: New Job

I have a new job. I am manager of release engineering at Accelrys.

20060912: Smile, Not!

Smile is an Internet bank in UK. Right now I am not smiling. I have signed up for an account. It was a bit of a pain but I can live with that.

Next I get a tracking number and they e-mail me to check my secure message on their web site. So far so good.

This where the frustration starts. I can't reply to the message on the web site. How annoying!

I have realized I wrote my first and last name in the wrong order. Now they have created my account and I still can't them tell them that the account name is wrong. I don't feel like calling their 0870 number as I have no idea how much it will cost.

This brings up a more chilling issue, did they even check that I exist? What if I entered in a bogus name?

I will quit ranting now. It's not a good start.

20051219: 10 Years Of Linux

I have just noticed that I have been using Linux for 10 years. This was was my first post on the subject. I didn't yet know that Xfree86 wasn't Linux.

From: Ivan Kanis (ivank@wrq.com)
Subject: How do you switch the left and right mouse button in linux ?

View this article only
Newsgroups: comp.os.linux.hardware
Date: 1995/12/29

My mouse is a PS/2 type of mouse. Any idea would be greatly appreciated.

It is ironical that I heard about Linux while I was working at Microsoft. My co-worker Frank told it was cool and I should check it out. He was also know as "leper" in some circle. He sent me a spoof e-mail from god@pearly.gate that baffled me.

Frank hung around with his goth friend Matt. I remember when Matt told me about the web and I was just no getting it. I wonder what Frank and Matt are up to now.

20051123: Secure Mail Server On Debian

This a quick how-to for setting up and encrypted mail server using Exim on Debian. I have seen a bunch of web site dealing with the subject but not a complete guide. OK, enough talk, let's get started!

First install all the needed packages:

apt-get install exim4-daemon-heavy sasl2-bin

Make sure you are using split configuration files with Exim:

dpkg-reconfigure exim4-config

Next generate a self signed certificate, make sure you enter the server name and domain when the program asks for it:

/usr/share/doc/exim4-base/examples/exim-gencert

Edit /etc/exim4/conf.d/main/03_exim4-config_tlsoptions and add MAIN_TLS_ENABLE = 1, it should look like this:

### main/03_exim4-config_tlsoptions
#################################

# TLS/SSL configuration.
# See /usr/share/doc/exim4-base/README.Debian.gz for explanations.
MAIN_TLS_ENABLE = 1

Next enable authentication by commenting out the following section in /etc/exim4/conf.d/auth/30_exim4-config_examples:

plain_saslauthd_server:
    driver = plaintext
    public_name = PLAIN
    server_condition = ${if saslauthd{{$2}{$3}}{1}{0}}
    server_set_id = $2
    server_prompts = :
    .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
        server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
    .endif

Do not worry that is using plain text to authenticate, the password is encrypted over TLS. Let's update the configuration and restart Exim:

update-exim4.conf
/etc/init.d/exim4 restart

Next we need to configure sasl, first edit /etc/default/saslauthd so that the service starts.

# This needs to be uncommented before saslauthd will be run
automatically
START=yes

Next you will need to give Exim the permission to use sasl and start the service:

adduser Debian-exim sasl
/etc/init.d/saslauthd start

It should be working, I use the following python script to check that the server is working:

#!/usr/bin/python

import smtplib

server = smtplib.SMTP('mail.server.name')
server.set_debuglevel(1)
server.ehlo()
server.starttls()
server.ehlo()
server.login("joe", "test")
server.sendmail("fromaddr","toaddr", "Subject: test")

20051103: Stow

I never realised how useful this program is. I have been playing with CVS emacs and various version of mplayer. Stow makes it easy to juggle between different version of the same program.

Put the following in your .bashrc:

function stow
{
command stow --dir=$HOME/local/stow $*
}

function unstow
{
command stow --dir=$HOME/local/stow -D $*
}

Here is how to stow mplayer:

./configure --prefix=$HOME/local/stow/mplayer107
make
make install
stow mplayer107

Note that mplayer is neatly tucked in it's own directory. Stow creates a symlink to mplayer at ~/local/bin/mplayer so you need to only have ~/local/bin in your path.

Say that you compiled an earlier version of mplayer 106, switching from one version to the other is very easy:

unstow mplayer107
stow mplayer106

I hope I have convinced you that using stow is a good idea, installing different software in the same location becomes unmanageable.

20051002: How to Obliterate Files From Subversion

Here's how to obliterate files from the repository. Note that using the subversion remove command will not remove it from your repository. I had to use it as I noticed I put friends' e-mail addresses in by accident.

The following commands move the repository to a backup location, dumps the database in a file. Finally I remove the file .nobunce from the repository. You can specify multiple files to remove.

mv subversion subversion.bak
svnadmin dump subversion.bak > dump
svndumpfilter exclude trunk/ivan/.nobounce < dump > dump.filter

Now I recreate a fresh repository and load the new new dump file minus the offending file. You can delete subversion.bak when you feel confident that your new repository is working.

svnadmin create --fs-type fsfs subversion
svnadmin load subversion < dump.filter

According to the subversion documentation, there will be a command called obliterate that will do the above without the hassle.

20050505: Debian Network Interface Name

It is quite annoying in Linux that the name of a network interface is unpredictable. I added wireless support on my laptop. The wired interface changed from eth0to eth1and caused all sorts of problem.

The package ifrenamesolves the problem nicely.

apt-get install ifrename

Next add the the mac address of each network card in /etc/iftab:

wire mac 00:40:45:24:A0:DC
wifi mac 00:0C:F1:09:2B:27

You'll need to reference you card as wire and wifi in /etc/network/interfaces. Things will break when you change network card, but that's a small price to pay for some sanity in network interface names.

20050429: French April Fish

Thanks to Ian for pointing out where the French custom might come from. Here is what the museum of hoaxes thinks the origin might be:

"The linkage between April Foolery and the Springtime is seen in another story that traces the origin of the custom back to the abundance of fish to be found in French streams and rivers during early April when the young fish had just hatched. These young fish were easy to fool with a hook and lure. Therefore, the French called them 'Poisson d'Avril' or 'April Fish.' Soon it became customary (according to this origin theory) to fool people on April 1, as a way of celebrating the abundance of foolish fish. The French still use the term 'Poisson d'Avril' to describe the unfortunate victims of April Fool's Day pranks. They also observe the custom of giving each other chocolate fish on April 1."

20050426: Picking Your Best Debian Mirror

A quick command that finds the fastest Debian mirror:

apt-spy update
apt-spy -d testing -s GB

The above command finds the quickest mirror located in UK and updates /etc/apt/sources.list accordingly. Look for your country code in /etc/apt-spy.conf.

20050415: Xmms and Unicode

I have noticed that xmms annoyingly doesn't display track name in Unicode. Here's how to fix it:

apt-get install xmms-mpg123-ja

The japanese is misleading as it will handle unicode just fine. You will then need to disable the standard libmpg123 one. That's it!

20050412: My 15 Seconds of Fame

It's official, Jamie Zawinski XscreenSaver version 4.21 includes my bump proof patch:

"Mouse motion only counts as activity if the mouse moved more than 10 pixels (so the screen won't unblank every time you bump your desk.)"

Hey, Jamie, it would have been nice to send me an e-mail back!

20050401: April Fool's Day

I remember in France they told us that the TGV (high speed train) was causing neck injuries to cow. That was a good one.

It is the custom in France to stick paper shaped fish on people's back. I don't think other countries do that. I wonder how it started.

20050217: Emacs Zone Out Mode

Thanks to Lucia for finding this one. Emacs has a mode to prevent you from zoning out. It's works pretty much like a screensaver. Try it out with the following command:

M-x zone

When you had enough turn it off with:

M-x zone-leave-me-alone

20050215: Debian Install Package on Demand

This little known utilities grabs package on demand. Set up the following alias on your shell:

alias auto='auto-apt -y run'

You'll need to have sudo to give you root access without a password. Next time you compile a package from source just do the following:

auto
./configure

All the dependencies will be downloaded automatically. Wonderful! It just make me grin every time I do it.

20050118: Xscreensaver bump proof

I use xscreensaver to blank out my monitor when it's not in use. I got annoyed that my screen would activate for no particular reason.

The following patch will make xscreensaver bump proof. It will prevent the screen from activating when someone bumps your desk or wind blows on your touch pad, etc ...

It works by ignoring small cursor motion. It does the job for my laptop, maybe someone else will find it useful.

20050108: New Year Resolutions

Absolutely no resolutions for this year. I always break them anyway...

20050101: 2005

I have moved four times in 2004. I moved from France to England and experienced plenty of culture shock. I was just getting used to the two-hour French lunch and now I eat at my desk while working...

Till March I looked for work in the french Riviera. I came to the conclusion that there was no work to be found there and moved in with Lucia in Limoges.

In Limoges I started expanding my work search: UK or France minus London and Paris. I found work in Cambridge at Tadpole Computer Ltd.

Lucia and I had a nice holiday in Scotland. I really ought to put up some pictures if I could find the time...

I moved to Cambridge and started work at the end of August. Lucia moved in with me in November. Now she has to learn English.

I am hoping that 2005 will be a steadier year!

20041115: KpHone And Belkin Router 7630

I spent the last few days trying to figure out why kphone wouldn't work with my newly aquired Belkin router. The clue was the following security log:

15.11.2004 19:36:52 **UDP Flood to Host** 192.168.2.3, 32860->>

The problem is that the router thinks that SIP incoming packets are a denial of service attack. You'll need to follow this undocumented link. Next turn off SPI and Anti-DoS firewall protection.

I find it most uncool that Belkin did not document this link. It would have saved me a lot time had they mention it on their manual.

20041112: Alsa Microphone

I find that enabling the microphone with Alsa is very painful. Here is a detailed step by step explanation

You'll need to launch alsamixer from a console.

Use the left arrow key till you get to the Capture channel. Press the space key you should see CAPTUR on top of the bar in red. Next increase the channel volume with the up key.

Make sure that you you have Mic1 selected on the Mic Select channel. Last it can be a good idea to unmute the Mic Boost channel to amplify your microphone input.

Now that was really simple wasn't it? Yeah right...

20041105: US Election Result

In case you are wondering what I think of the election, the Daily Mirror front pages sums it up quite nicely.

Doh! 4 more years of dubya. How can 59,054,087 people be so DUMB
Doh! 4 more years of dubya. How can 59,054,087 people be so DUMB

20041102: Incontinental Slip

This is so funny I feel I have to share. It's a reply I got from my property manager concerning my leaking roof:

"I will assess the situation and speak to the owner and I am sure that we can come to some arrangement for the incontinence that has been caused."

20041030: Intel Pro/Wireless 2100

First you'll need to download the firmware in the /tmp directory.

# cd /usr/lib/hotplug/firmware
# tar xzf /tmp/ipw2100-fw-1.3.tgz

You'll need to locate and dowload the ipw2100-source package. It's currently in the unstable section.

# apt-get install module-assistant wireless-tools
# dpkg -i ipw2100-source_0.56-1_all.deb
# module-assistant prepare
# module-assistant a-i ipw2100

Next you'll need to configure you're wireless access. Put the following stanza in the file /etc/network/interfaces:

iface eth1 inet dhcp
wireless_essid belkin54g
wireless_key 419e0f8585ffbff42e90df4246

Reboot your computer. Start your wireless interface by typing ifup eth1. If everything went fine you should have a wireless connection.

20041029: Alsa Debian Sarge

I found it difficult to get Alsa to work on Debian. The problem was that the OSS modules were loaded at boot time. The fix is to tell the hotplug system to ignore OSS modules.

apt-get install alsa-base alsa-oss
cat /usr/share/doc/alsa-base/alsa-base.discover >> /etc/discover.conf

Reboot your system and check that the OSS modules are not loaded. Run alsamixer to check that Alsa is running.

20041027: John Peel's Death

Just heard it on the radio this morning. John Peel has died. Steve Lamack was replacing him. I was looking forward to hear his Tuesday show and there won't be any more.

I was a late fan, thanks to the internet I have been able to catch his show. He was the only DJ I know that would play reggae after a speed metal tune. I will miss his show very much. Rest in peace, John.

20040911: Politics

This is mostly a geek's journal, it is sometime personal and I am afraid today it's political.

It's the third anniversary of 9/11. Three thousands American died that day.

I would like to point out that nine thousands Iraqis civilians have died on so called "collateral damage". How can we let our government get away with the killing of innocents?

There was no connection between Iraq and the 9/11 attack.

Speaking of innocents, one thousand Americans have died on a war that is waged not against terrorism, but personal interest on Mr. Rumsfied and Mr. Cheney. They will profit from the re-construction of Iraq.

This bear repeating: there was no connection between Iraq and the 9/11 attack.

I am sick and tired of Mr. Bush and Mr. Blair lying and getting away with it. As Abraham Lincoln said: "It is true that you may fool all of the people some of the time; you can even fool some of the people all of the time; but you can't fool all of the people all of the time."

Election is coming up in America: I urge all Americans to show them that we're not duped. Vote Democratic as the world can't put up with another four years of the Bush administration.

I myself, as a British citizen, will do my utmost to get rid of Mr. Blair for waging a war on Iraq when the majority of people in UK were against it.

20040730: Hard Disk Crash

My hard disk crashed; that's not a big deal as I make backups frequently. The problem is I didn't have any rescue disk to get to my backup.

I had to install Windows to get to the Internet, download and burn a Gentoo CD. This is embarrassing when I bragged a while back that I got rid of Windows!

Next my backup was on a firewire device, and it was a headache to get to. I booted the Gentoo CD with gentoo dofirewire. I then typed the following command to get to my external drive.

modprobe sbp2 spb2_serialize_io=1
echo "scsi add-single-device 0 0 0" > /proc/scsi/scsi

My drive needs the spb2_serialize_io set to 1 or it won't work.

I have learned that it's not enough to make backup. I need to make a rescue CD so that I don't waste time recovering my system.

20040720: Script To Convert From Divx To VCD

I mentioned earlier that I had a real tough time converting Divx file to MPG suitable for creating VCD. This is not the case anymore. I have found a script that does it all quite nicely called divx2cvcd.sh. I have fixed the script slightly as it didn't work with PAL movies. The script depends on mplayerand transcode.

I have found it is a waste of time to try converting the video from NTSC to PAL. I ended up with the audio and the video being out of sync. I discovered recently that my DVD player (Pioneer) can do this on the fly. I just had to set the output mode to PAL instead of Auto.

20040716: Windows No More

Well I have finally wiped my Windows partition. I use Windows for two things:

I have tried CrossOver Office Standard and I must say I am hooked and have bought the product. It saves me a lot of time and is a snap to install. I can now use these tools without having to waste time rebooting my computer. I really encourage people to check out the trial version.

Snapshot of CrossOver Office at work
Snapshot of CrossOver Office at work
.

20040715: Head Over Heels Remake

I have found work in Cambridge and have been insanely busy preparing myself to relocate.

Having insomnia and doing some aimless web wandering, I was surprised to see that a team re-wrote "Head over Heels". In my opinion one of the best game on the ZX Spectrum back in the eighties. The remake is very good and runs on Linux.

20040706: Minus One Windows Server

It's been a while since I've updated my log. I was away working in Nice. I migrated Windows NT primary and backup domain controller servers to Linux with Samba on a LDAP back-end. SeptemberBlog September 2004Linux, Debian, tips, 9/11, politics

20040609: JDE

I am getting the following (annoying) error message with JDE. It's a mode to edit Java in emacs.

bsh: Specified BeanShell jar filed does not exist:
/usr/share/emacs21/site-lisp/java/lib/bsh.jar

The following cures the problem:

cd /usr/share/emacs21/site-lisp
mkdir java
cd java
ln -s /usr/share/java lib

It looks like a bug in Debian, I might report it if I find the time.

20040608: Export GIF With Gimp

Can't export gif files with the Gimp? You need to do install the following:

apt-get install gimp1.2-nonfree

This is due to a silly patent by a company I won't care to name on LZW compression.

20040607: LaTeX French Hyphenation

Weird error message with LaTeX:

Package babel Warning: No hyphenation patterns were loaded for
(babel)                the language `French'

The folloing command fixes hyphenation in Latex:

texconfig hyphen latex

20040606: Linux Quote

I love this quote by Neal Stephenson. It's too long to stick at the end of my e-mail, so here it goes:

"We prefer plain dealings and straightforward transactions in America. If you go to Egypt and, say, take a taxi somewhere, you become a part of the taxi driver's life; he refuses to take your money because it would demean your friendship, he follows you around town, and weeps hot tears when you get in some other guy's taxi. You end up meeting his kids at some point and have to devote all sorts of ingenuity to finding some way to compensate him without insulting his honor. It is exhausing. Sometimes you just want a simple Manhattan-style taxi ride. But in order to have an American-style setup, where you can just go out and hail a taxi and be on your way, there must exist a whole hidden apparatus of medallions, inspectors, commissions, and so forth — which is fine as long as taxis are cheap and you can always get one. When the system fails to work in some way, it is mysterious and infuriating and turns otherwise reasonable people into conspiracy theorists. But when the Egyptian system breaks down, it breaks down transparently. You can't get a taxi, but your driver's nephew will show up, on foot, to explain the problem and apologize.

Microsoft and Apple do things the Manhattan way, with vast complexity hidden behind a wall of interface. Linux does things the Egypt way, with vast complexity strewn about all over the landscape."

20040603: ViewCVS Fix

ViewCVS doesn't support the latest version of encode. This results in your source code not being displayed. The fix is quite simple, you'll need to edit viewcvs.py like so:

enscript = popen.pipe_cmds(
    [(os.path.normpath(os.path.join(cfg.options.enscript_path,'enscript')),
           '--color', '--language=html', '--style=msvc', '-E' + lang, '-o',
           '-', '-'),

The style option is optional, the default color scheme is emacs. I just got used to the MSVC colors.

20040603: Installing Java On Debian

These are some note on how to integrate Sun's J2SE SDK with Debian Testing. First read the FAQ. Next are some faster steps, commands are to be typed as root:

apt-get install equivs
cd /tmp
apt-get source java-common
cd java-common-022/dummy
for i in *.control; do equivs-build $i; done
dpkg -i *.deb

The exemple on the FAQ only registers the javacommand. They are many more programs in the SDK such as javadoc, jar, jdb, etc... Use my script to register all Java commands on Debian. You will need to edit the variable jsdkto point to the path of your Java SDK.

20040601: Amanda EOF Error

Another tip with Amanda. If you get the following error when using amrecoveron a tapeless backup:

EOF, check amidxtaped.debug file on server.

You need to add the following line in your amanda.conf:

amrecover_changer = "change"

Next time you run amrecover do the following so that amanda will switch tapes for you:

settape change

20040530: PostScript

I haven't updated my journal for a while; I have been busy learning PostScript for my next project.

20040526: Laptop Withdrawal

5 days without my laptop, amazing! I saw my web page on Windows using Internet Explorer and was appalled that it looked crap and nobody bothered to tell me...

20040515: Removing Dangling Symbolic Links

I want to remove dangling symbolic links and couldn't find a tool to do it quickly. Here is rmbadlink.sh which is a bastard child of cleanlinks. Not much to be said about it; I just erased the line that removes empty directory.

20040514: Java Sucks

Spend the day wrestling with Java's permission. I copied the example verbatim from the Tomcat documentation and I could still not connect to my Postgres SQL database. How annoying!

20040513: Partition Label

Did you know you could add label to ext2or ext3partitions? I didn't know till today. Extract from the man page of tune2fs:

-L volume-label
        Set  the   volume  label  of   the  filesystem.    Ext2
        filesystem labels can be at most 16 characters long; if
        volume-label   is longer  than 16  characters,  tune2fs
        will truncate it and print a warning.  The volume label
        can  be used  by mount(8),  fsck(8),  and /etc/fstab(5)
        (and possibly  others) by specifying LABEL=volume_label
        instead of a block special device name like /dev/hda5.

That's good because when I run cfdisk I won't need to look at /etc/fstabat the same time to figure what partition maps to what. (I tend to have lots of partitions.)

20040512: Tomcat and Netbeans

Good day of work. I can finally debug with Tomcat and Netbeans. The procedure is poorly documented, on Debian you need to modify the file /etc/default/tomcat4like so:

CATALINA_OPTS="-Djava.awt.headless=true \
-Xdebug -Xnoagent -Djava.compiler=NONE \
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"

Restart Tomcat, in Netbeans go the menu and select Start Session then Attach session. Set an obvious breakpoint and you should be all set!

Snapshot of the Netbeans debugging dialog box
Snapshot of the Netbeans debugging dialog box

20040511: Beware Move

My tip for today if you do move files from one partition to another and that you find out you do no have enough space. Do not, I repeat, do not copy the files back to their original destination. Indeed it seems that the mv command will create empty files if the destination is full. If you copy your files back you will clobber your original files with empty ones!

20040510: CD Booklet Again

The typesetting is done but it's an absolute nightmare to make the booklet. My advice so far is to no use cd-cover for a booklet because it won't re arrange the pages as needed. I have a document that's the size of a CD. I need to find a program that re arranges the pages so I can make the booklet. I have tried psnuple, ps2ps and impose+ without much luck.

20040509: CD Booklet

Decided to typeset a lyrics booklet for a CD. Found the cd-cover package at CTAN that does just that. I was sailing along till I tried to print it. The Postscript file that it generates is in letter instead of A4. It wouldn't be a big deal usually but I am trying to print this double sided so it has to be centered just right. I'll think about it later!

20040508: Bad Programmer; No Dougnuts

Vowed to stay away from the computer and did a pretty good job of it :)

20040507: Someone Thinks I Am A Spammer

Things are not getting better today... My domain name has been added to Spamcop. This means that most of my e-mail bounces back to me. Just great! I have talked with my web hosting company and we are trying to resolve the problem ASAP.

And I have to reinstall Windows XP, endless fun :(

Good session with my client, did tricky GRUB manipulation and partition swapping and it all ended well.

I have discovered why gnomemeeting crashed when answering a call. Why the edit field in Mozilla would not work the second time I ran it. It turns out that I had the accessibility feature turned on by Gnome. I don't know if this will impact other user of Debian out there but my advice is to turn it off. I find it quite funny that it completely crippled my environment. But only in hindsight, I have been gnashing my teeth for days on this.

20040506: Bad Day

It was a bad idea to install Gnome 2.6 on my machine: my system is quite unstable.The edit box in Mozilla doesn't work and Gnomemeeting crashes when I receive a call.

Well it is Debian "unstable", isn't it? I have stored my list of packages before doing the Gnome thing so I can revert to how things were.

dpkg --get-selections > before-gnome

I have formatted my Windows partition by accident so I guess I'll have to reinstall it. Some days everything goes wrong and this is the day

20040505: Mule

Xmule 1.8.2b crashes, I filled a bug and I reverted back to 1.8.2.

20040504: Convert Divx To VCD

Converted a Divx movie to VCD using transcode. Bad luck, the movie is still black and white. A/V synchronization is good. I am getting closer.

20040503: Video Edit Tools

Found some interesting tools for video editing. Christian Marillat is kindly maintaining these tools for Debian. Add the following line to your /etc/apt/sources.list:

# Christian Marillat package
deb ftp://ftp.nerim.net/debian-marillat/ testing main

Now you can play with avidemux and transcode:

apt-get update
apt-get install transcode avidemux

20040502: VCD Audio Video Not Synchronized

The next logical step is to turn videos that I have downloaded and transfer them to a CD. So far I had very little luck. It seems that my Pioneer DVD player wants a video with 25 frame per second or I won't get colors. The problem with mucking with fps is that A/V are out of sync! It's been a bad day :(

20040501: Making VCD

Today is VCD fun! So what is VCD? It's something that the Chinese have invented as a substitute to DVD. Why is it so interesting? You can burn your movies on a regular CD-ROM and watch them on your DVD player.

So, let's get the tool:

apt-get install vcdtools

I used an MPEG1 movie of dimension 384x288 with a bitrate of 1152 KBit/sec and an audiostream with a sample rate of 44100 Hz, stereo and a bitrate of 224 KBit/sec. Let's call this file movie.mpg.

Next I create the VCD file with the following command:

mkvcdfs movie.mpg

Next you will need to burn the file with cdrdao. I had a bit of a headache here because the version that comes with Debian testing doesn't yet support the new IDE interface that comes with Linux 2.6. I grabbed and manually installed version 1.1.7-5 in unstable and it works fine.

Now i am blanking my CD-RW:

cdrdao blank --save --driver generic-mmc --device /dev/hdb

Note that adding the --save parameter will save the options in a file called .cdrdao in your home directory. In effect, you don't need to specify the driver and the device on the command line.

Next I burn my movie:

cdrdao write vcd.toc

I pop that CD in my DVD player and the movie looks great. I am pleased!

I if use a movie encoded in NTSC, it plays back in black and white and I am not sure why

20040429: Burning CD With Debian

Quick tip on how to burn CD with Linux kernel 2.6 and Debian testing. Edit the file /etc/default/cdrecord. Add the following two lines:

CDR_DEVICE=cdrw
cdrw=/dev/hdb 8 4m burnfree

Replace /dev/hdb with you CD-ROM device of course! That's all there's is too it. 8is for the speed you want to write, and the 4m is the size of your CD writer buffer. The program cdrecordshould work like a charm.

Well since Gnome 2.6 just got in testing I have downloaded the whole darn thing. I had a quick look at epiphany. The new official Gnome browser. It looks fine, too bad it didn't import my Mozilla's bookmark :(

20040428: Highlighting URL With VM

Why is VM (the best e-mail client IMHO) only highlighting the first dozen URL on my e-mail? A quick look at vm-vars.eland I found the problem. The variable vm-url-search-limitis set to a 12000. Heck 12k is puny. I have put the following in my .vm and everything is groovy again: (setq vm-url-search-limit 100000)

20040427: GnomeMeeting and Robinson Crusoe

This morning, I have typeset "Robinson Crusoe". Why would anyone want to that? I just like typesetting and it's just a proof of concept for a prospective client.

More work this afternoon and having many, many problems with gnomeeting with my customer. It seems that his machine his dropping the connection. He is currently using Mandrake and has decided to move to Debian. Well why not ?

20040426: Voice Over IP

Still playing around with VoiceIP. I am trying to get away from Skype because I like to work on Linux. I have mediocre results with Gnomemeeting and Netmeeting. I had much better luck with Ohphone on windows, so this might be the way to go!

20040425: Dynamic DNS

I have set up dynamic DNS. I thought that DynDNS went out of business for some reason. Anyhow I am glad they are doing well, best of all their service is still free! I have added the following domain since it's nice and short: kanis.ath.cx

Setting it up the client part on Debian was very simple

apt-get install ez-ipupdate

I was prompted with all the information needed, and it just works.

20040424: Sexy C++ Developper

Stumble on the following add at Jobserve:

"Sexy C++ Developer required by market leader near Stoke, North Staffordshire."

I thought it was funny: sexy and C++ don't go together as far as I am concerned!

20040423: Scrambled System

So much happened recently it's hard to keep track. I formatted a partition that contained GRUB's file. The result is I had a system that wouldn't boot. This where I realize I don't have any rescue floppy anywhere. Luckily I had a Gentoo live CD lying around. I used it to create a GRUB boot floppy.

Once I had my system backup I decided that I wanted the GRUB files on a partition that I didn't move around so much. I selected my first partition which is used to boot XP. This is where I did my second mistake. I overwrote the boot sector of XP. Trying to recover XP was impossible.

Oh well, I decided to back up everything up and reinstall XP. I put it on a partition half the size. I also installed it on a FAT32 system so that I have write access from Linux.

Lots of time wasted for a silly mistake.

2004-04-21: Fix Amanda On Mandrake

Setting up Amanda client on Mandrake. A word for the wise: forget about the rpm package! It doesn't have the service that the server expects: amandad.

The quickest way to make it work is to grab the source from the Amanda web page. Compile and install the client part.

./configure --without-server --with-user=backup --with-group=backup
make
make install

Next create and add the following lines in the file /etc/xinet.d/amanda:

service amanda
{
    socket_type = dgram
    protocol = udp
    wait = yes
    user = backup
    server  = /usr/local/libexec/amandad
}

Run amcheck on the server to check that the client is set up properly. You should be set!

20040420: Flash Plugin With Debian

Back from a week-end break in Paris. It's really easy to install the Flash Plugin under Debian.

apt-get install libflashplugin-nonfree

20040416: BBC Radio On Linux

I can listen to the BBC radio again on Linux! It took me a little work but the result is gratifying. Note that the pause, forward and volume controls are now working. I am thrilled :)

Snapshot of the Helix Player plugin on the BBC radio site
Snapshot of the Helix Player plugin on the BBC radio site

I have compiled the Helix Player on Debian this morning and I have taken the following notes.

You will need the Ogg Vorbis development file:

apt-get install libvorbis-dev

The player also depends on the Theora codecs. These files are not packaged in Debian yet. Grab the sources from the web site, unpack them and type the following commands:

./configure --prefix=/usr
make
make install

Once the dependences are taken care of you should be able to build the player. Here is what my build environment looks like :

Build System Menu
-> Current Directory: /home/ivan/src/helix/helix
[0] Set BIF branch (helix-player)
[1] Set Target(s) (player_inst)
[2] Set Profile (/home/ivan/src/helix/build/umakepf/helix-client-all-defines)
[3] run: build -trelease

Next run the build by pressing 3. I have the self extracting installer in the releasedirectory. So I ran the following command:

./hxplay-0.3.0.59-linux-2.2-libc6-gcc32-i586.bin

The installer register the plugin to Mozilla and you should be able to listen to the best radio out there!

20040415: Spam And Radio

My e-mail address shown on my contact page is getting more and more spam. I will change it soon, beware!

I am again annoyed as I can't listen to the BBC anymore. This has worked for years with the venerable Real Player 8 for Linux. It seems that BBC has upgraded their servers and it just won't work anymore.

So I tried the Real Player One alpha without much luck. I couldn't see any Mozilla plugin in their package.

I then signed in to the Helix Communitypage so that I could try the Helix Player MS2. I got some assertion error: that's progress! Well I'll try to build the darn thing and see if I can make it work....

Had a kick to see that my friend Nick is the tech lead for the Unix player. Keep up the good work Nick!

20040414: Spam And Amanda

Kill some e-mail addresses that were getting viruses. I notice that the e-mail address listed in contact is getting viruses as well. I wonder it the address was picked up when I submitted a bug to Debian. Who knows? It's really annoying to get this junk.

More Amanda work for my client this afternoon. Setting up the client on Debian was more painful than expected. A file called /etc/amandahost needs to edited and have the following entry:

your.server.name.com backup

Running amcheck on the server confirms that it can connect to the client. It would have been really easy if the doc had mentioned the file. I might file a bug if I find the time...

20040413: Scanner Woes

I just discovered that my scanner doesn't work with the Linux kernel 2.6.4. It was most unpleasant to find out that scanner.c was gone.

A bit of googling around and it turns out that the file is obsolete.

To setup Sane properly, you need to have the following line in the file epson.conf (that is, if you have an epson scanner):

usb

Make sure you have libusb installed. Next unpleasant surprise only root can access the scanner. The only way I have found to fix this is to run the following quick script when my machine boots up:

#!/usr/bin/sh

# Silly hack so that regular user can access the scanner
chmod 777 -R /proc/bus/usb

I did some Amanda configuration for my client this afternoon.

20040409: Slune

I went this morning to a gaming conferencing on free software. I was most impressed with games developer by a group called Nekeme. They demoed a game called Slune that must be the first 3D game in Python. I was very impressed!

Worked this afternoon on more JSP stuff.

20040408: Mplayer Plugin

I installed the mplayer plugin for Mozilla. I can finally watch Windows Media and Quicktime streaming video on Linux. Awesome work!

20040407: Tomcat And Estonia

Helped my customer set up tomcat to serve his JSP pages on a prototype. I helped him setup PostgreSQL as well. The technology is quite neat as you just need to drop a .war file that includes all your pages and scripts. We had to use Skype on Windows to communicate. I don't like using windows but we had endless disconnect with gnomemeeting.

As a side note I have volunteered to port Skype to Linux but they wanted me to relocate to Estonia... No thanks!

20040405: Gentoo

Playing around with Gentoo. It's a pain to setup but I really like their compiling tool emerge. I am trying to setup software suspend on my laptop with OpenGL support. This apparently works with Xfree86 4.4. To be continued...

20040403: Burning CD On Linux 2.6

Getting things to work in Linux kernel 2.6: I can burn CD again. I removed the ide-scsi emulation option but I forgot to add "Include IDE/ATAPI CDROM support" option back in the kernel. Doh! It took me too long to figure this one out!

I need to set the following variable to sbp2 so that my external firewire drive works: serialize_io=1.

I was surprised that my options set in the directory /etc/modutils would not work anymore. I had to put it in /etc/modprobe.d instead, run update-modules and it worked as usual. It might be a bug in sarge...

back