Thursday 29 May 2014

It's PC Upgrade Time! (Part 3)

So the first Z200 arrived, and apart from some minor niggles with the network card, it's worked flawlessly and with great speed.  No more grinding hard drive or crashes from too little RAM.  And it boots up in less than 20 seconds!  

The old P4 was gutted, data ported over, hard drive wiped, and I even managed to get £30 from someone at work for the base unit.  I reused the monitor of course.

Well that was the first PC ("Proxima" - now replaced by "Deimos"). But how did I get on with the second? After a month or so of frantically selling rare Doctor Who toys on eBay I had finally built up enough credit in my PayPal account to afford another Z200...only to be told by Bargain Hardware that they had no stock left!

This was a real blow, as the Z200s were by far the cream of the crop.  Anything cheaper than them was (to my mind) far too underpowered, whereas the next model up (the Z400) was out of my price range.  Then for some reason I put "HP Z200" into the search field of eBay and what should come up ? An almost identical base unit, only with an i5 instead of an i3, and installed with Windows 7 Professional instead of Home Premium.  Bidding was up to £90, with 5 days to go, and this guy wanted £15 postage, compared to Bargain Hardware's free delivery.  So...if I knocked £15 off of the price I'd paid for the last Z200, that came to about £230.  I added a bit for the upgrade in CPU and OS, and placed a bid for £237.  Which immediately saw me as the highest bidder at £92.

Over the next few days bidders came and went, increasing the bid by £10 or so, only to be immediately trumped by me with my hidden top bid of £237.  Then came the day, another round of frantic bidding, and I was the winner - £225.

The PC arrived a few days later, with Windows 7 Pro already installed, and I could finally gut the last of the XP Pentium 4s ("Alpha") and port the data over to Deimos's new brother - Phobos.  The same spec as Deimos, but with that little CPU edge.  Nice.

Friday 9 May 2014

Enabling Java in Firefox on Linux

OK this just applies to my particular distribution - Mandriva 2011.0 - but it should be broadly similar for other versions.


Step 1 - Check for 32-bit or 64-bit Firefox

Type about:buildconfig in the Firefox address bar 

Underneath Build Platform you will either see "i686" for 32-bit or in my case "x86_64" for 64-bit.

Go to www.java.com and download the correct 32 or 64 bit version of the latest Java update.  In my case it comes in RPMs, so I can just download and install them.   Note that you should only be able to install either the 32-bit or 64-bit version, not both.  So if you accidentally install the 32-bit one, the 64-bit one won't install until you remove it.



Step 2 - Location of Java plugins

In my case these are in the folder /usr/java/In that folder are various sub-directories for each java update as I've installed them:

jre1.7.0_17, jre1.7.0_45, etc

As of writing, the latest is jre1.7.0_55

But helpfully Mandriva puts a symlink to the latest folder and calls it "latest".

So the folder /usr/java/latest/ is always the link to the last one I installed.  Within this folder is the folder "lib" and within that the folder "amd64" (or in the case of 32-bit, "i386").

Within this folder is the Firefox Java plugin - libnpjp2.so

 

Step 3 - The Firefox Plugin folder

Now then, there are two of these, one of which (if not both) will work. In fact they may be per-user and global. I don't know.  They are:

/usr/lib64/mozilla/plugins

(or /usr/lib/mozilla/plugins for 32-bit)

and:

/home/dave/.mozilla/plugins

Personally I use the one within my own home folder. A symlink of the Firefox Java plugin needs to be created here.



Step 4 - Creating the symlink

This is so easy.  Open a terminal as root, and execute the following commands:

cd /home/dave/.mozilla/plugins/
ln -s /usr/java/latest/lib/amd64/linnpjp2.so


That's it.  Done.  You shouldn't need to do that ever again, even if you install a later version of Java, because the symlink points to the "latest" folder, which in turn always points to the last installed version of Java.



Step 5 - Testing Firefox.

Restart Firefox and go to www.javatester.org