Since installing an update from Apple to my X11 application, OpenOffice has refused to run. Damned annoying that Apple's development labs can't test updates properly.
Luckily I found a solution on a technical forum of running NeoOffice instead. NeoOffice uses exactly the same open source as Open Office, so saved files are completely interchangeable with OpenOffice, with the odd additional feature thrown in. NeoOffice runs natively on Leopard and so doesn't rely on X11. So far it seems to run rather better than Open Office and I have had great fun mapping out my kitchen using the drawing application (very similar features to Visio) which includes the facility to draw to scale, so my kitchen units can be represented quite accurately for my workmen to follow.
Next time I'm running updates from Apple I'll research the forums before rashly saying yes to new bugs.
Wednesday, October 22, 2008
Tuesday, September 9, 2008
Stumbling across some MacMini tips/tricks
Tip 1 - Booting Puppy from CD
Having a good play around with Puppy Linux led me to getting this to work within Parallels running on Leopard with the MacMini (intel core duo). It succeeded quite well, neatly running Puppy directly from the ISO file, though it's a bit freaky being able to flick between 9 desktops on the Mac and a further 4 running on Puppy (note that my machine has been upgraded to 2GB of RAM so reserving 500MB for Puppy Linux was no problem). The only drawback was that Compiz Fusion would not run within Parallels (I really wanted to see the 3D cube working). I decided to try running from CD direct.
Booting from CD was not an obvious process as unlike a PC the Mac will not boot automatically from CD just because it's in the drive. The trick is to keep the Option key pressed when your machine powers up. It then checks bootable devices and gives you a neat graphic display of the options. Puppy then ran perfectly well including all the lovely 3D Compiz goodness. Though it's not a replacement for me working on Leopard it could be a really handy backup if I run into hard disk problems.
Tip 2 - Ejecting a CD
While creating Puppy bootable CDs I had a problem with one not being read properly on the Mac (probably a scratched disk). Annoyingly it would not eject using software control. This included trying to get it to eject using direct commands from within Terminal. My final solution was to keep F12 pressed on the keyboard when powering up, magically the disk ejected. It seems an amazingly user unfriendly feature to have no manual eject process, not even a pin hole to work a paper-clip into, particularly on a machine which is so notoriously difficult to force open the case. From now on, I'm being extra careful to ensure disks look spotless before inserting them.

