Friday, 14 February 2014

Java Issue with LibreOffice Base

Recently I have been mucking around with LibreOffice Base in order to enhance my personal knowledge on database structures and also using SQL with a different database engine other than PGSQL or EDB.

For those wondering what LibreOffice first of all is. LibreOffice is a free and open source alternative to Microsoft office, which can run on Windows, Mac OS X, Linux. Before it was called LibreOffice it was previously known as OpenOffice. When Oracle bought over Sun Microsystems, who primarily maintained OpenOffice, many people feared what would happen with their favourite open source office suite and so forked the code. Thus LibreOffice was born back in 2010. LibreOffice offers 6 different modules which are: Write (word processor), Calc (spreadsheet program), Impress (presentation program), Draw (vector graphics editor), Math (program for editing/creating mathematical equations) and Base (database management program).

I quite like the LibreOffice Base as it has a nice simple and easy to understand GUI (graphical user interface). The database engine it uses is known as HyperSQL or HSQLDB, which is a relational database management system written in Java. As it was written in Java though, I ran into a problem.

Originally on my Windows 8.1 machine I was running LibreOffice 3.6 which was a 32-bit install and had no problems running Base. However I installed the latest LibreOffice 4.2 in 64-bit and found the following error appeared when I tried to access my tables in Base.
"LibreOffice Base requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install a new JRE and select it under Tools - Options - LibreOffice Base - Connections."
I followed the on screen instructions as the message said and found it did nothing to fix the issue. I un-installed and reinstalled LibreOffice 4.2 and still had the same problem. I rolled back to LibreOffice 4.1.5 and still had problems. I un-installed Java and re-installed this as well and still had issues.

After hunting around for sometime I found what the issue was. I found that Oracle, who now provide and maintain Java, would offer the 32-bit run time environment to install by default. The reason for this is that most browsers run in 32-bit mode. Although Internet Explorer does have a 64-bit mode, this is not used often as many websites are not compatible with it. Oracle does however offer the Java runtime environment in 64-bit mode as well. Before I installed this I thought I would try one more thing. On one forum post I followed the following steps:

  1. Go to Start and then Run
  2. Alternatively press the Windows and R key together
  3. Enter C:\Users\<username>\AppData\Roaming\LibreOffice\4\user\config
  4. Click OK
  5. Locate the file  javasettings_Windows_x86.xml 
  6. Delete this file

After doing this I found that I was once again able to access my tables within LibreOffice Base.

Saturday, 3 November 2012

A Weekend and Two Days of Pain

Well last weekend I decided to make the leap and install Xubuntu 12.10. I will have to say Xubuntu installed like a treat. It is remarkable quick and responsive and was a pleasure to use.



I did customise it a bit though to get it to my liking. One of the things I did replace was Thunar with Nautilus. Thunar is nice and has some good features but it is also lacking in many other areas. One of the annoying things was that it lacked a feature to trust an executable file such as a .jar file. It was also not quite so easy to share files across the network. So this is why I had to go for Nautilus.

Another change I had to make was to remove the bottom panel and I replaced this with Docky which worked like a charm, although it did occasionally seem to crash but I think that was related to what came later.

The third change I made was to install GnomeDo which replaced the functionality of the Unity Dash which I really liked. I then installed all of my other software via the Ubuntu Software Centre which made life a doddle.

Xubuntu worked really well for me and as a desktop for productivity it is great, however the pain came when I went to install an AMD Graphics driver. Ubuntu 12.04 offered to install the driver for me but Xubuntu 12.10 did not. I thought this was initially a thing with Xubuntu but I later discovered it was not.

So I first downloaded the .run file from AMD's website and went to install the driver. After I had rebooted my screen it was set to the wrong resolution and registered that my monitor was running at 0 Hz. I found a way to uninstall this, after doing a bit of research and when I rebooted the screen was back to normal. So I decided to download the driver directly from the Ubuntu Software Centre. Again on the reboot the same thing happened. I once again uninstalled it and after a reboot installed a version of the driver which I had with Ubuntu 12.04. The exact same thing happened.

I did find that I could play Minecraft without the additional driver, however performance was poor and if I wanted to play a more intense game then I would need a dedicated 3D graphics driver. So after wasting a good part of my afternoon and evening on it I decided to try out another OS.

The choice I went for was OpenSuse 12.2 with the KDE desktop. Again the install was great and after booting up I removed all the fancy effects. Although KDE takes up more memory than XFCE I found that once I had removed the fancy effects it was pretty much as fast to use as XFCE would be.



