Friday, 24 April 2009

Why does cygwin pick up 'f' as my home drive?

I installed cygwin on my new work laptop. For some reason when ever I ran cygwin it said:
mkdir: cannot create directory `/cygdrive/f': No such file or directory
Copying skeleton files.
These files are for the user to personalise
their cygwin experience.

These will never be overwritten.

/usr/bin/install: cannot create directory /cygdrive/f: No such file or directory

/usr/bin/install: cannot create directory /cygdrive/f: No such file or directory

/usr/bin/install: cannot create directory /cygdrive/f: No such file or directory

bash: cd: /cygdrive/f: No such file or directory
Your group name is currently "mkgroup_l_d". This indicates that not
all domain users and groups are listed in the /etc/passwd and
/etc/group files.
See the man pages for mkpasswd and mkgroup then, for example, run
mkpasswd -l -d > /etc/passwd
mkgroup  -l -d > /etc/group

This message is only displayed once (unless you recreate /etc/group)
and can be safely ignored.
cp: cannot create regular file `/cygdrive/f/group.mkgroup_l_d': No such file or
directory
So, I must have got something set up incorrectly. Looking at the environment variables I see:
$ set
...lots of stuff
HOME=/cygdrive/f
...more stuff
So where is HOME set? The work laptop is running Vista and I'm farily new to it. Looked in Control Panel >> System >> Advanced System Settings >> Environment Variables, but there was no reference to HOME. Next stop was Google, obviously. It told me to edit /etc/passwd. Sure enough there was a setting against my username for /cygdrive/f. I changed it to /cygdrive/c/dave and it all worked great.

Saturday, 28 March 2009

Video Editting Software

We were going to visit the National Media Museum, but due to son #2 getting a stomach bug on Saturday night that wasn't to be. Instead we made a video diary of the weekend. My camera records quicktime (.mov) files. I had about twenty of these to splice together by the end of the weekend. I didn't have a video editing program to use. A little wikipedia led me to avidemux. This seemed lightweight and just right for what I needed. To get a rough cut done to show the wife I just appended the files together. This worked fine, but after about three minutes the sound was a long way out of sync with the video. A quick scan of the avidemux wiki suggested I do Audio->Build VBR Time Map. I tried that but it didn't seem to do anything. Clicking somewhat at random, I don't know much about video, I tired Tools->Rebuild I & B Frames. That didn't help. I'm parking this one for now. See if inspiration strikes while doing the tidying up.

Sunday, 15 March 2009

Debian NSLU2 Stopped Working

My slug, NSLU2, stopped working. The power went off and it didn't come back on after booting. It just sat there with the ready light on yellow and the ethernet on green, but not showing anything on the disk 1 light. I couldn't ssh to it or ping it. Google led me to the NSLU2-linux-debian-readme page. This led me to suspect something wrong during booting. I turned off the slug and attached the USB drive to my debian PC. In the procees the entire USB hub stopped working. If I took the USB hard drive out the USB hub started working again. So I rebooted into windows, put the USB drive in and got an instant blue screen of death. Not good. Last attempt I plugged the LaCie USB drive into my laptop. The laptop didn't die, but windows said "Please insert disk" when I tried to browse to it. I'm thinking it is dead. Looks like I need to be buying a new USB hard drive and re-installing debian on the slug. If anyone has a better idea please leave a comment!

Wednesday, 1 October 2008

Using my Slug as a Mercurial Repos

I've bought a slug inspired by the now defunct Linux Reality podcast. It had been hanging around for a while but now I've found something worthwhile to use it for. I've been using Mercurial for distributed version control and the slug makes a great central repos. I've got Debian etch running on the slug and mercurial was a simple apt-get away (actually I use aptitude to manage the packages). With mercurial installed and a little setting up of ssh keys I'm good to go. I simply have a single mercurial user on the slug and make sure for any files that I edit I first pull from the mercurial user and when done push back. I can now edit the same files from work, various computers at home and at the inlaws and keep the whole thing under control. Now, if only I could get a symbian S60 version of mercurial going...

Wednesday, 14 May 2008

Age of Empires

My oldest son loves Age of Empires II, so I decided to see what fun we could have hacking with the game.

Before kids I spent too much time playing Age of Empires II. Since kids I've been a recovering adict, keeping well away from temptation as I feared that one hit would lead me down a slippery slope to the AOE monster eating my free/sleeping time. Recently however my oldest son has started playing AoE2 himself, influenced by his mother I should explain. He started out on the scenario levels becoming a great fan of Gengis Khan, Joan of Arc and friends. It was his idea to start hacking with AoE2. We went on a visit to Warwick castle and the next day he suggested that it would be great if we could play a Warwick castle game on AoE2. A little playing with the scenario builder and we had a passable map of Warwick castle with the forces of Ricard Earl of Warwick lined up against the Duke of Hastings and Edward 4th. My son was in charge of deciding the sizes and composition of the various forces and, being only five, he made quite sure they were heavily biased in the human player's favour. We got this set up and ran the game. At first we couldn't get the two sides to fight each other. Then we found the dipolomacy settings and with the help of drawing up the grid of who was with who, got the correct forces to engage.

My son seemed quite happy with the set up we had. He'd get his huge band of troops, march up on the hapless enemy and win decisively. I was disappointed with the way that the computer controlled forces did little to defend themselves. They just stood about and waited for the enevitable anihilation. A little digging and I found that AoE2 has a scriptable AI language and there are lots of people writing AoE2 scripts at www.aiscripters.com. So now I have my next hacking mission: learn the AoE2 scripting language and start coding some things in it. Meanwhile, my son has this idea for a "build the Great Wall of China" scenario.

Tuesday, 29 April 2008

Working with the Grain

Re-reading my previous posts it occurs to me that I was assuming that spending time with my family was taking time away from doing cool hacker stuff. I've missed a trick there. What I should have been looking for was the win-win. If the things you do with your kids are cool hacks at the same time then the hours are not zero sum. So, shifting focus, my search changes from looking for ways to hack in the spare moments around the kids to looking for ways to hack with the kids.

What would constitute a hack with the kids? Well it has to be something to do with problem solving, being creative, and getting immersed in a topic. The difficulty is finding the topic. Its got to be something where both me and my kids are interested. It seems patronizing to get the kids to repeat experiments out of kits without some wider motivation.

So that's what I'm going to try to do. If you have an idea for a topic then post a comment.

Friday, 4 April 2008

Chess Griffin Becomes a DadHacker

Chess Griffin, presenter of the fabulous Linux Reality Podcast, has announced that he's stopping podcasting after 100 shows to have more spare time to spend with his family. This is the classic DadHacker dilemma -- doing something technically cool just takes up so much time. I can't even keep posting to a blog up to much speed never mind a podcast. If I can think of a answer that allows both family and techie things to happen simultaneously I'm sure I'll make my fortune somehow.