Having a good play around with Puppy Linux led me to getting this to work within Parallels running on Leopard with the MacMini (intel core duo). It succeeded quite well, neatly running Puppy directly from the ISO file, though it's a bit freaky being able to flick between 9 desktops on the Mac and a further 4 running on Puppy (note that my machine has been upgraded to 2GB of RAM so reserving 500MB for Puppy Linux was no problem). The only drawback was that Compiz Fusion would not run within Parallels (I really wanted to see the 3D cube working). I decided to try running from CD direct.
Booting from CD was not an obvious process as unlike a PC the Mac will not boot automatically from CD just because it's in the drive. The trick is to keep the Option key pressed when your machine powers up. It then checks bootable devices and gives you a neat graphic display of the options. Puppy then ran perfectly well including all the lovely 3D Compiz goodness. Though it's not a replacement for me working on Leopard it could be a really handy backup if I run into hard disk problems.
Footnotes:
- I'm unsure if there's a way to get the boot up to work straight from a USB drive, this doesn't seem to be part of the standard boot up routine.
- Parallels doesn't seem to let me share the Mac hard disk or USB drives with Puppy though I haven't spent any time researching a workaround.
- The benefit of taking virtual machine snapshots is a key bonus, I can install options and change settings on puppy with the confidence that I can roll back to a happy working state.
Tip 2 - Ejecting a CD
While creating Puppy bootable CDs I had a problem with one not being read properly on the Mac (probably a scratched disk). Annoyingly it would not eject using software control. This included trying to get it to eject using direct commands from within Terminal. My final solution was to keep F12 pressed on the keyboard when powering up, magically the disk ejected. It seems an amazingly user unfriendly feature to have no manual eject process, not even a pin hole to work a paper-clip into, particularly on a machine which is so notoriously difficult to force open the case. From now on, I'm being extra careful to ensure disks look spotless before inserting them.
Saturday, September 6, 2008
How to breathe life back into a 10 year old Compaq laptop using Xubuntu
Many years ago I lent an old slightly damaged laptop to a friend (the laptop locking mechanism was broken and the screen slightly damaged). Last year he bought a cheap but highly functional laptop after my loaner, now nearly ten years old, stopped working and eventually returned it to me for possible repair and use.It is a Compaq E500 which has a rather stylish black and grey layout, good quality keyboard and a clear colour screen (in 1999 it was retailing for $1,970 and in 2008 they sell on eBay for under $100). The hard disk had fatally crashed and windows now failed to boot up only ever giving a blue screen of death. I'm unsure if the hard disk has a physical problem but after it laying around on my study floor for six months I thought it might be possible to replace Windows with a suitable free small version of Linux so the machine could become a handy wireless web laptop and guest machine. [E500 Spec: 14.1 in 1024x786 TFT display (1600x1200 external), 12GB hard disk, CDROM 24x, Video Out, Pentium III 650MHz, 192MB SDRAM.]
After failing to get the standard Ubuntu to install from a CD I had to hand (I gave up after letting the disk whizz around for over a half hour) I did a little research and opted for Xubuntu which is a cut down version for machines with more limited resources. I downloaded and created a CD from the ISO file on my trusty MacMini. The E500 install took over an hour but the main screen gave a countdown bar so you can see something is happening. I re-booted when it told me and it worked first time. It boots up more quickly than it used to under Windows and had even recognized my 2GB USB flash drive!
After a little play to ensure that it seemed responsive enough I dug out an old Belkin wireless card (802.11b) and was quite astonished when I plugged it in and the OS used it to find wireless connections without any further configuration. I had to tweak the wifi settings to connect to my secure network but had it working as a wireless laptop fairly painlessly.1
It's now a smart "netbook" (with a much better screen than the Acer Aspire One) for checking email while watching TV. The remaining issues are hardware specific2 and I'm not sure I'll get around to fixing them, e.g. recognizing the function key buttons for changing brightness and volume & the second touch pad key doesn't do anything. All in all I'm pretty delighted to turn a useless brick into a nicely functional spare laptop.
Footnotes
[1] The old Belkin wireless card is so out of date that it can't support an encrypted connection so security on this laptop is reliant on screening by MAC address. In the process of testing it out I found wicd is a neat free Linux graphical tool for sniffing out and managing your wireless connection. I have just bought a cheap 802.11g card off eBay to solve the security problem.
[2] The hardware side remains a puzzle. The E500's BIOS is dated 1999 and there's a new BIOS that helps to solve the problem of buttons being available to non-Windows OS's (see discussion). Having reformatted the disk I can't install the new BIOS to flash (using a .exe file that HP have available) or (for some reason I can't fathom) run DOS from a floppy even with it set as the first boot device.
Postscript
I have tried booting from CD using the latest Puppy Linux (Dingo). It runs well, possibly faster than Xubuntu but I haven't managed to map the keyboard touchpad correctly yet. If I get this working I'll give it good trial as Xubuntu tends to take a couple of seconds to change screen tabs when running Opera, while I haven't noticed any real performance problems with Puppy Linux so far. When you think about it, it's pretty impressive to be able to run the latest version of the Opera browser on such an old machine.
Saturday, August 9, 2008
How to add 8GB of memory to Sony Ericsson K750i
My previous memory stick in my mobile phone was a 4GB MS Pro Duo card. This is the maximum the phone is supposed to be able to cope with. I took a slight risk and paid £23 for an 8GB MS2 card (with Pro Duo adapter) with the intent of extending my mobile's life as a thrifty guy's iPod.
Initially there seemed to be a problem reliably writing files but after re-formatting and using a card reader (rather than the phone cable) to update files, it seems to do the job. I formatted using DOS with the command FORMAT E: /FS:FAT32 /A:4096, check this discussion as to why I chose these options. The phone status only reports a 4GB card but it actually does cope with 8GB.
I'm amazed to fit such a large card on a three year old mobile phone. This is enough space to take a large MP3 music collection (about 50 CD's worth of music, including 15 hours of Wagner's Ring of the Nibelung), 40 podcast subscriptions, a couple of free audio books, various maps supporting my GPS bluetooth gadget, document backups and 2.5GB spare for future growth.
For document backups I use TrueCrypt to keep an encrypted 400MB disk image which can be mounted on my Mac or a PC that includes all my scanned documents over the last two years (I use a Fujitsu ScanSnap scanner to keep PDF versions of bank statements, tax bills etc.) as well as other key reference documents. This may seem an odd thing to keep on the phone but if I was on holiday and my laptop got stolen I could still print out identity documents if someone lent me a PC. By using encryption if the phone was stolen at least I wouldn't worry about my ID being compromised.
My old 4GB memory card? This is now in my pocket camera (Sony T100) giving enough space for 3 hours of 640x480 video or 1,600 photos at 2592x1944 (5MB) resolution.
Initially there seemed to be a problem reliably writing files but after re-formatting and using a card reader (rather than the phone cable) to update files, it seems to do the job. I formatted using DOS with the command FORMAT E: /FS:FAT32 /A:4096, check this discussion as to why I chose these options. The phone status only reports a 4GB card but it actually does cope with 8GB.
I'm amazed to fit such a large card on a three year old mobile phone. This is enough space to take a large MP3 music collection (about 50 CD's worth of music, including 15 hours of Wagner's Ring of the Nibelung), 40 podcast subscriptions, a couple of free audio books, various maps supporting my GPS bluetooth gadget, document backups and 2.5GB spare for future growth.
For document backups I use TrueCrypt to keep an encrypted 400MB disk image which can be mounted on my Mac or a PC that includes all my scanned documents over the last two years (I use a Fujitsu ScanSnap scanner to keep PDF versions of bank statements, tax bills etc.) as well as other key reference documents. This may seem an odd thing to keep on the phone but if I was on holiday and my laptop got stolen I could still print out identity documents if someone lent me a PC. By using encryption if the phone was stolen at least I wouldn't worry about my ID being compromised.
My old 4GB memory card? This is now in my pocket camera (Sony T100) giving enough space for 3 hours of 640x480 video or 1,600 photos at 2592x1944 (5MB) resolution.
Thursday, August 7, 2008
How to write a spreadsheet formula for ISBN-10 to ISBN-13 and ASIN
I wanted to convert 10 digit ISBNs to the new 13 digit format and vice versa for my "checking second-hand book prices given an ISBN" spreadsheet. It turns out that (for the moment) any ISBN-13 starting with 978 can be converted to an ISBN-10 and this will be the same as the ASIN used by Amazon, so this can be used to look up their data. The problem is that the last digit of the ISBN may change due to it being calculated using a different ISBN standard, so to convert from one to the other your spreadsheet needs to do the checksum calculation.
The following formulae are based on a 13 or 10 digit ISBN in cell A3 and cell A6 reserved for a check digit calculation. These should be in one line in a spreadsheet cell, the layout here is to help readability.
Formula to create ISBN-13 from ISBN-10
Formula to create ISBN-10 from ISBN-13 (starting with 978)
To calculate the check digit (A6)
The following formulae are based on a 13 or 10 digit ISBN in cell A3 and cell A6 reserved for a check digit calculation. These should be in one line in a spreadsheet cell, the layout here is to help readability.
Formula to create ISBN-13 from ISBN-10
=if(
len(A3)<11,
concatenate(
"978",
mid(A3,1,9),
mod(
mid(A3,1,1)*3+
mid(A3,2,1)+
mid(A3,3,1)*3+
mid(A3,4,1)+
mid(A3,5,1)*3+
mid(A3,6,1)+
mid(A3,7,1)*3+
mid(A3,8,1)+
mid(A3,9,1)*3,
10
)
),
A3
)Formula to create ISBN-10 from ISBN-13 (starting with 978)
=if(
len(A3)>10,
concatenate(
mid(A3,4,9),
if(A6=10,"X",A6)
),
A3
)To calculate the check digit (A6)
=if(
len(A3)>10,
mod(
mid(A3,4,1)+
mid(A3,5,1)*2+
mid(A3,6,1)*3+
mid(A3,7,1)*4+
mid(A3,8,1)*5+
mid(A3,9,1)*6+
mid(A3,10,1)*7+
mid(A3,11,1)*8+
mid(A3,12,1)*9,
11
),
""
)
Tuesday, May 27, 2008
Track Flickr group membership history using iMacro
| User Guide | This script keeps a running log (every time you execute it), by updating a discussion message and/or saving a snapshot of group memberships. For the running log you have to create a message in each Flickr group you are an administrator for (or specifically declare), called "Member count". This log keeps a historical record of "date, membership total, total number of items". Before adding a new log entry it checks if the last entry (and the one before that) was less than a fortnight ago and updates it semi-intelligently. |
| Why? | I created this script as there is no easy alternative for keeping a history of membership for restricted groups in Flickr. |
| Notes | I'm an administrator for 9 Flickr groups and maintain membership logs in 4 other groups. Watching the macro chug along updating the logs is quite satisfying. It takes 10 seconds per group (loading 3 to 4 web pages each time and added waiting time, to avoid possible page freezes, composes most of that time) but this can increase up to three-fold depending on Flickr traffic. For a macro that I only need to run once every one or two weeks that doesn't seem too shabby. |
[Source code now maintained at Sourceforge.net]
| iMacro setup | iMacro installs itself with some example JavaScript files (.js) which are visible in the folders that iMacro shows you in Firefox. If you find the location of these folders on your hard disk (on the Mac these are under /<your_username>/iMacros/Macros/) and then save the script in this location with a ".js" extension you should be able to see the file when you refresh the iMacro folder list in Firefox. You should then be able to play the script from within iMacro (you have to already be logged in to your Flickr account and have created "Member count" discussion topics for groups you want to log). In the first instance I suggest you try the test test version which will run fully and show you the intended changes in the detailed change log but will not actually commit them. See wiki.imacros.net for further help. |
Labels:
Flickr,
Flickr Discussion,
Flickr Group,
iMacro,
JavaScript,
scraping
Monday, May 26, 2008
Flickr iMacro script to invite all your Flickr friends to a group
There was no automatic way to invite all your friends to join a group so I knocked up this quick script to take you from any group main page to the invite page, extract your list of friends (and no other contacts) and then send off the invite. The invite only goes to friends not yet in the group and not previously invited so you will not be bugging them with unwanted spam.
Note that more than 500 friends may result in time-out errors waiting for Flickr to respond. In this situation you may be better off inviting a few hundred at a time by recording an iMacro selecting the first checkbox on the invite page, then generalize it by removing the ATTR=NAME: and copy that line 200 times but change POS=1 to POS=R1 so that the next checkbox relative to the cursor position is ticked each time. When you've trimmed to a more manageable number then this script can apply again.
[JavaScript source code START]
Note that more than 500 friends may result in time-out errors waiting for Flickr to respond. In this situation you may be better off inviting a few hundred at a time by recording an iMacro selecting the first checkbox on the invite page, then generalize it by removing the ATTR=NAME: and copy that line 200 times but change POS=1 to POS=R1 so that the next checkbox relative to the cursor position is ticked each time. When you've trimmed to a more manageable number then this script can apply again.
[JavaScript source code START]
/*[JavaScript source code END]
Description:
JavaScript for iMacro to create a block invite for all your
friends (but not family or other contacts) to join a Flickr group.
For more information see http://useroffline.blogspot.com
Assumptions:
- You have iMacro installed.
- You have your group's main page currently displayed.
Why:
There is no block invite facility built into Flickr.
*/
// Get friends list
var friendArr=new Array();
iimPlay("CODE:\
TAG POS=1 TYPE=A ATTR=TXT:Invite\n\
TAG POS=1 TYPE=A ATTR=TXT:Choose<SP>from<SP>your<SP>contacts?\n\
TAG POS=5 TYPE=TR EXTRACT=HTM\
");
// Tidy up extracted data
friendArr=iimGetLastExtract(1).split("name=\"");
friendArr.splice(0,1);
for(i in friendArr){
friendArr[i]=friendArr[i].split("\"")[0];
friendArr[i]="TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=NAME:"+friendArr[i]+" CONTENT=YES";
}
iimPlay("CODE:"+
"' Total no. of friends = "+friendArr.length+"\n"+
friendArr.join("\n"));
// Send the message
iimPlay("CODE:\
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=NAME:Submit&&VALUE:PREVIEW* \n\
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=NAME:done_send&&VALUE:SEND*\
");
Subscribe to:
Posts (Atom)