Lotus, Linux, Apple, Australia and whatever else crosses my mind...

Citrix remote desktop (RDP) on a Macintosh

Michael Brown  February 5 2010 02:35:43 AM
You probably know that there's a full Citrix client for the Mac (and Linux for that matter) but I've always had a real problem when I used the Mac version of Remote Desktop (RDP) to remotely login to my work desktop.  The problem was that I could never enter my password correctly, and I couldn't work out why.  I could always enter it correctly on the Windows and Linux versions of Citrix RDP but not on the Mac.  I've actually ended up locking myself out of Windows several times because of this, and then had to ring the IT helpdesk to reset the password.

Finally, this week, I found the problem: by default, the Shift key on the Mac doesn't work properly.  And because my Windows password (for my work desktop that I'm logging into) contains a character that needs the Shift key to type, there was no way I could ever enter it properly.

Here's the solution to the problem.

When you get to the RDP dialog (below) click on the Options button:

RDP Login dialog


Click on the Local Resources tab and switch the Keyboard drop-down to say
"On the local computer".

RDP Login options dialog



Your Mac Shift key should now work properly with Citrix Remote Desktop.

The Oscar Nominations for 2010 - how depressing

Michael Brown  February 3 2010 06:56:46 PM
The 2010 Oscar nominations have just been announced, and I, for one, can contain my excitement.

Moon was, by some distance, the best film that I saw last year, and it's criminal the way that it's been overlooked.  It's not been nominated in a single category.  In any fair world, it would be up for Best Picture, and Sam Rockwell would be up for Best Actor and Best Supporting Actor. (You'll have to see the film to get that one!)

Avatar is being tipped to sweep the board.  Now, I've loved James Cameron's other films, including Titanic, but Avatar was shit-boring. It doesn't matter how amazing a film looks if you know everything that's going to happen after you've watched the first ten minutes.

At least District 9, which was second-favourite from last year, has picked up a few nominations, including Best Picture, not that it's got a prayer of winning that.

Update

Der!  How could I forget the Damned United?  Michael Sheen - he of Frost/Nixon and the Queen - might just be the best actor on the planet today, but no sniff of an Oscar for him.  And the film itself is just so damned English - "it's about English Soccer in the 1970s, right?" -  that it was never going to register with the Academy.  

eBooks and piracy - does it have to be this way? Updated

Michael Brown  January 29 2010 06:00:00 AM
I got my partner a Bebook eBook Reader for Christmas.  It may not be the best eBook reader in the world, but for my money, it's the probably the best one available in Australia at the moment.

Sorry, but the Kindle doesn't do it for me.  I am so over proprietary formats that are polluted with DRM.  The fact that the Kindle can't play anything but its own format is a deal killer for me.  And before anybody screams "pirate!", take a trip to Project Gutenberg, where you'll find all sorts of out-of-copyright stuff, that's free and fully legal to download.  I can and play it all on my her BeBook too.  It's not just Shakespeare, Dickens and Thomas Hardy either: all the works of George Orwell are available, apart from 1984.  (Good luck with playing any of that stuff on the Kindle though.  Amazon doesn't want to you have free stuff.  I believe that the company has recently added PDF support to the Kindle, but it seems to have done so in a somewhat grudging manner; you can't change font sizes, for example.)

Getting paid-for eBooks is a different matter.  If you happen to live in a place where big companies like to treat their potential customers as complete suckers - i.e., anywhere in the world except the United States of America - then you're going to be sorely disappointed when you  look for them.  You'd think these publishers didn't actually want my money!  (Okay, Harry Potter's a different matter.  Ms Rowling has more money than she can ever spend in her life time, so if she says "no eBook versions" then that's her prerogative.)

