Beginning irc

After some discussion last night at PHP Hants about the fact that irc is a great facilitator of support / discussion, but largely ignored because there is rarely enough information for a new user to get going I decided it may be worth putting together a howto type post so here goes…

What is irc?

First of all, what on earth is it? I’m tempted to describe it as Twitter done right years before Twitter even existed, but I’m a geek and I’ve been using irc for years. It has a long heritage, but unlike the ubiquitous email it hasn’t made the transition into mainstream use. In terms of usage it has similarities to things like Twitter and Instant Messaging. Let’s take a quick look at this.

Twitter allows you to broadcast messages, they get published and anyone who is subscribed to your feed can read what you say. Everything is pretty instant, and if somebody is watching the screen at the right time they can respond straight away. Instant Messaging on the other hand, is more of a direct conversation with a single person, or sometimes a group of people, but it too is pretty instantaneous – assuming, of course, that there’s someone reading what you’ve said. Both of these techonologies are pretty familiar to many. If you go to the appropriate website you are given the opportunity to sign up and either use a web based client or download one.

It is much the same for irc in terms of usage, although conversations are grouped into channels which generally focus on a particular topic rather than being generally broadcast (Twitter) or more specifically directed (Instant Messaging). The downside is that in most cases you don’t get a web page with clear instructions of how to sign up, download a client and find where the best place is to join the conversation.

Getting started

There are two things you need to get going with irc, a client and somewhere to connect to. Let’s put that into a more familiar context.

The client is what you use to connect with; this can be an application – so as an example Outlook or Thunderbird would be a mail client, or IE, Firefox, Chrome or Safari are examples of clients for web pages – or it can be a web page that does the same thing – so if you go to twitter.com and login you are using the web page as your Twitter client. Somewhere to connect to can be compared to a web address, or if you’ve got close enough to the configuration of your email to see the details, your mail server address.

Let’s start with the ‘somewhere to connect to‘ bit. Freenode is one of the most popular irc servers, so let’s take a look. First we’ll see what we can find out from their website, http://freenode.net/.

freenode

There’s a lot of very daunting information there for somebody new to irc, so ignore most of it and follow the Webchat link on the left.

webchat

That’s all very well and good, but what do we put in there? I guess the screenshot above gives a clue, but if you actually visit the page the entry boxes will be blank. Well first off there’s the Nickname, this can be pretty much anything you like, no need to register it – stick to the basics of letters, numbers and some simple punctuation (if you want to), keep it short and so long as nobody else is already using it you should be fine; if it doesn’t work try another. Channels is the awkward one, how do you know what channels there are? If you’re lucky you’re looking into this because you’ve been told there’s a channel there and hopefully you’ve been given the channel name. For now let’s just use the PHP Hants channel, so that would be #phph in the Channels box. Now all you need to do is type in the captcha, ignore the tick boxes and click Connect and you are on the irc channel and ready to chat. Down the right you’ll see a list of who else is there, and in the main window there will be a bit of introductory information (e.g. topic for the channel) and depending on how busy it is anything from nothing to a fast scrolling screen of text.

phph

If you’ve miss typed there’s a chance you’ll end up in a channel specially created for you because it didn’t exist; don’t worry, just quit and try again (I’ll explain that process shortly).

For now all you really need to worry about is typing in text an posting it, this is as simple as typing it into the entry box at the bottom of the page and pressing return. Be polite, be patient and you’ll be fine. There are plenty of commands that you can use to do things, but for now the only one you need to worry about is the one to leave, this is:

/quit

Type it in the entry box, press return and you’ve disconnected from the server. The next thing to look into is using a client program since this is far more flexible, but I’ll save that for another post.

Scratch in a network environment

I have been running a Code Club at my local Primary School for a while now, and thought it was about time I put details of a few tweaks I’ve made to the default Scratch install to make things easier. So here goes:

With the default install of Scratch (on Windows) projects are saved to the C: drive. For a network environment, with pupils work stored on a network drive so they always have access whichever machine they sit at, this isn’t exactly helpful. It also isn’t ideal that they can explore the C: drive in spite of profile restrictions (although it isn’t the end of the world as there is little they can do from Scratch).

save-orig

After a bit of time with Google I found the answer, and since it didn’t immediately leap out at me when I was searching I thought I’d post it here (perhaps my Google Fu was weak that day). It is actually quite simple, especially for the average Code Club volunteer I should imagine; just edit the scratch.ini file. This is, as would be expected, located in:

C:\Program Files\Scratch\Scratch.ini

Initially it looks like this:

ini-orig

Pretty standard stuff, but unfortunately no comments to indicate what else you can do with it. As it happens you can add the following two lines (for example):

