Tuesday 26 July 2016

Today's Linux Experience: Virtualisation Tools

One of the great things about the major desktop OSs (Windows, OSX and Linux) is that they all have software based hypervisors available to let you run other operating systems as virtual instances in a window on your desktop. When I was getting into PC computing in a big way, the only option we had for running multiple OSs on the x86 platform was by setting up a PC to dual boot. This is a messy system that is hard to maintain and can cause some problems with compatibility of different OSs with a boot manager. At the Polytech there would be dedicated suites for teaching a particular class that had the specific operating systems needed for that class installed on the PCs in that classroom and the class could only be taught in that classroom. But then along came viable virtualisation platforms. The Polytech became a Microsoft school, and I was told they used two VMWare servers to run all of their instructional virtual servers on for all of the different classes. When we went to do a class, we would just grab a pre-configured virtual machine instance and copy it to our local workstation's hard drive and then we could use it in any classroom on the campus or even at home with the free VMWare Player.

The basic types of virtualisation are running in a bare metal hypervisor, like a Hyper-V server, in which everything else on the server consists of instances of different virtual machines, or software based hypervisors which run in a window on a desktop PC. Even the Mac platform can be virtualised these days, although the hypervisor can only run on Mac hardware. Virtualisation is one possible option for getting around the limitations of your favourite software package not being available for the host OS of your computer. On the x86 platform we have more choice than on OSX, so I am not going to look at the latter at all here. The options for Windows have changed from Virtual PC (last produced for Windows 7, which used it to provide the "XP Mode" VM) into a specific Hyper-V platform on higher spec editions of the desktop OS. Unlike earlier instances of VPC, Hyper-V requires specific hardware support, e.g. VT-x or AMD-V implemented in CPU and motherboard. Hyper-V obviously isn't an option for Linux, but here we can draw on two other software products that are also available for Windows. These are VMWare and VirtualBox.  

I have tested both VMWare and VirtualBox on my Linux computers. VMWare is a commercial product that has a free "Player" edition available for various platforms. Due to competition the so-called player has been enhanced to include VM creation capabilities. Installing it onto Linux can be tricky as at times this will require additional modules to be compiled into the kernel, which means you need to have the appropriate minimum version of GCC and the source header files installed as well. The other issue I found was that after using it for a while it would refuse to start up at all. I can't recall the error message but it was not easy to work out a resolution so I gave up on the product at this point. VMWare requires hardware virtualisation support in your computer like Hyper-V Platform and the first edition of Virtual PC for Windows 7 (previous VPC editions did not require this, and the Windows 7 version was later altered to remove this minimum requirement). I noted this when I tested it on one of my AMD E350 systems and unexpectedly got the message that there was no hardware support for virtualisation. At this stage since neither of those systems is now running any Linux edition (both having been pressed into use as backup Windows computers) I have no idea if a Bios upgrade from Gigabyte fixes the problem since the CPU supposedly should supporting AMD-V.

So now I am using VirtualBox due to the tricky to resolve VMWare error messages. Unlike VMWare, VirtualBox is completely free. In fact, it is FOSS, and it can run on many hardware platforms, including OSX, and can also run many guest OSs, also including OSX (on Apple hosts only). Hardware virtualisation support is not always required, however Windows 8 and later and some other OSs as guest mandate it as do 64 bit guests. Multiple monitors are supported. One disappointment has been USB support. I had hoped to have a VM able to run my camera's download software but the VirtualBox manager was unable to detect the camera when plugged in, although I have since learned that there is an extension package that may be needed. So that is where virtualisation has let me down, but maybe this USB thing will work better in future editions of VirtualBox. Other than that I have found it to work very well with a Windows 7 guest and a Lubuntu guest tested out so far. 

Linux users also have additional bare metal hypervisor options available but that is outside the scope of this posting.


Sunday 24 July 2016

Bits and Pieces

Old server or desktop chassis make great little tables to put stuff on next to your desk. So that I don't spill that drink on my keyboard while I am writing my assignments. It is another step along the way in getting everything set up in the house the way it needs to be. The living room is looking a lot better with things getting put in the right place and made tidy. This has been pushed along in a big way this week because I have started my studies for this semester and need to have everything set up for this. The bedroom is also getting a makeover as an alternate study location and I am making a keyboard slide to go under the desk there. It will also need a 2nd computer running Windows to work with the scanner so I have fitted a screen mount post to the side of the desk. That means both the bedroom and the living room will have two PCs each. I have a couple of old USB KVMs to mount under each desk to switch the keyboard and mouse (but not the screen) between computers. Each computer has its own screen(s) rather than switching them through the KVM. This is because the KVM can only switch one screen, which is useless if you have more than one, and because these KVMs only have VGA connectors. I am using Logitech Mk270r wireless keyboard/mouse sets at both locations.