The biggest book seller in Australia is Dymocks.  They sell eBook readers and eBooks too.  Australia is a rip-off country when it comes to books.  Far more so than even than the UK is, in fact.  In a previous post, I pointed out that JavaScript: the Defintiive Guide was nearly three times as expensive in Australia as it is in the U.S.A.  Still, that's nothing, compared to getting hold of the eBook version in Australia.  Dymocks doesn't have it at all.  End of story.  I couldn't find anywhere else in Australia that had it either.  Something to do with country-specific rights.  I've read, in fact, that Sony refuses to sell any of its eBook readers here because they don't have local publishing deals sown up yet.  A couple of weeks ago, I went down to the big Sony Centre on Sydney's George Street, and enquired about eBook readers (lack thereof).  The guy at the counter told me that they have people coming in to enquire about the readers "all the time", but they have nothing to tell them.  In theory, they might never be released here at all.

I am forced to go abroad for my eBooks then.  Amazon's out the picture on this one, because it's only concerned with selling its own Kindle-specific formats.  I happened upon eBook.com, which has a large range of eBooks at reasonable prices.  They have the electronic version of JavaScript: the Complete Guide at 40 USD at eBooks.com, which seems like a bargain at first, but less so when the paper version is only 31.50 USD at Amazon.com.  Okay, shipping the paper version abroad will push the cost up to 40 USD, but hang on a second.  The costs of producing an eBook is, essentially, nothing.  A paper book has to be printed.  Also, a paper book has to be physically shipped from A to B, where as the delivery mechanism for eBooks is another freebie.  So, shouldn't the electronic version of something cost less than the paper version?

Moving on, I tried to get Dan Brown's The Lost Symbol.  Again, it's not available at all at Dymocks; no Dan Brown books are.  At ebooks.com, it's a very reasonable 15 USD.  But there's a catch:

This book is only available to customers in the following countries: American Samoa, Bouvet Island, Faroe Islands, Guam, Heard and McDonald Islands, Northern Mariana Islands, Philippines, Puerto Rico, Reunion, United States, United States Minor Outlying Islands, Virgin Islands U.S.


Okay, let's try for some Tolkien.  Nada at Dymocks again.  EBooks.com has the Lord of the Rings (all 3 books) for 23 USD, which again, sound very reasonable...until you see that Amazon.com has the paper version for only 13 USD, although again, the overseas postage would push this price up to something approaching parity.  Still, the comparison is academic for me, because the eBooks.com version says:

This book is only available to customers in the following countries: Canada, United States.


I see a pattern emerging here..

The publishing industry is in deep doo-doo if it keeps this kind of rubbish up.  Country-specific, restrictive deals just aren't going to cut in the global economy.  I can buy all sorts of paper books from the U.S., and for much less than I pay locally.  Why on earth should I not be able to buy the equivalent eBooks from here too?  If legal downloads of any kind are to survive, they need to be at least as easy to get hold of as the pirate versions, and that's simply not the case at the moment... or so I'm told.


Update 23:00 (Oz time) on 29/01/2010

Strewth! (as we say here in Australia).

No sooner had I posted my rant above, when I spied this article in the Sydney Morning Herald.  Former New South Wales premier Bob Carr says:

"The arrival of these [eBook] devices shows how short-sighted publishers were to keep book prices high in Australia ... they shot themselves in the foot,""

Good on you, Bob!  (I taught him everything he knows, you know!)  Although oddly enough, he sits on the board of Dymocks, who are the worst offenders in this regard, IMHO.  Also, he blames high prices in Australia on the Federal Government's ban on parallel imports in Australia, rather than on the likes of Dymocks charging outrageous prices for no justifiable reason.

Incidentally, the whole article is also a reaction to the release of the Apple iPad, which isn't even an eBook reader as far as I'm concerned.


Apple iPad; "the Kindle is rooted" ha! ha! ha!

Michael Brown  January 29 2010 01:15:35 AM
Isn't the new Apple iPad a complete abortion?