Home=U:
VisibleDrives=U:

To get this:

ini-new

They do exactly what is says on the tin. If you click on the Home button in a file dialogue box then you only get the drive(s) specified. You can also put a full path in if you want to put the home directory further down the directory structure.

save-new1

The VisibleDrives option restricts what you can see if you click on the Computer button in a file dialogue box. If you want to allow more visible drives then separate them with a comma.

save-new2

You can do the same with a Mac (for the home drive), just use the appropriate directory format (i.e. no drive letter and the opposite direction slash).

There is more that you can do, so take a look at the Scratch documentation here. For example if you use a * in the directory path it is replaced by the name of the currently logged on user.

Depending on your network environment it may be handy for your Code Club to put the extra resources on a shared network drive and open up an extra drive in the VisibleDrives. One I haven’t tried yet it is the proxy setting, which I hope will allow me to upload projects to the Scratch website. It goes something like:

ProxyServer=[server name or IP address]
ProxyPort=[port number]

Windows is weird

I’ve just been putting together a post about some modifications to Scratch for use in a school environment that I have used for the Code Club that I run. Everything went well on the school computers, but when I tried to do the same on my own Windows 7 desktop to get some screenshots things went a little weird.

First off, it is a pain to edit the required .ini file. Right click and edit doesn’t give you administrator privileges so you can save it. My first thought was to run Explorer as administrator, but sadly the administrator privileges don’t extend to Notepad when you right click and choose edit. As it happened I was only going to use Notepad for the screenshots, so I took them and then used Notepad++ to do the actual edit. A quick right click and “Edit with Notepad++” followed by closing it and opening it again with administrator privileges did the trick.

This is where things went from slightly annoying (isn’t Windows always!) to weird. When I ran Scratch my edits to the .ini file didn’t appear to have taken, so I checked the file – fine, nothing wrong there. So this being Windows I decided to try a logout and login just to be sure there wasn’t anything odd going on there. No joy. So I decided to check from the command line with Edit. For some reason when I opened the .ini file up in Edit the extra two lines I had added were missing, so I checked in both Notepad and Notepad++ and they were there. I double checked I was working on the same file and there had been no name change for some strange reason and all was well – or at least I confirmed I was working on the same file.

At this point I realised that the command line I was using wasn’t running as administrator, so I opened up an administrator command prompt and headed to the same directory to edit the file there. The only issue was that when I open it in Edit the two lines I had added were there. This would seem to imply that there are two versions of the file, one for the administrator with the edits and one for my user account without. Although then again, not, since when I edited in the GUI with Notepad or Notepad++ either as administrator or my standard user I did have the edits! This didn’t make much sense. For a moment it looked as though I was going to have to mess around with changing the permissions to work out what was going on. Anyway, I switched to the non-administrative command prompt to edit the file, only to find that my changes have magically appeared (and I hadn’t messed with the permissions yet)! So I tried Scratch again and there we go, the changes are working.

So it would appear that, for some reason, the edits I made to the file (using administrative privileges) took a few minutes and a logout and back in again to be visible to my user account! …and some people wonder why I prefer using Linux!!

Ubuntu ATI driver

A couple of weekends ago I was at OggCamp and the first talk on the Sunday was a good one by LornaJane Mitchell. For one it was a timely reminder of how my IT career started. It was also a virtual kick up the backside to get a bit more use out of my blog. I tend to think in completed articles, but I do have a precedent for short technical comment entries, so here goes more…

I’ve just upgraded my desktop machine, it isn’t exactly state of the art, the new one is only a 3.2GHz P4 and is my first 64 bit desktop, but that’s beside the point. The point is I dropped the old SATA HD into a new box and let Ubuntu get on with the job of sorting out the hardware changes (as an aside Windows 7 put on a bit of a show and then gave up in a huff!).

