Archive for the 'linux' Category

linux on my old laptop - finally useful

Tuesday, April 3rd, 2007

When I first started this blog years ago I was detailing various (mostly failed) experiments with running linux on an old Time (Fic A430) laptop of mine. The machine is long past it’s prime - screen doesn’t work, no battery and was last in service as a windows 2000 mp3 jukebox at work until the harddrive failed. I decided to get a new bargain harddrive for it and have one last stab at milking some life out of it. I installed Ubuntu linux, which went on like a dream, recognising everything including onboard soundcard which always used to be a problem and the machine is now happily (and quietly) sitting at home as a general email/ web machine (plugged into external monitor, keyboard etc) and also functions as a backup server - taking nightly backups of a few remote mysql databases I have, and an ssh gateway to my home network. If this proves to be reliable, then I will feel much better about the stupid amount of money I spent on it seven years ago!

Find the best hosted IT services for your small business. Our ColdFusion hosting is the most powerful available and our email hosting is professional and cost effective.

Recent windows update “monkeys” with Plone as service

Tuesday, February 20th, 2007

A bit of an exaggeration maybe, but I thought I would blog this just in case anyone encounters the same problem. A client phoned yesterday to say that his Plone (2.0.5 on W2K3 server) intranet wasn’t working and could see that the python/zope service was not starting. As it had been running fine for months previously (albeit a bit of memory leakage), my first question was if anything had changed on the server. Other than windows updates, nothing had changed. Not being a windows expert and having burnt through hours trying to resolve a previous plone issue on their old windows server, I threatened to go over there and install vmware and give him a virtual machine running linux or FreeBSD to run the Plone intranet on. At that moment, the unix-phobic client spotted that where he had previously set the IIS https/ssl service to manual startup, the recent updates had reset it to automatic. This was stopping Zope binding to one of the ports (or something like that), hence the service failing on startup.

This was a fairly obscure, but it just goes to show that sometimes the mere mention of unix can sometimes solve windows problems :-)

transplanting a linux setup

Friday, February 2nd, 2007

I was amazed to hear that it is possible to move a disk with an ubuntu (and probably other) linux install on it from one machine to another (different type of) machine and it will still work. Possible spanners in the works are the graphics card (which may need reconfiguring) and network connections which are hooked up to the linux install according to mac address. I tried it this evening - moved a disk and network card from one machine to another and I instantly had a working box that I could ssh in to, although needed some work to get the graphics card recognised (won’t go into that here, but CTRL - ALT and backspace is handy for restarting
x-server).

Find the best web hosting and business email hosting services around. We help small businesses look big with exchange 2007 hosting and ColdFusion hosting at a great price.

unix command to delete the .svn folders

Tuesday, October 17th, 2006

This command will delete all those pesky .svn directories that have been left by subversion:-

find ./ -name ".svn" | xargs rm -Rf

(obviously you will want to keep the .svn folders if you are still using subversion)

return of the mac

Friday, September 22nd, 2006

i’ve now gone full circle and am using my powerbook (plus second monitor, keyboard, mouse etc) as my main work machine. The windows laptop now sits on the edge of the desk so I can reach over for IE testing. Using windows as my main machine drove me mad. unexplained freezes, random system tray frenzied disco icon action, “insufficient ram” messages, despite me having over a gig of it and only using about 200mb of it. Flakiness.
Being back on the mac feels lovely, even if I do have to skate a couple of miles with it in my backpack to get it here. The battery now only gives me about 30mins - new one on order (wait, did I already blog that?).

Someone else here is using an intel mac mini with a stack of ram and parallels for windows testing. works a treat. need to distract them and steal it!

ubuntu update kills vmware server

Wednesday, September 20th, 2006

After applying a whole load of ubuntu updates, vmware server console wouldn’t work - it would try to start then just quit with no error message. After a quick msn chat with netsight linux guru scott (in foreground), It turns out that one of the updates I had applied was a kernel update. to fix vmware I needed to download the new kernel headers:

# aptitude install linux-headers-`uname -r`

then run the vmware server config again:

# sudo ./vmware-config.pl

I accepted all the defaults, and now it is working fine again :-)

ubuntu on HP nx6110

Wednesday, September 6th, 2006

I needed to reinstall windows on my work laptop as it was getting a bit sketchy and unreliable in that undefinable way, so I took the opportunity to repartition the disk and set it up as a dual boot machine, with ubuntu. I created a primary 15gb partition for windows and installed win xp in the usual way, then used the partitioning tools in ubuntu to create a 15gb partition for data (Ext3 to be shared between windows and linux, by installing these ext3 drivers in windows), and a 6gb partion for the ubuntu install. It all went fine, but the wireless card isn’t recognised by ubuntu. I’ve looked into it - apparently I can get it working using some windows driver voodoo that goes by the name of ndiswrapper. I haven’t tested how/if ubuntu handles sleep and dual monitors yet, but will do at some point.

bulk search and replace on unix using perl

Monday, August 14th, 2006

here’s a example of how you might do a bulk search and replace on unix - here i’m replacing all occurences of old style br tags with xhtml br tags:

perl -pi -e ’s@<br>@<br />@g’ * (this will replace all instances in all files in the current directory)

find . -type f | xargs perl -pi -e ’s@<br>@<br />@g’ (this version will search subdirectories too)

EDIT: remember that bulk search and replace can be dangerous, and also bear in mind that if you use subversion like we do, the method described above will affect the .svn files too. This appears to be a BAD THING

Platform Agnostic

Tuesday, August 1st, 2006

For the past few months i’ve been using mainly windows for web development, because I seem to find myself doing a lot of testing in IE, and I was fed up of lugging my powerbook to and from work (on a skateboard), so I nagged netsight into buying me a cheap laptop to use here and to take on client visits. Set up on an iCurve stand with a second monitor it has proved to be a nice little set-up. One thing I have noticed is that it gets into a panic if you do something such as unplugging a cable at the wrong time and I do find myself rebooting quite often compared to my mac. It is nowhere near as portable and robust as the powerbook. Always paranoid of the viruses too..

At home i’ve ended up running ubuntu linux with windows running as a virtual machine in the excellent and FREE vmware server. The powerbook will shortly be married to an apple studio display as a living-room friendly multimedia machine and workstation. I have probably spent an unhealthy amount of time getting myself in a situation where I can do everything from every machine - using putty in windows to develop on the linux and osx machines, vnc, terminal services, shared folders. I justify this because I am after all a developer and I have my reasons for using all these setups. If I wasn’t a developer I would just stick with the powerbook.