How many times have you been at work and found yourself wanting a file from your computer at home? What? Never? Well, it’s happened to me once or twice and being the sort of person who will happily spend hours bodging something up to fix a problem that doesn’t really need fixing, I had to do something about it.
The first problem is that my PC at home is turned off. I would dearly love to say that I’ve come up with an internet-connected poking stick that prods the button on my home PC to turn it on, but most modern PCs already have the electronic equivalent of this – something called “wake on LAN“. This is a magic signal that is sent over the network to tell a computer to turn itself on. I’ll leave out the technical details, but wake-on-lanning is not possible from the outside-world side of the router at home, so an always-on PC inside the home network is needed to send out the signal. This is where the laptop comes in. It’s an old shitter (AMD K6) with Debian Linux installed on it, that is left on 24/7, sitting under the sofa and spending most of it’s life in low power mode with the fans and hard drive turned off. It’s this one, in fact but with a boring internal hard drive. As well as being a virtual poking stick to turn on our PCs, it also serves as a DNS and network storage. It runs a web server and acts as a gateway to the files on our PCs. This is what it looks like when you log on (yes, you do actually have to log on) to happy from work:
By the way, our PCs have a Mr. Man naming scheme. The laptop is “happy”, Jen’s PC is “splendid” and my PC is “rude”. The router is “tickle”. As you can see, both PCs are turned off. Let’s click the on/off button on rude. Cor! It gets all AJAXy and web 2.0ey with an animated loading doobrey:
Meanwhile, behind the scenes, happy is prodding rude to boot up. After about 30 seconds, rude is available, happy notices this and the page automatically changes to:
The folders on our PCs aren’t directly accessible from the outside world, so they are attached to happy (which is) by clicking on the icon. Once a folder has got a green tick (as “Music” has here) you can click on the magnifying glass to go to the file browser (which is so AJAXy you could use it to clean the bath) to get at the contents. I didn’t write the file browser, by the way.
You can view pictures, edit text files and play mp3s, as well as selecting a bunch of files to be automatically zipped up and downloaded. It really is lovely to use.
Then, when you’ve finished, just click on the on/off button again…
… and rude turns itself off. Sheer geeky fun.
While I’m writing this in praise of Linux (we have no Windows PCs or Macs), I’m well aware that this is possible to do with Windows machines too. It’s just not fun though. Linux allows hacking without restrictions; if you can think of it, you can do it in about 10 minutes with a script file. The original scripts to turn on the PCs and browse the file systems took literally 15 minutes to cobble together. And I’ve programmed in Windows environments; when you do this sort of hackery pokery on Windows machines, you feel guilty. You feel like you should be getting a permission slip from Bill Gates first because you are never really fully in charge of Windows. Error messages? You don’t need to know if something is going wrong because error messages aren’t pretty. We’ll just reboot, shall we?
It’s not easy to hack around with Windows PCs and it’s just not fun. This link is a page showing which program to download, and how to jump through the hoops to turn off a Windows PC remotely. For comparison, Linux requires no extra software and only one command in a script.
I’ll stop gushing now. Next step is to replace the happy laptop with one of these:
Guess what operating system this runs? I wouldn’t want anything else.