VirtualBox – configuring a Host-Only Network

I’m currently indulging in the pastime that’s sweeping the country – trying not to think about Brexit.
It’s a craze that’s even spread as far our political elite. In their case, it manifests itself in slightly different ways.
On the one hand, there are those who are refusing to accept any solution offered to maintain a “soft” border on the island of Ireland. As far as I can tell, they haven’t managed to offer any practical solution that they would accept as that would involve thinking about Brexit.
On the other hand there are those who are pushing for a new referendum because, apparently, some politicians lied when campaigning. Maybe someone was “Putin” ’em up to it ?

For my part, as I don’t quite have the space for a bunker at the bottom of my garden, I’ve decided to hide out in to a world of make-believe…well Virtual Machines at any rate.

I want to setup a CentOS Virtual Machine (VM) that I can then use as to clone environments to host various software stacks that I may want to play with.
I’d like to be able to connect to these VMs directly from my host OS, just like a real-world server. However, I’d also like to be able to connect the VM to the outside world occasionally so I can run package updates via yum.
The specific steps I’m going to go through are :

  • Install CentOS7 into a Virtualbox VM
  • Setup Host Only Network in VirtualBox
  • Create a Network Interface on the Guest to use the Host Only Network
  • Assign a static IP address to the Guest

The software I’m using for this is :

Before we get cracking, it’s probably a good idea to have a quick look at… Continue reading

Advertisements

New Dog, Old Tricks – how to save yourself some typing with sed

We have a new addition to our household –

Teddy


Cute and fluffy he may be, but he’s got to earn his keep. He can start making himself useful by helping me with this post.

It begins one Friday afternoon when an urgent request lands on my desk with a large splat.

The requirement is that some csv files be uploaded into the Oracle 11g Datbasae serving the UAT environment to facilitate some testing.
There are around 20 files, each with a slightly different set of attributes.
The files are currently sitting on the on the Red Hat Linux Server hosting the database.
I have sufficient OS permissions on the server to move them to a directory that has a corresponding database object in the UAT instance.
Nevertheless, the thought of having to knock out 20-odd external tables to read these files might leave me feeling a bit like this…


Fortunately, a certain Lee E. McMahon had the foresight to predict the potential risk to my weekend and wrote the Stream Editor (sed) program

Continue reading

Cocktails and Traffic Cones – party time with DVDs and Blu-Rays in Ubuntu

This title may evoke images of a rumbustious night out filled with exotic drinks and highjinks followed by a morning waking up in possession of a traffic cone, the acquisition of which has somehow escaped the wreckage of your short-term memory.
If this is the case, you may be a tiny bit disappointed. This is all about how to play and rip DVDs and Blu-rays on Ubuntu.
Whilst that may not sound like quite as much fun, it’s less to leave you with a raging hangover. It should however, enable you to enjoy your video on your OS of choice.
What cocktails and traffic cones have to do with all of this will become apparent shortly.

What I’m going to cover here is :

  • How to Decode and Play DVDs using VLC
  • How to Convert DVD and Blu-ray files to mp4 video using Handbrake
  • How to Transcode DVD and Blu-ray discs to Matroska (mkv) format using MakeMKV

This should give you all of the steps required to watch and – if required – copy movies, tv shows etc from an optical disc.

First of all though…

The Legal Disclaimer
The legality of ripping copyrighted material differs across jurisdictions. You may want to check the situation where you are before you follow any of the steps detailed in this article.

Whilst we’re on the subject of disclaimers…

The Taste Disclaimer
The subject matter at hand means that there is a strong temptation to include quotes and (possibly) oblique references to movies here and there. Of course I wouldn’t dream of stooping so low just to get cheap laughs…much.

Oh, one more thing…

Efficacy disclaimer – The steps described here will work most discs. In the rare instances where this is not the case do not seem to follow and discernible pattern.
For example, the same steps to persuade a dark comedy to present you with a Marmalade Sandwich (in mp4 format), may cause a loveable cartoon bear to fix you with a stare that’s harder than a coffin nail.

Moving swiftly on…