I thought to myself so far, so good. I also found that I could install the latest driver for my graphics card without a problem. I also installed the Java run time so that I could then run Minecraft. Oddly enough I found that the .jar file would throw an error and when I ran this through the terminal I could see what the error was. After doing further research on this I could not find a fix that worked for me. By this stage I had wasted another afternoon and evening.

Again with OpenSuse running KDE was a wonderful desktop if I was just using it as a straightforward work environment, however I want my Minecarft! So I decided I would try the latest Ubuntu 12.10 and thought that it could not fail me. Sadly I was wrong.



Ubuntu 12.10 installed without a problem and when I booted up into the Unity interface I really liked the looks of it. I have to admit that I really like some of the small tweaks that the Ubuntu team had done since 12.04. Sadly though my time with Ubuntu 12.10 was met with more pain as I tried to install the AMD graphics driver. I found it suffered with the same problem as Xubuntu which to be honest did not come to me as a huge surprise given that Xubuntu is Ubuntu but just running the XFCE desktop pretty much.

I will have to say that the Ubuntu community are superb and there is a lot of support there. Sadly though time was ticking on and I needed to do something. By now it was Monday evening and I was stuck to know what to do next. I waited for a day and by Wednesday I decided I needed to do something. What I decided would be heretical in the eyes of the Linux community in general.

You see at work I use Windows 7 and with the advent of Windows 8 coming out I realised that I could be supporting customers using Windows 8 in the near future. Now granted I do not support Windows but I need to know my way around it. With Windows 8 being so different I thought that I would need to get to grips on how it works, so that I do not appear to be like an idiot to my customers. I already have Windows 7 on another hard drive which I sometimes use for games. It would only cost me £25 to upgrade. So taking in consideration the trouble that I have had and the practicality of having Windows 8 for work reasons I decided to upgrade to it. I ended up formatting my Linux partition to NTFS as well.

I have not used it too much but all I can say so far is that it is by far the best Windows OS I have used. Granted it takes a little getting use to but since I have used so many different environments in the past I am fairly use to change.

I will have to add though this is not to say that the Linux OS' are rubbish as I still have 5 machines that run different flavours of Linux and I have had no problems with them. Just for now though I will be sticking with Windows 8 on my main computer.

Saturday, 27 October 2012

Change from Ubuntu

Well today is the day I move away from Ubuntu for the first time within two years. The reason is not because of the way Canonical is taking Ubuntu. Personally I think Canonical are doing some pretty amazing stuff and I just wish that some people in the open source community would be a little fairer to them. Of course the truth is who cares what I think, but anyway getting back to the point.

Part of the reason is that I was looking at upgrading to Ubuntu 12.10 from the 12.04 LTS release. After reading some reviews I noticed that a few have mentioned that 12.10 feels slightly slower than 12.04.

Now don't get me wrong my machine has no problem at all running 12.04 and would easily handle 12.10. In fact in comparison to Windows 7 the Unity desktop is considerably lighter however in comparison to the other Linux desktops it is pretty bloated. It then brought something back to mind which was how fast Mageia 2 was with the KDE desktop and yet that was running in a VirtualBox. When I think of it, that is pretty remarkable since KDE use to be the whale of the Linux desktops but in comparison it is pretty fast.

For me it is more of a case that I want the lightest environment that is still a fully functioning desktop. I am quite happy to sacrifice appearance for functionality because give credit where due I personally feel Unity is the best looking desktop environment but this comes at a cost. I also feel that Unity is a very usable environment and I like the way it works but there are other options out there that work just as well but are lighter on the system.

This is a shame as Ubuntu appears to be gaining some traction in the gaming market but in terms of FPS (frames per second) it is one of the poorer environments to run your games on. Phoronix showed a comparison of Unity to the other desktop environments along with a serious of graphical performance tests. You can see this via the link below.

http://www.phoronix.com/scan.php?page=article&item=ubuntu_1210beta_desktops&num=1

When looking through the tests it is quite clear that Unity is considerably slower than the other desktop environments in terms of graphical performance. Even in every day use though it does feel slightly slower.

In fairness there is another reason why I want a change and that is that I just want a change of environments to work in. Who knows I may end up coming back to Ubuntu, but for now though I will give Xubuntu 12.10 a try instead.

Saturday, 25 August 2012

WebGL in Google Chrome on Ubuntu

Today when trying to play a small browser game I found that a small message was thrown which said that my browser does not have WebGL enabled. Just to briefly explain WebGL stands for Web Graphics Library and it is a JavaScript API which renders 3D and 2D graphics.