MS is apparently releasing Windows 10 for the Nokia Lumia 635 Real Soon Now. Vodafone in other parts of the world has released it to their customers, but I suppose little old NZ will be last in line as usual. It will be interesting to see if Cortana is still vapourware for NZ or whether MS have pulled their finger out and got it out the door this time. I'm not too bothered as I am not going to use my Lumia unless there is a much wider range of apps released for it. Win10 is supposed to cater for this by allowing Android apps to be released for Phone, although only if they are recompiled under the Win10 platform. MS should have gone the whole way and embedded the Android APIs but I suppose there would still be a problem of where to source apps, so I suppose this makes more sense.

I have found that Ubiquiti 802.11n Unifi access points can give faster speeds than the wireless router that Vodafone supplied me with. So a UAP is installed in the right place to beam a signal out to the sleepout and also provide the wireless for the house, in place of the Netcomm router, which is reduced to being a gigabit switch and DHCP server. The computer in the sleepout uses a Edimax 802.11ac USB wireless adapter. Although the access point isn't working on 802.11ac, it doesn't really matter because the line speed on my home broadband connection is only a maximum of 50 Mbps which is well within its capabilities.

Vodafone have at last brought the cost of tablet share down to zero in a special promotion lasting until the end of July. I have been pretty tightfisted about this but I just don't see why I should have to pay $10/month extra for the tablet share plan when I can tether the tablet to my phone for no extra cost. The tablet share SIM will go into a Vodem for my tablet as it doesn't have a sim slot of its own.

The "main" PC is getting a memory upgrade. As running a lot of open browser tabs gobbles up the memory, I am getting another 8 GB for it, which will take it up to 20 GB. I will have to also resize the partitions on the SSD to bring the swap partition up to 40 GB to match. The computer's motherboard was specially selected by me because it is capable of addressing 32 GB with four DIMM slots.


Friday 22 July 2016

Dodgy NZ E-Commerce Sites - Your details can be stolen

Today there is a report in the paper that the NZ Hunting and Fishing shop's website was hacked and customers' credit card details were stolen. Customers had noticed unusual activity on their credit cards.

I have personally used a number of e-commerce sites operated by bonafide New Zealand businesses. In the rush for these businesses to open up online shops to cash in on the Internet trade, it is very important to note that there is no guarantee that your credit card details will be collected or stored in a safe manner.

It is important to note that there are different ways in which e-commerce sites can process your order. This can be either online or offline. The online processing should happen through a secure website and usually will make use of a reputable third-party payment processing site. For example, PayPal offers such a service internationally, and there are sites of this nature operated in New Zealand.

Offline processing is entirely different and is, in fact, used by a lot of shops which do not have the money to spend on an online site. These sites in my experience are engineered more cheaply and are the ones to watch out for, as some of them do not even use security certificates, and since they collect your credit card details on their own site, you have no guarantees that the site is engineered to resist hacking and stores those details with a high degree of security.

We of course do not know the details of the Hunting and Fishing hack but some kind of security flaw is a likely scenario and there are many possible exploits such as SQL injection or server vulnerabilities that can be used to get into a site and steal details. The concern is that people are still engineering and deploying insecure websites or that companies that own them are not spending money on making sure their site is kept secure and all necessary updates and patches are applied in a timely way.

I think that the Government should look at regulating online trading so that people can have confidence that their personal details are being kept safe when they make purchases from a New Zealand e-commerce site. 

Monday 4 July 2016

Today's Linux Experience - Choosing a Web Browser [2]

Last week I wrote about choosing a browser for Linux. Today I put my thoughts into effect and set up Firefox Developer by importing bookmarks from Opera into it and syncing them. However it hasn't taken long to discover problems with using Firefox for all the stuff I used Opera for.

First problem is for pasting images from the Clipboard into a Facebook post. Out of the box FFDE does not allow you to do this. Each time I had to save the snapshot to a disk file and then add the photo from the the file.

Second problem: although FFDE was quite usable at work on Lubuntu, a lot of problems developed when I tried to use it at home. I would keep seeing messages about scripts slowing down webpages, and then when one web page was slow to load, none of the other tabs would be visible while this was happening.