All went well apart from the graphics, which meant I couldn’t even get the login prompt (I knew I should have stuck with a console and typing startx!! To cut to the chase the solution that worked for me was to boot into the recovery mode kernel and do a one off boot into a safe graphics mode. From here I used the Additional Drivers tool to remove the proprietary ATI driver. This allowed me to reboot into the standard desktop and confirm thins were working, but sadly I couldn’t get above 1024×768 which restricted screen space somewhat.

As it happens I doubt the above was needed because my next action was to boot once more into recovery mode and restore the proprietary driver and reboot. This time when the screen went blank and complained about being ‘out of timing’ I used ALT-F2 to bring up a CLI login and from there used:

sudo aticonfig --initial

This created /etc/X11/xorg.conf, although unfortunately this didn’t make any difference, but it did prepare the ground for:

sudo aticonfig --resolution=0,1280x1024,1024x768

which persuaded the driver to use a more sensible set of parameters that worked with the monitor.

The most notable difference I’ve spotted in the logs so far is that when not working I had the line:

(II) fglrx(0): Setting screen physical size to 423 x 317

whereas when working it is:

(II) fglrx(0): Setting screen physical size to 338 x 270

I’ve not explored whether there is anything else, or what that actually means!

Not to blame for Windows 7

In contrast to the wonders of the recent Microsoft advertising where everyone is trying to claim responsibility for Windows 7 (is it just me that sees this, along with the terrible launch party idea, as a desperate attempt to build the sort of community that open source software has?), I would like to make it publicly known that Windows 7 is not my fault. I’ve been working on installing it recently, and really don’t want to be associated with the palaver involved in doing so!

First off, it totally fails to recognise the controller my hard disk is attached to, so I have to add it in on install. This is a Silicon Image 3512 based SATA PCI card, and it also failed to recognise the ITE 8212 PATA card I tried. Once I’d installed I found that it seemed to think I had a USB2 CDROM drive attached, which I don’t, I don’t have one (well, bar a case in a box that is waiting for an ATAPI DVD-RW to be installed!). It also failed to detect my network card.

So after a reboot, just in case, I decided to take a further look. It seems that Windows 7 lacks drivers for my NIC (SIS 900), SCSI card (Adaptec 2940) and sound card (AC’97, either Realtek of SiS, depending on whether you believe the Gigabyte website or lspci!). The NIC and sound are on the motherboard, whilst the, admittedly old (it was purchased when I built my first 486!) SCSI card is PCI,

So, after some fun with Google, and a bit of downloading, I installed a Windows XP driver for the SiS900, and tried Windows Update. This found 22 updates, totaling around 155M give or take, and proceeded to install. Sadly, 5 updates failed to install properly, including the updated SiS900 driver and the AC’97 audio driver!! The others were the SiS AGP driver, Windows Malicious Software Removal Tool and updates for Windows Defender. Nothing critical then, just network and sound drivers and protection from anything nasty (which you won’t need with no network will you!).

Thankfully, after a reboot, another run of Windows Update, and another reboot, I seem to have a basic install of Windows 7 that works. I just need to decide what to do about the SCSI card, sort out anti-virus, and adjust my network settings (for some reason I seem to have been connected to two when I only have one, and I need to change the workgroup). Then I can start looking at getting some actual software installed to make the machine useful.

Anyone who claims Windows is easier to install and has better driver support than Linux really needs to think again!

BIOS fun

Isn’t playing with a computer BIOS fun? No? Of course it is!

I’m rebuilding my main desktop system at the moment. It isn’t anything spectacularly new, in fact it is based on a Athlon XP 2800+, but it runs Linux (Ubuntu 9.10 currently) with ample performance for my day to day tasks. Windows XP runs on it adequately, when it actually works (I clearly use it too little because it sulks and ‘blue screens’ every few months, requiring a repair or reinstall).

Anyway, as part of this rebuild I decided that it made sense to get everything bang up to date, including the BIOS. The board is obsolete now, so the BIOS was a few years old and should be stable enough – wrong! The board is a Gigabyte GA-7S748-L (GA-7S748 with on board LAN), and was running the F5 revision. Updating was simple enough, just boot of my DOS USB key (yes, I have a USB key with DOS installed!) and run the utility. This brought things up to revision F9, which was the latest, and is where things started to go wrong.

The first thing I noticed was that my Windows 7 installation couldn’t see the HD, so I reached for a driver (Vista was the most up to date) to add during the install process. This didn’t work, and further investigation showed that the BIOS of the PATA PCI card the drives were connected to wasn’t active. It turned out that enabling USB legacy support disabled the card BIOS. Unfortunately, in order to configure the card BIOS you needed a keyboard, and since mine was a USB one, USB legacy support was required to use it – catch 22!! After trying a PCI SATA card instead I found that this was clearly a motherboard issue and not specific to one card or chipset.

So the next thing to do was to back off to the previous BIOS (F8 in this case) to see if the bug had been introduced in the latest BIOS upgrade. Unfortunately it seems that the F8 BIOS was completely bug ridden (so it is a shame it is still available for download). After installing it the computer wouldn’t boot at all, although it would allow use of the BIOS itself. This board has a facility to flash the BIOS from a BIOS based utility (Q-Flash), which sounds pretty handy in this case. Sadly it didn’t work, although thankfully, the failure didn’t damage the installed BIOS any further. After a bit of research with Google, I found that if you disable USB support completely you can boot to a floppy and re-flash the BIOS using a DOS based utility (will DOS ever die?!).

So, with this information I managed to get back to the F5 BIOS and all was working again. Out of curiosity I then tried the F6 BIOS and found that the USB legacy support clash with the PATA card BIOS was introduced there, so presumably exists in F7 too. Back to square one again then, with the original F5 BIOS and a working PC!

Windows crashed

OK, that’s not a particularly unusual occurrence, but this has been one of the more unusual crashes for me. Earlier this morning I went to the Windows machine to burn an ISO image. It’s not that Linux isn’t capable, or that Windows does it better, just that unfortunately at the moment most of my machines are in pieces and the one with the CD burner has an old and flaky Windows XP install on it.

Anyway, I had misplaced the Knoppix ISO file that I was going to use, got distracted and only got back to the machine later in the afternoon. Not a major problem, bar the fact that this machine tends to sulk if it is left unused and crash (its days are numbered once I get my other machines built!). This time all initially seemed well though, bar the fact that there was a message telling me that other users were logged on and was I sure I wanted to shutdown. Well, I was the only user logged on and I hadn’t asked for a shutdown. In addition to this I only download updates, so nothing should have happened automatically (although after a recent run in with Windows Genuine Advantage and several exchanges with Microsoft I did find their ‘fix’ had enabled automatic updates as a side effect a while back!).

So I told the computer not to continue and proceeded to locate the ISO. Unfortunately the computer was apparently still shutting down as each application vanished in turn and I was then logged off. That would have been merely annoying and resulted in an investigation as to what had triggered the shutdown, but I was left on the login screen. Well almost the login screen anyway. There was no ‘turn off the computer’ button (this is a family machine and hence uses the login screen with the picture for each user – great for kids). The other problem was that, even with valid passwords, I could not login to any account.

Well the machine got left for a while, another distraction, and when I returned there was a very old style password prompt to unlock the screen. Once I had done this I simply had a desktop background with nothing else, but I was able to bring up the task manager and reboot from there.

All this seems suspicious activity, but my anti-virus / anti-malware / anti-etc. software is up to date, and scans using it and online tools don’t show up anything. I also don’t use Internet Explorer or Outlook Express and am patched right up to date bar 3 items from Windows / Microsoft update. The three items are .Net 3.5 which fails to install because it fails the pre-requisite of .Net 3.5 being installed (?!), Internet Explorer 8 (which for some reason is a high priority update and not an upgrade), and Silverlight. This last one is both of no interest and incompatible with my CPU! I know it is incompatible because it is a requirement for viewing some of the information Microsoft told me look at regarding my WGA problem, so I did actually try to install it.

Oh well, all the more reason to replace the machine and use Linux 🙂

School IT education

I’ll start this post off by stating that I’m not having a go at any specific school with my comments here, least of all the one that my son attends, and that I attended too many years ago to mention. My sons school is, in fact, a very good school, and I’m not just saying that because I am now a governor 😉

That said, let’s move on…

The other day my son came home and asked if he could use the computer. Nothing spectacularly unusual there, but shortly after logging on he came back to me asking if we had “the big blue W” on it somewhere. After a brief to and fro I ascertained that what he meant was Microsoft Word and that he wanted to show me something that he had done at school.

There’s a few points here. Firstly there is the comparison with when I was his age (he is seven). Back then I still had around 6 years until the ZX81 was launched and I got my first taste of computers. Now they are not only everywhere, but interconnected to the point where it didn’t even occur to him that the work he had been doing at school wouldn’t be accessible from home – bless him.

Secondly there’s the annoyance that from such an early age the ‘big blue W’ and Microsoft Word are synonymous with word processing. I keep trying to tell myself that he is only seven and they need to keep things simple, but it is still irritating. The end result of this was that I sat down and explained what a word processor was, and that even though I didn’t have the one he used at school I did have another one. I was encouraged by the fact that, when presented with OpenOffice he set straight to work trying to reproduce the same sort of document he had at school, and did so with no help at all – beyond a brief grumble that there wasn’t much clipart! (actually I did show him where that was).

The next question baffled me a bit, “do we have the internet?”. My response was to tell him that we did, and that he used it regularly! Then we headed down a familiar road, “no I mean the big blue e” 🙁 So off we went down the explanation of what a browser was and that he was already quite comfortable using both Opera and Firefox, as was his younger brother (who is 3). In fact they are both rather too good at some of the games on the CBeebies, Nick Jr and BBC Dr Who websites! Still, they are also quite happy playing with Frozen Bubble or Tux Paint 🙂

Firefox 3 first thoughts

Well I’ve only been using Firefox 3 for a very, very short while, but thought I’d make a few notes on my initial thoughts. I’ve not tried the beta or release candidate versions at all, so this is a real first impression.

To start with it is worth noting that I’ve only installed the Windows version, since I’m suffering using Microsoft on the desktop for a while. This is partly due to a couple of hardware failures, partly office reorganisations that are as yet unfinished, and partly forcing myself to keep my hand in – unfortunately I have to.

The first thing I noticed was that it was much faster and more responsive. Firefox 2 has, particularly in the past few weeks, been pausing for periods for no apparent reason. The second observation was that the memory footprint was much, much smaller, so this may well be linked. I tend to use a reasonable number of tabs when browsing and have been keeping an eye on the memory usage recently. I’ve been trimming things down to around 12 open tabs at a time and was amazed that Firefox was using between 200M and 260M, with no sign of reducing when tabs were closed. After installing Firefox 3 I checked and found that it was running at pretty much exactly half that, around 100M to 130M with the same 12 tabs as before the upgrade!

Part of this reduced footprint may be down to the few extensions that are now disabled due to incompatibility. With a major upgrade it is probably time to take a look through the extensions I’m using to see if any are no longer relevant. A few quick highlights of my extension usage are…

Bookmark Sync and Sort – sadly this is no longer compatible, and from a quick investigation it hasn’t been updated for a good while now, and the referenced home page has gone. Time to look for an alternative it seems. All this was doing was backing up my bookmarks to a WebDav folder on my intranet server, and at first glance there seems to be no obvious alternative. With a bit more digging I’ve found two, or perhaps just the one, options:

  • Foxmarks – I ignored this first time round since it was linked to a service, but further investigation shows that you can use it with either WebDav or FTP, as well as install a server component. The original Foxmarks was based on the OSAF Cosmo server, but it looks as though this has been replaced by the Chandler project, so a little more investigation is required.
  • Sitebar – another one I passed over when finding Bookmark Sync and Sort. Again it is linked to a service, but it seems that you can download the server component if you want to. Sadly, according the the Mozilla Addons site it doesn’t currently support Firefox 3, but it does have the advantage of being open source which Foxmarks doesn’t seem to be. Again, more investigation is required.

Firebug, IE Tab (remember this is on Windows!), It’s All Text!, Speed Dial and Web Developer are all available for Firefox 3, so that just leaves…

Tab Mix Plus – not having this one is a bit painful, although partly because I’m not sure what features I’m missing that were part of it and what may now be officially available that I haven’t found yet! That said, I’ve just noted that there is a newer version, just not listed on the Mozilla Addons site. I’ll have to give it a try and then work out what options I’m using that it provides – the session manager, the new tab button and undo closed tabs spring to mind.

There are a couple of other incompatible ones listed on my install. Google Photos Screensaver I think I had disabled anyway and RealPlayer Browser Plugin I hadn’t noticed before – although is probably responsible for blindingly easy downloads from YouTube etc. 🙂

That’s what leaps out at me, bar the slight interface changes. No doubt more differences will become obvious over time.

Bizarre Windows bug of the day

Windows is weird. I know any software can have the odd bug and behave in an unexpected fashion, but Windows really does do bugs and glitches better than anyone else. It is exceptionally good at doing something strange that you can’t quite fathom, and after the traditional helpdesk fix of rebooting you’ll possibly never see it again – in spite of the fact that the error in the code is still there. From my personal experience with the other operating systems I’ve used, when you find a bug situation it is generally repeatable and a reboot doesn’t fix it, but I’m rashly generalising there!!

Anyway, the oddment for today went something like this:

I’ve been in Windows XP doing some work for most of the day without problems. Well, other than the horribly cumbersome and unfriendly user interface that is, but that’s another issue! I then locked the screen and headed of to pick up my son from school. On returning I unlocked the screen with a view to carrying on with some work, but all was not well…

I run a dual screen setup, and the left screen seemed fine. The right screen was not so happy though. The icons along the left hand side of the screen had moved across about a quarter of the width and any windows that were maximised only used the right three quarters of the screen. Oddly the Start menu came up in the correct place at the bottom right of the screen, and any windows moved between screens still used the left quarter of the screen.

I’m afraid I couldn’t be bothered to investigate further and simply rebooted. I’ve long since given up on trying to solve Windows problems that don’t survive a reboot or repeat easily. It just isn’t worth the hassle. Conversely if I get a bug in Linux I want to know why. I guess I’ve just grown to expect Windows to crash and present bugs on a semi regular basis. Has Microsoft created a culture of accepting sub standard products? Thought for another post perhaps!