Craig Russell

Web n That

I ♡… the web… php… html… css… linux… shell scripting… folding paper… dog walking… sandwiches… being outside… and most of all @vicuol ☺

Posts in Linux Category

Installing Ubuntu 9.10 on HP-G61 Laptop

April 15th, 2010

I’ve recently bought an HP G61-401SA Laptop, and installed a dual boot system with Windows 7 and Ubuntu 9.10. I won’t go through the build process, because building a dual-boot system is well documented elsewhere. After installing Ubuntu, most of the laptop features worked fine, the exceptions are listed below.

Bash Console Colours for C++

January 28th, 2009

Here’s a little header file for C/C++ that I knocked up to make colouring console output a little easier. Not all of these colour codes are supported by every console emulator, but if you stick to the primary colours, you should be fine. File: shellColours.h

Crontab Debugging

December 22nd, 2008

Sometimes, a script which works perfectly fine when run from the shell, fails when run as a cron job. It’s often quite difficult to debug these problems, but to make the task a little easier, try this. Edit the crontab file with crontab -e Add this line for your script…

BASH Variable Scope in While Loop

December 8th, 2008

Here’s an annoying little foible of BASH shell scripting. I’ve been trying to writea script to test authorization against a list of servers, and fire off an email if any of the servers doesn’t respond. The lis tof servers is in a text file, and I’ve got a while loop…

Xming the Xmerciless

September 9th, 2008

For a while now I’ve been looking for an X server for Windows, so that I can start X applications from within a secure shell. Up until now Hummingbird has a been a fair solution, but I’ve never been too impressed with it. I’d never been able to get it…