Continue reading

You have chosen not to trust… – Citrix Receiver and SSL error 61 on Ubuntu

After months of trouble-free operation, Citrix Receiver decided to wreak some havoc one morning last week.
Connecting to work (using Firefox on Ubuntu and Citrix Receiver for Linux 13.8) was trouble free as usual.
However, when I then tried to select a PC to remote into, Citrix informed me that …

“You have chosen not to trust Entrust Root Certification Authority – G2. SSL error 61”

At that point, I reflected that what I knew about Citrix and SSL certificates would fit on the back of a fag packet.
After some intensive “research” it should now fit into a short blog post…
Continue reading

Streaming Videos with Plex on Raspberry Pi

The recent Bank Holiday weekend in England provided me with a perfect opportunity to get on with some D.I.Y.

We have a collection of movie files, which I’ve stored on an external USB hard-drive. At the moment, these files are only accessible from the smart TV it’s plugged into.
I want to be able to stream these movies to the various Connected Devices we have around the house.

Time, once again, to call on my trusty Raspberry Pi 2 b-spec, running on Raspbian Jessie.

What I’m going to do is :

  • Mount my USB Drive on the Pi
  • Install Plex Server on the Pi to facilitate streaming
  • Install Plex Client on relevant Connected Devices
  • Create a Library containing all of my movies
  • Stream a movie whilst I wait for it to stop raining

Hopefully after all that, I’ll be looking at something like this :

plex

Before we do any of that however, we need to get the USB drive to work on the Pi…

Continue reading

The March of IDEs – Installing Visual Studio Code on Ubuntu

When I started programming, the world was black and white. I’d write my code in Vi on Unix ( Sequent’s dynix/ptx if you want to get personal) and then run it through a compiler to find any errors. End of story, [Esc]:wq!.
Then, along came GUI IDEs with their white backgrounds and syntax colouring.
Things now seem to have come full circle as the colour schemes currently en vogue for IDEs tend to look a bit like this :

Finding a lightweight, general purpose IDE for Linux has been something of a quest for me. It’s not that there aren’t any out there, it’s just that none of them quite seemed to be exactly what I was looking for. Until now.

Look, I know that programmers tend to be rather attached to their favourite editor/IDE and this post is not an attempt to prise anyone away from their current toolset. It is simply an account of how I managed to install and configure Visual Studio Code in Ubuntu to use for Python.

Hang on, lightweight ? We’re talking about Microsoft Visual Studio, right ?
Actually, Visual Studio Code (VS Code) is a rather different beast from the Visual Studio Professional behemoth that’s used for knocking up .Net applications on Windows.

What I’m going to cover here is :

  • Installing VS Code
  • Adding the Python plug-in
  • Adding a Python linter
  • Executing a program the simple way
  • Using intellisense for code-completion
  • Debugging a program
  • Executing a program inside VS Code

If you’ve stumbled across this post in the hope of finding some information about setting up VS Code for PL/SQL, I would refer you to Morten Braten’s excellent post on the subject.

Here and now though, it’s Python all the way… Continue reading

Keyboard not working in Citrix Receiver for Linux – a workaround

In technological terms, this is an amazing time to be alive.
In many ways, the advances in computing over the last 20-odd years have changed the way we live.
The specific advance that concerns me in this post is the ability to securely and remotely connect from my computer at home, to the computer in the office.
These days, remote working of this nature often requires the Citrix Receiver to be installed on the client machine – i.e. the one I’m using at home.
In my case, this machine is almost certainly running a Linux OS.
This shouldn’t be a problem. After all, the Citrix Receiver is available for Linux. However, as with any application available on multiple platforms, any bugs may be specific to an individual platform.
I was reminded of this recently. Whilst my Windows and Mac using colleagues were able to use the Citrix Receiver with no problems, I found the lack of a working keyboard when connecting to my work machine something of a handicap.
What follows is a quick overview of the symptoms I experienced, together with the diagnosis of the issue. Then I go through the workaround – i.e. uninstalling the latest version of the Receiver and installing the previous version in it’s place.
Continue reading