You probably know the limitations by now:
  • No USB
  • No HDMI
  • No card reader
  • No Flash support
  • No multi-tasking (except for Apple's own apps)
  • No xVid or DivX videos
  • Generally DRMed up to the eyeballs
  • 4:3 format screen

and so on.

I mean, what on earth is the damned thing for?  According to some, it's an eBook reader, amongst other things.  One over-excited Australian blog even went as far as to say that the release of the iPad means the death of eBook readers, and that the Kindle is rooted, which is a polite(ish) Australian way of saying "it's fucked".

I think not.   And whoever writes tosh like this has obviously never tried reading a book on a dedicated eBook reader screen or an "ordinary" computer screen (or both).

I'm no lover of the Kindle, by the way.  It has its own DRM nightmares and I wouldn't touch it with a barge pole.  But reading on an eInk screen really is something else.  You've got to see it for yourself to appreciate it; and far too few people have, I think.  It's really so close to reading actual paper that after a while you forget the difference.

The iPad may have the swankiest LCD screen in history - I confess that I haven't seen one; who has?!!! -  but it's still an LCD screen, and that brings with it certain things:
  1. It has a refresh rate.  And that is noticeable to the human eye.  After a while reading on it, your eyes will start to hurt and you'll need to take a screen break.  Has anybody ever told you to take a "book break" or a "newspaper break"?  No, me neither.  The refresh rate also means that the screen uses power all the time. An eInk screen, on the other hand, uses no power to display a page.  It only takes power when turning a page.  It has no refresh rate either: the page is just there.  You can think of it as very advanced etch-a-sketch, if anybody still remembers those!  It won't hurt your eyes like a computer screen does.
  2. It's back lit.  Whoopee!  You can read it indoors.  You can't read it outdoors though; not if it's a bright day.  And I think you'll find that it's a lot easier to turn a light on when your inside than it is to turn the sun down when you're outside.  EInk screens can be read in bright sunlight.  The more ambient light, the better, in fact.
  3. It draws a lot of power (see also 1 and 2).  Mr Jobs claims that the iPad will last for 10 hours, which is actually an impressive figure.  Meanwhile, I've yet to charge my eBook reader since I got it for Christmas, which is just over a month ago as I write this.


So on the hardware front alone, I simply can't see that the iPad is going to kill off dedicated eBook readers.  Throw in the awful DRM limitations, and anybody with anybody sense will run a mile from this device.

Not that DRM has hurt sales of the Kindle, of course.  So, what do I know?

    How to *really* install Firefox 3.6 on Ubuntu

    Michael Brown  January 26 2010 03:47:24 PM
    There's an awful lot of advice on the interweb right not, purporting to tell you how to install Firefox 3.6 on Ubuntu.  And a fair bit of it is rubbish!

    Google "install firefox 3.6 on ubuntu" and you'll find that the dodgy advice breaks down into two broad types: "install from source" and "add the daily builds repository".


    1. Install from source

    You know the one: download the tar file, unpack it and then sudo copy it to a usr/bin/firefox folder.

    Although this will work, Firefox won't be integrated with your APT package manager and you won't receive any updates to Firefox without going through this whole routine again.  Thanks, but no thanks.



    2. Add the ubuntu-mozilla-daily repository

    This is a step in the step in the right direction.  At least Firefox is integrated with APT this way, and you'll get regular updates.... a bit too regular, in fact!

    You see, the thing about the ubuntu-mozilla-daily repository is that it gives you the daily builds of Firefox; i.e., the experimental builds, which probably isn't what you want.  The browser that you end up with isn't even called Firefox.  It's called Nakamora, with is the the code name for the experimental builds of Firefox 3.6.  (The Firefox 3.5 experimental builds are known as "Shiretoko").  To make things worse, these builds will identify themselves as as "Nakamora" in their User Agent, so you may find yourself turned away from some sites because they don't recognise that you're really using Firefox!  (You can change this setting, however.)





    How to actually install Firefox 3.6 on Ubuntu

    Adding the the ubuntuzilla repository is the way that I've done this.  This repository hosts only the latest official builds of Firefox (and Thunderbird and Seamonkey) for Ubuntu.

    To edit your repositories file, open terminal window and type:
    gksu gedit /etc/apt/sources.list


    Paste "deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" (without the quotes) at the bottom of the file and then save it.

    As an optional step, to stop you getting warning about untrusted sources from APT, you can type the following into a terminal:
    sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29


    To actually install Firefox, type the following into your terminal:
    sudo apt-get update
    sudo apt-get install firefox-mozilla-build


    (If you're a terminal-phobe, you can use the Synaptic package manager for that last step.)

    You should now have the Firefox 3.6 under your Ubuntu's "Internet" menu.  It will be called "Mozilla Build of Firefox".

    I've seen scripts floating around, which automate adding the ubuntuzilla repository for you, although that seems a bit overkill to me.  It's not that hard to add the repository manually, and once it's done, it's done.


    Some JavaScript books

    Michael Brown  January 24 2010 05:14:39 PM
    "Nearly all of the books about Javascript are quite awful. They contain errors, poor examples, and promote bad practices. Important features of the language are often explained poorly, or left out entirely."

    So says "javascript guru", Douglas Crockford, whose work you're bound to come across at some point if you do any serious research into the language.  Having thumbed through quite a few Javascript books recently, I have to agree with him.  Basically, most of these books treat JavaScript as if it's any other OO language such as C++ or Java, merely pointing out any syntactical differences along the way.  And if you've read any of Crockford's work - there's plenty around, just Google - then you'll know that JavaScript isn't quite like any other OO language.

    This is particularly true with regards to JavaScript's object-oriented nature.  Javascript is an object-oriented language but it has no classes!  That's a huge difference right there, and it's one that most JavaScript books that I've looked at don't even begin to address.  They simply treat certain types of functions as if they are classes, without explaining to the reader what's really going on.

    Still, there are some good books out there.  Let's start with the one book that Crockford does recommend:

    Javascript: the Definitive Guide by David Flanagan

    The bible.  Works as a reference book, pretty much the definitive one in fact, and also has good chapters on objects.  Just buy it!


    Then, of course, there's Crockford's own book:

    Javascript: The Good Parts by Douglas Crockford

    This is a very different beast.  It's short, at just over 150 pages, and it doesn't hang around on any one topic for too long.  Reading it is like "bang, bang, bang" one tip after another, which can be a bit overwhelming.  But nearly every tip's a diamond, so it's well worth sticking with it.  I must have read through it four times now, and feel that I've still only scratched the surface of what's he's getting at.  A perfect compliment to the Flanagan's Definitive Guide.


    My last recommendation is:

    Object Oriented JavaScript by Stoyan Stefanov

    Obviously, this one concentrates on object-oriented stuff.  I've not read it all yet, but the two chapters that I've have read have been excellent.  He leans heavily on Crockford at times - Crockford was one of this book's reviewers, in fact - but that's all to the good.  He takes the time to explain Crockford's OO ideas in far more detail than the man himself does in JavaScript: The Good Parts.  

    The JavaScript Apostrophe Bug

    Michael Brown  December 13 2009 04:16:33 PM
    Not actually a bug in JavaScript, but a bug that you're likely to program in JavaScript without even realising it.  This is especially true if you're dealing with Domino or any other back-end system where you have real user names.  By "real user names", I mean "Michael Brown" rather than "brownm".

    Here's the scenario.  You have some JavaScript code that retrieves a user's name from somewhere, whether through a Domino function (i.e. @UserName) or from an Ajax call.  Once retrieved, you assign that user name to a JavaScript variable, like so:

    var userName = $get(salaryNumber);

    (I'm using the JQuery $get Ajax call here, but it doesn't really matter how you retrieve the user's name.)  

    Using some DHTML we take this stored variable and write it out to your web page form for the user to click on a link, using the link's onClick event.  We end up with something like this on our web page:
    <a href="#" onclick="storeValue('Joe Bloggs')">Click to select blah, blah</a>


    Now, everything's fine as long the user name retrieved is "Joe Bloggs", but if the name is something like "Paddy O'Riley" you'll have this:
    <a href="#" onclick="storeValue('Paddy O'Riley')>"Click to select blah, blah</a>


    See the problem? The apostrophe is the same character as the single quote, which just happens to be a string terminator in JavaScript.  So, JavaScript chops the string as just "Paddy O", and the rest following that becomes garbage in JavaScript's eyes.  This may or may not stop your application dead in its tracks, but it will undoubtedly come back to bite you in the arse at some point, if you don't fix it.

    We need a it of defensive coding here.  We need to write the user's name on our web page with the backslash escape character before the apostrophe, like so:

    <a href="#" onclick="storeValue('Paddy O\'Riley')">Click to select blah, blah</a>


    Here's a Javascript function that I'm using to get around the problem:

    function formatApostopheWithEscapeChar(sourceString) {
    return(replaceSubstring(sourceString, '\'', '\\\''));


    There's no replaceSubstring function built into JavaScript, so I've borrowed this one from Tomas Nielsen:

    function replaceSubstring(exp, str, wit) { return exp.split(str).join(wit); }


    So now, when writing the value onto the web page, we'd need to the write function (e.g. innerHTML) to formatApostopheWithEscapeChar(userName) instead of just userName on its own.

    New NAB Name Picker for the Web

    Michael Brown  December 8 2009 05:30:00 PM
    Unbelievably, there's still no NAB name picker for the web in Domino 8.5x; not even using xPages.  Until IBM sorts that out, we're left to devise our own.

    The one included here builds on the excellent work of Scott Good and Ben Duboc.  All credit to Scott for coming up with the original.  Their web NAB picker easily the best that I've seen, but there were a few things about it that I thought I could improve, and here they are.


    First or Last Name Sorting

    The original sorts by first name only.  I've added a radio button to let you sort by last name too.  I've also changed the info that's displayed so you get to see the full Notes Name instead of the original's first name, last name and middle name arrangement.  I think this is essential for multi-domain NABs.

    Single name NAB Picker sorted by first name


    Single name NAB Picker sorted by last name



    Resizeable

    The original version had a fixed size; you could resize the dialog, but the data table remained fixed in size.  My one is dynamically resizeable.  Here's how it looks after I dragged it to a bigger size.

    Single name NAB Picker after resizing


    All this is for the multi-name version as well:

    Multi name NAB Picker after resizing



    Back end - JSON & JQuery

    JSON is the big coming thing for Ajax.  If you don't know it, time to learn!  Basically, it allows you exchange data in a format that JavaScript understands natively.  So, no more laborious code to translate JavaScript variables into XML and back again.  I managed to shorten the back end code a fair bit by using JSON.

    And you get all this goodness for free.  No need to change any views on your NABs.  The code makes use of the "OutputFormat=JSON" parameter of the ReadViewEntries command.  It was introduced in Domino 7.02, so you won't find this parameter documented in in the Designer Help for version 7.  It is documented in the version 8 Designer Help though, so it's safe to use.

    The JQuery JavaScript library is also very neat.  It doesn't really give you anything that you can't do in other ways, but it does simplify a lot of stuff that's a pain to write out in full.  It's particularly good for Ajax queries, as its name suggests.  It's also excellent at resolving cross-browser issues, which is how I came to use it here

    Once I'd decided to add a dynamic resizing feature to the dialogs, I then needed to interrogate the dialog's current size.  Wouldn't you just know that Firefox and IE do this in completely different ways?  Firefox uses the window.innerHeight property, whereas IE does Lord knows what.  Using JQuery, I could just write
    $(window).height()

    and I was sorted for any browser.

    Once I'd made that decision, I decided to use JQuery to do the Ajax calls and much of the HTML tag handling.  If you don't want to use JQuery, I've left the native Ajax calls in there too.  You just need to uncomment them.  You're on your own resolving the browser height problem though!



    Help yourself to the sample database from here:

    nabpickerjson_nsf.zip

    You'll need to copy all the design elements into your own application.  Namely:
    • One or both of the "NAB Picker" forms, depending upon whether you require a single name or mult name picker.
    • The (WebNABQO) agent
    • The JQuery.js page.  NB: if you already have a JQuery library in your organisation, then you won't need this.  In that case, you will need to modify the HTML Header on the two "NAB Picker" forms, so that the script tag includes your own JQuery library instead of the one I've embedded in this application.

    The pickerTest form gives you examples of how to call the dialogs.

    How to make the Notes 8 client fly under Ubuntu (updated)

    Michael Brown  November 26 2009 02:09:13 AM
    This is a rewrite of the same tip for Windows.  All credit to Andrew Pollack and the others who have blogged the Windows version in the past.

    To implement the same trick under Ubuntu, make sure you have the Notes client closed down, then open up a terminal console and enter the following:

    gksu gedit /opt/ibm/lotus/notes/framework/rcp/deploy/jvm.properties


    You'll need to enter your superuser password to edit the and save the file.  Find the vmarg.Xmx parameter, which should be easy enough: it's the first parameter in my file!  Now replace the 256 with 768 if you've got 2 Gig of RAM, or 1028 if you have more than that.  File->Save and you're done..

    It makes quite a difference in the speed of the client.  I tested on 8.5.1 under Ubuntu Karmic (9.10).

    Update 26/11/2009
    Also on Andrew Pollack's post (see link above) was a comment that altering the vmarg.Xms parameter might give an additional speed boost, although the suggestion was that this mainly benefits Sametime.  I changed that parameter from the default of 48 to 768 on my own PC, and yes, I think there was an extra speed boost noticeable.  (Thanks to Lars, for commenting on this post).
    .



    Notes 8.5.1 on the Koala

    Michael Brown  October 26 2009 03:35:09 AM
    I installed Notes 8.5.1 on the release candidate for Ubuntu 9.10, a.k.a. the Karmic Koala, which is an unsupported release for Notes.  (It would be, seeing that it's not even out yet!)

    The installation went fine, but I could not get any workspace, home page or replicator page when I started up the client.  Thanks to Michael Strong, who explained how to fix this in a post on LDD.  (NB: his fix is actually for Ubuntu 64-bit, but it worked for me for the 32-bit version by following step 7 only).  You need to replace some libraries in your /opt/ibm/lotus/notes folder with the ones that you can download from this url:

    http://linux-aha.de/wordpress/wp-content/uploads/2009/10/notes_libs_karmic.tgz

    Thanks to "Ronny" for posting those libraries.  I don't know who he is and his site's in German.

    Extract the four libraries from the .tgz archive file to a temporary folder; let's say that folder is /home/mikey/temp.  Open a console terminal and type:

    cd /home/mikey/temp
    sudo cp *.* /opt/ibm/lotus/notes


    You'll need to type in your superuser password for the second command.  That's copied the files where they need to be, but you now need to set the permissions on them.  The easiest way to do that is to fire up a superuser copy of Nautilus by typing the following in your console terminal window:
    gksu nautilus


    Careful now; the copy of Nautilus that you just started up can do anything!

    Navigate your way to the /opt/ibm/lotus/notes folder and highlight the four files that we need to modify.  These are the four that start with "libg".  With the four files highlighted, right click and choose "Properties"  from the pop-up menu, then switch to the Permissions tab.  You need to modify the permissions so that the root owner has Read & Write access (should be so already) and that the root group and the "Others" both have Read access.  Michael also suggests that the files need to have their Execute bit set, but it worked for me without doing that.

    Change library file permissions