Wednesday, 22 July 2015

Setting up ClearOS as a Google Cloud Print server

I have ClearOs 6 running 24/7 as my main Internet-facing router, providing firewalling and routing for my LAN.

I also have a number of Android devices, and it has always annoyed me that Google Cloud Printing seemed to require a Windows PC switched on.

Some Googling revealed that a Linux CUPS server can be made to share its printers with Google Cloud Print. so I decided to try to set this up.

First, I installed the Advanced Print Server into ClearOs, from its Marketplace (it's free).

Then I set up my printer by following the instructions.

Then I logged on to the server as root, using putty.

I downloaded cloudprint from, and unzipped it to /usr/share/cloudprint.

I installed the packages it needs (mostly worked out by trial and error)

yum install python python-pip gcc python-devel cups-devel

pip install pycups argparse cloudprint[daemon]

pip install --upgrade cloudprint[daemon]


(The square brackets are typed in as shown - they aren't code for an optional argument.)

This gave me a url to put into a web browser to add the printer to my Google Cloud.

In order to have this run automatically, in daemon mode, at startup, I added

cloudprint -d

to /etc/rc.d/rc.local 

That was pretty much it (aside from all the messing about finding out what was needed). Note that I did not do everything in one go, the way I have documented it, just installed each bit I needed when I found out what I had didn't work.

Hope this helps anyone else wanting to do it

Thursday, 9 July 2015

Thursday, 18 June 2015

Free Accounting Software

I have continued to work on my accounting software, while using it in my business and for my personal accounts (in separate databases).

I have added a number of new functions:

  • Import statements from QIF files
  • Copy and paste statement data from bank web pages
  • Investments (shares, unit trusts, etc.)
  • Import data from Quicken
I'm really keen to get some more beta testers - anyone running Windows or Linux want to try a free small business accounting or personal package to run on their own computer, but which they can access from any computer, phone or tablet?

Thursday, 9 April 2015

Quick Books replacement

I knew it was a while since I had posted anything on here, but I didn't realize how long! Comes of being too busy, I guess.

In my small business, I have been using Quick Books for years. Although when I started the business I had been working for an accounting software company, I still chose Quick books because it was simple and easy to use - no remembering obscure account codes or customer numbers, everything works by name.

Since upgrading to Windows 8, Quick Books has become significantly less functional - none of the pages that use the Internet Explorer web control work any more - they just come out blank. However, it is no longer possible to upgrade or buy Quick books - you have to subscribe to a web service instead.

Doing this was just not worthwhile for a small business like mine, so I had a look at alternatives. Unfortunately, none of the alternatives I could find would import my existing Quick Books data. As I know a lot about accounting software, and figured there would be lots of people in the same position as me, I decided I should write my own.

I have just completed a beta test version, which has the following features:

  • Imports data exported from Quick Books. Journals are exported using a Quick Books report. The only limitation is that all sub-accounts must have unique names, as Quick Books does not distinguish between sub-accounts and main accounts in its journal report.
  • Does all the basic accounting tasks:
    • Sales invoices, credit notes, payments
    • Customer maintenance
    • Product maintenance
    • Optional Days:Hours:Minutes or Hours:Minutes units on product quantities, to make life easier for people like me who do hourly billing.
    • Purchase invoices, credit notes and payments
    • Supplier maintenance
    • VAT
    • Banking, cheques, deposits, transfers, reconcile
    • Name maintenance
    • Accounting, journals, VAT return
    • Reminders
    • Memorised transactions
    • Import (from Quick Books, CSV or tab delimited files)
    • Data integrity check
    • Backup and restore data to json format
    • Audit trail shows details of every transaction added/deleted or changed
    • Payment history shows details of how each payment is allocated to invoices.
  • Provides helpful features like Quick Books:
    • Names (Customer, Supplier, Cheque payee, etc.) all either selected from drop-down lists, or use auto-complete (type part of a name, and choose the full name from a drop-down list).
    • Choosing an existing name for a payment, cheque, journal, etc. automatically populates the form with whatever values were used last time.
  • Uses either SQLite or MySQL database (set in a configuration file)
  • Runs as a Web Server (on port set in configuration file), so can be accessed by any web browser (Chrome recommended for best usability). Tablet and phone friendly, so you can use it from anywhere with access to the computer running the server.
  • Runs on Windows or Linux (uses Mono on Linux, .Net on Windows).
  • Customisable - the user interface is all in HTML/CSS/Javascript, so if you understand these you can customise the user interface however you like.

    I am therefore looking for people who would like to beta test the software. You get a free copy of the software, along with updates as bugs are identified and fixed. You also get free support via email during the beta test programme. Add a comment here, or contact me via my web site

    Tuesday, 19 March 2013

    0x8024402c the proxy server or target server names can't be resolved with Microsoft Security Essentials

    I found the above error on a Windows XP machine, when trying to update the virus definitions.

    I checked the Internet Explorer proxy settings - automatically determine was not checked, and there was no proxy setting.

    I also ran proxycfg -d, just to make sure.

    This still didn't fix it.

    In the end, I ran wireshark during the update attempt. I discovered that, despite the proxy settings being turned off, MSE was still querying the dns for host name wpad, and downloading the proxy setting script from http://wpad/wpad.dat.

    Which would have been fine, except that I had a stray CNAME record for wpad in my local DNS, that pointed to my local webserver, that had a stray wpad.dat file in it, which set the proxy to a machine that no longer exists!

    What was worse, the stray entry only existed in one of the two DNS servers on my network, so the problem was intermittent, depending on which DNS server Windows used for the query.

    Once I deleted the stray DNS entry, and removed the wpad.dat file from my web server, it all started working.

    The moral of the story is, if you experience the same problem, try typing http://wpad/wpad.dat into your web browser, and see if you get a file. If you do, open it with a text editor, and it will show you what proxy settings MSE will decide to use (even if you have told it not to)!

    Thursday, 3 January 2013

    Windows Vista Media Centre Program Guide disappeared on 1 Jan 2013

    I have had a Windows Media Centre almost since they were first invented. When I bought it, it ran Windows XP, but I "upgraded" it to Vista when Vista came out. (Although Vista had many problems, the Media Centre part was better than the XP version.)

    On 1st Jan 2013, the program guide suddenly stopped working. It claimed it had downloaded the guide, but every program had "No data available" on it.

    After some research on the 'Net, I discovered that the UK TV guide was downloaded from Broadcasting Data Services, and that Microsoft's agreement with them appeared to expire on 31 December 2012!

    I spent a whole day investigating what to do about this. Microsoft were no help at all. I considered upgrading to Windows 8, but the Microsoft free offer of a Media Centre registration key via email doesn't work (at least, I had no reply to the request I sent a week ago).

    The only obvious solution I found on the net was to use a separate program to extract the guide information from the broadcast EPG, and put it into Media Centre. To that end, I installed a program called EPG Collector from SourceForge, installed it, and got it working. Except that it couldn't put the data into Media Centre, with the error message "Could not load file or assembly 'mcepg, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35'".

    Further research, and a posting to the relevant forum, suggested I install something called the Microsoft TV Pack, an upgrade to Media Centre - this does not seem to be available from Microsoft, but I found it at I downloaded it, and the PlayReady PC Runtime (also from Microsoft, and linked from the same page), and installed them both.

    I restarted the PC, and Media Centre - all my TV settings had gone! (This is normal, I think, as TV Pack is a major upgrade.) I went into the option to set up TV, and it appeared to hang at the point where it should have downloaded the guide. I panicked, and did some more research - others had the same problem, but none of their solutions seemed to work. So I started it again, and left it overnight.

    In the morning, success! It had probably abandoned the download, and continued - it had scanned the available TV channels, and I was able to proceed (after another delay while it tried to download guide information again).

    I then laboriously went through all the channels (some of which had got guide information from somewhere, and some hadn't). I pressed the "i" button while the cursor was on a channel name in the guide, and chose "Edit Channel" (this is a new option, which only appears after you have installed TV Pack). This gave me the option to renumber the channel (for some reason Al Jazeera had joined BBC2 on channel 2!), and to set up listings for the channel. In most cases, there was an option to "Use listings from broadcaster" - which I assume gets the listings from the broadcast signal, just as a Freeview TV would. There were a few obscure channels where this was not an option, but I left those alone (I wasn't interested in any of them, and most had too weak a signal to actually get a picture).

    I now have a full guide, and I am hoping I will not need to use EPG Collector after all. I have lost all my series recording settings, but they were about due for a clear out anyway.

    Friday, 28 December 2012

    Making a cheap concertina blind using greenhouse shading

    Vertical blind, half open
    Roof blinds - 1 closed, 1 open

    For Christmas, I wanted to give my wife a set of greenhouse shading blinds for her new greenhouse.

    However, when I priced them up, the cost was going to be over £500. I decided to make some instead.

    Turns out they are not difficult to do, and, as I could find no instructions on the Web, I decided to write up how to do it here on this blog.

    The blinds shown here can be used vertically (as in the picture above), or horizontally (on the roof). In either case the moving rail (white in the picture) always stays parallel to the top and bottom rails, due to the guide lines threaded through it.

    The blinds can easily be opened and closed by pulling or pushing either end of the moving rail, and will stay in any position.


    • Greenhouse shade netting
    • Strimmer line
    • Plastic electrical conduit, oval section
    • Wood strips (about 1" x 1" - 25cm x 25cm)
    • Rust proof screws (brass or stainless steel)


    First measure the area to be covered. I suggest making the blinds no wider than about 4 ft (120 cm), as the electrical conduit which forms the handle to open and close the blind bends if you use longer lengths.
    Cut the shade netting to the width to be covered, and about one and a quarter times the length.

    Pleating the blind

    Using a ruler to guide the pleating

    Using an iron on the appropriate setting for your material (nylon for shade netting - not too hot, or it will melt), fold over about an inch of one end of the blind, and iron the fold in.

    I used a long metal ruler about an inch wide to help me get the folds straight and the correct width.

    Fold and iron again, and repeat until you have pleated the full length of the blind.

    I found the weight of the material hanging off the ironing board tended to pull the pleats out, so I used some weights (a couple of square bottles of water in the picture) to stop this happening.

    Obviously you will have to unfold earlier pleats as you go, otherwise the material gets too thick and difficult to handle.

    The pleats do not have to be totally accurate, but it is important to make sure they are reasonable square to the edges of the material (and that the material is cut squarely).

    When you have finished, gather the pleats up carefully (I found starting from the middle was easiest), and tie with some pieces of string to hold them in place. Make sure the edges are all squared up.

    Make the mechanism

    Pleated blind with top rail threaded

    Cut 2 pieces of the wood the same width as the blind, and 1 piece of the electrical conduit.

    Drill holes for the strimmer cord - one close to each end, and one in the middle. The holes in the 2 pieces of wood and the conduit should all line up. Also drill diagonal holes in the ends of each piece of wood as shown.

    Thread the blind

    Threading diagram

    The 3 main strimmer lines should be a little longer than the drop of the blind (enough to allow plenty for knots, and a bit extra for adjustment). The 2 guide lines (the ones that go through the conduit) should be longer by the length of the conduit - best to allow a bit more for adjustment, as these lines should not be as tight as the main lines.

    First thread the two guide lines though the length of the conduit. Then thread the 3 main strimmer lines through the top wooden rail, the blind, the conduit and the bottom rail as shown. Tie figure eight knots in the ends.

    Thread the ends of the guide lines though the diagonal holes - notice that one line goes from top left, through the conduit, and down to bottom right, and the other vice versa. Again, tie them off with figure eight knots.
    Now fasten the blind to the top rail (I used a staple gun), and to the conduit (I used gaffer/duck/duct tape).
    Detail showing guide line (blue) threaded in top rail and conduit


    Drill holes in the top and bottom rails for the fitting screws - the placing depends on what you are screwing them to. Fasten the top rail in place, and hold the bottom rail where it is to go. Adjust the length of the main lines so they will be quite tight (a little stretched) when the bottom rail is in place. Temporarily fasten the bottom rail, ready to adjust the guide lines. For horizontal blinds the guide lines can be quite loose, but for vertical blinds, they must be tight enough so the blind does not close under its own weight. Once you have measured and tested, undo the bottom rail and tie the knots to make the lines the right length. Professionally made blinds do not use knots, they have a small piece of metal tube with a grub screw, so you can pull the right length of line through the tube, and tighten the screw.