It may be the case that this is some kind of issue with Mint rather than FFDE in general, however I haven't noticed problems with FFDE on this system before. I am puzzled by these situations, but overall what this adds up to is I can't recommend Firefox as a viable replacement for these proprietary browsers just now.

The problem is that Mozilla has failed to keep up with the pace set by the proprietary browsers, particularly Chrome, and millions of users have voted with their feet. Having fallen off the pace, Mozilla now seems unable to regain the lead they once had. It's a long time since I seriously used Firefox for anything other than some undemanding situations where knowing it wasn't leaking data to a vendor was the most important consideration. It is still my browser of choice for installing on servers, and does get used as a "spare" browser quite often in work and home situations (I tend to have dedicated Opera and Chrome to specific tasks, each with its own set of synchronised bookmarks customised to that set of tasks). 

FFDE has been good as a work browser with its own bookmark set as well, with undemanding web pages that don't take up a lot of resources. It seems, in a nutshell, that there is a tradeoff between FFDE's resource usage efficiency and performance. In other words you don't get something for nothing. The much vaunted memory usage efficiency that Mozilla touts as an advantage for FFDE means it doesn't always perform very well. On the other hand I have seen exceptional performance from FFDE when dealing with large numbers of thumbnails on Tumblr picture blogs, and on test it was able to handle hundreds of tabs open at a time displaying images without missing any of them. Regular Firefox, under the same circumstances, would have dropped quite a few thumbnails. So it seems FFDE electrolysis is good for some things, but still has a long way to go before it has excellent all-round performance.

Friday 1 July 2016

Today's Linux Experience - Choosing a Web Browser [1]

When it comes to web browsing, there is surprisingly good support from the big players. My favourite browsers, which are all installed and used simultaneously on Windows, Mint and Lubuntu, are Chrome/Chromium, Firefox and Opera, and all of them work well subject to certain considerations. 

With Chrome you can install the proprietary Google package of that name, or the open-source equivalent, Chromium (just as you can in Windows, except I never installed Chromium onto it). The important difference on Linux is that Chrome's built in Pepper Flash player, which is not available in Chromium, is a must-have because Adobe stopped updating their stand-alone Flash installers for Linux some time ago. Chrome is easy to install directly from Google's site, while Chromium is included in some distros (including Mint).

Opera is my choice of a WebKit compatible browser since Safari stopped being produced for Windows. It is easy to install directly from Opera's site. It is a very good browser with the main limitation being the lack of Flash updates mentioned above. I haven't got much more to say about it because it hasn't had the same amount of issues as some of the other browsers.

Firefox, which used to be my browser of first preference until Mozilla stumbled over multi-process tab support, has started to regain my confidence since they mastered the development of the Electrolysis extension, which is now part of the core package. This brings the much needed multi-process design to Firefox. One of the issues I had noted with the older design of Firefox was when browsing Tumblr image blog sites, a lot of images would not be displayed by FF because it struggled with large numbers of images on a page. Electrolysis fixed this problem and now that it has made it into the base Firefox product, not just the Developer edition, it has become a much better product. On most of my computers I have both the base and Developer editions installed. The base is incorporated into many Linux distributions, including Debian where it has been renamed Iceweasel, while the developer edition can be easily installed from the Mozilla website. Note that with Developer, the installer only extracts the image to a file path; you must still move the folder to a location on your PC and create the start menu shortcut (or x.desktop file for Ubuntu-based distros) to make it go.

Although the Flash issue will keep me from switching back to FF as my primary browser of choice, it is possible it might regain that status in the future. One reason for this is that both Opera and Chrome are massive resource hogs when multiple tabs are opened. Another annoyance is that the latest version of Opera will only run a single instance, which is hard when you have multiple desktops. Even on the computer which I am writing on, which has 12 GB of RAM, I have quite a few tabs open in Opera and almost all of them have a memory footprint of around 800 MB. That's one of the reasons I don't use either it or Chrome much on a Lubuntu system; on something with only 4 GB of RAM there wouldn't be much left for other applications and the CPU would bog down with all the disk swapping. It is possible for Firefox to have an extension installed that can leverage the Flash player in Chrome to get around the lack of Adobe support. As Mozilla says, FF e10s uses way less memory than Chrome, so it is really going to be just a matter of time before I switch to using it instead of Opera for a lot of my stuff. Right now e10s isn't truly process-per-tab, but Mozilla is working on this goal. The bottom line for me has always been the superior extension support in Firefox and with this and the improvements in stability, it looks like a good time to switch back to it big time, perhaps without even worrying about Flash.