I found it odd since I knew that by default Google Chrome would have WebGL enabled. After doing some research into the matter I found that my ATI graphics card was on Google Chrome's blacklist of graphics cards, which meant that the hardware graphics acceleration was disabled. After doing some more hunting around I found a small command line which fixed the problem. I just used the two steps below to fix my problem.
  1. Open a terminal window by pressing Ctrl+Alt+T
  2. Copy/write in the command line below

    google-chrome --enable-webgl --ignore-gpu-blacklist
This launched a new session of Chrome and I found that I was able to play the browser game.

Thursday, 23 August 2012

Ubuntu Coke

This weekend just passed, me and a few others walked down to Frampton Marsh (RSPB nature reserve) . The walk took much longer than it should have as we were stopped by a number of horses along the way and found that parts of the public footpath were over grown and so we had to make our own paths. Anyway after slightly more than 3 hours on a hot day I got through my supply of water so I was glad to find that they sold refreshments in the tourist centre at Frampton Marsh. Amusingly I discovered that they sold my favourite OS' coke: Ubuntu Coke.



As you can see the Ubuntu Coke is part of the Fairtrade which made me feel all the happier. The description on the back of bottle said this:
"Ubuntu: "I am because we are". The Fairtrade Certifcation Mark is your independent guarantee that the Fairtrade ingredients in this product have been certified in accordance with international Fairtrade Standards. www.info.fairtrade.net. Plus, Ubuntu will donate 15% of all of our profits to development projects in Malawi with our Ubuntu African program. Visit www.ubuntu-trading.com "
I did not know that Ubuntu had its own coke but I guess we learn something new every day. So keep your eyes open for it in stores near you.

Sunday, 19 August 2012

How to play Blu-ray Discs in VLC on Ubuntu

If you have a Blu-ray player on your computer you cannot just insert a Blu-ray disc and start to play it in your favourite media player, the reason is that Blu-rays are encrypted and hence require the correct codecs. Chances are when you bought your Blu-ray player it came with a CD which provided its own media player and would allow you to watch Bly-ray movies.

To no surprise this will only work on Windows, so people like myself who use a Linux based OS are left in the dark. It is only recently that I discovered a post on another site which explained how to install the codecs so that you can play a Blu-ray disc that came out before 2012 in VLC media player on Ubuntu. The original post can be visited below:

http://www.webTable Cellupd8.org/2012/08/how-to-get-encrypted-blu-rays-working.html

This includes information on why it is only Blu-rays before 2012 and a more detailed guide. If you cannot be bothered to read the post then you can just follow the steps below:
  • Open your terminal
  • Type/copy in the 5 command lines below:
sudo add-apt-repository ppa:n-muench/vlc
sudo apt-get update
sudo apt-get install vlc libaacs0 libbluray-bdj libbluray1
mkdir -p ~/.config/aacs/
cd ~/.config/aacs/ && wget http://vlc-bluray.whoknowsmy.name/files/KEYDB.cfg3
  • Open VLC media player
  • Select Media > Open Disc 
  • Set Disc Selection to BluRay
  • Make sure that the No disc menus is ticked
  • Browse for the Blu-ray disc
  • Click Play
Your Blu-ray will now be able to play.

At least now I can begin to increase my Blu-ray collection and watch movies in their HD form.

Wednesday, 15 August 2012

Joys of Adobe Flash

Just recently I had problems playing flash based videos through Google Chrome. In fairness this is only on Ubuntu. When I would play a video it would just start to stutter in places and the sound would fall out of sync with the video.

I first noticed the problem back when Chrome update to version 19 and I have only recently discovered why this was a problem. Chrome has a built in Flash plug-in and this plug-in was updated to version 11.3. For whatever reason this does not play nicely in Chrome on Ubuntu.

To fix the problem I used the steps below.

  1. Open Chrome and type into the address bar: chrome://plugins
  2. Click on Details to view more details about the plug-ins
  3. Click the Disable link on the Shockwave Flash  11.3
  4. Download and install Flash 11.2 for Ubuntu which can be found in the Software Centre
  5. Open up a Terminal window
  6. Type/copy in the two following lines:

sudo mkdir -p /opt/google/chrome/plugins
sudo cp /usr/lib/flashplugin-installer/libflashplayer.so /opt/google/chrome/plugins

When I went to view the plug-ins for Google Chrome I noticed there were 4 Flash plug-ins. Shockwave Flash 11.2 was present there.

After doing this I noticed that any videos using flash worked like a treat. Problem sorted!