Friday, 27 April 2018

New bits for "old" computers [12]

The Win10PC has got itself a bluetooth keyboard now as well as the wireless mouse it already had. The Logitech K380 bluetooth keyboard works quite well and is nice and compact, it can be used with up to three devices and has a battery life up to 24 months. I had an existing Promate bluetooth receiver that is plugged into one of the USB ports on the back of the computer and which works well with the built in Windows 10 Bluetooth drivers. 

After looking at a lot of backup options I have settled on rdiff-backup as being the best solution for what I want to do, since it will actually produce something that looks more like a mirror, unlike all these deduplicating solutions the weakest feature of which is losing one file chunk can result in losing a lot more than one file. I am now trialling rdiff-backup with a backup set from mainpc to see where I can go with it.

I have also installed Btrfs on my computer so as to be able to compress the backup volume as this is the simplest way of getting more backup data onto a disk. rdiff-backup can do multiple generations of backups with its differencing system, so this is worth looking at, even with two main backup disks. rdiff-backup supports SSH, so I might also have that option to be able to make a backup happen via serverpc as originally I had considered, and even multiple backups per disk.

Other options for transparent compression include OpenZfs, but it is really a bit too complex for me to get my head around, so I will just be using Btrfs for now. After following some tutorials online I got SSH working with passwordless login and immediately realised why I never could get it working with borg. Simply because the borg examples failed to clarify that the command was to be issued on the target rather than the source whereas I thought it would be the other way round. However, as I have determined since, borg isn't the preferred backup solution for my needs and I am happy with using rdiff-backup. At the moment serverpc is backing up the data from mediapc and after that I will test it doing its own backups.




Saturday, 21 April 2018

New bits for "old" computers [11]

After looking yet again (as I must have already done hundreds of times) at where I could put a fourth keyboard on the desk, I cut up a spare piece of melamine shelf and then screwed it to the desk top on the left hand side and that is where the Win10PC's keyboard and mouse now sit. Whereas last time I was going to adapt the keyboard slide on the LHS which I currently use for my drinking cup etc, and got as far as cutting another melamine shelf to the extra width, I am now proceeding with this solution. Although the keyboard is further away this way than is desirable, I have also installed TightVNCserver on the computer and can use Remmina to connect to it from MainPC to make use of it more convenient without having to switch one of the two switchable keyboards to the Windows computer. We have to use VNC because Windows 10 Home Edition does not support RDP. 

I have been editing aerial photo collections in Qgis again and have now come up with a way to script from a QLR file to copy files automatically from a collection. The manual steps are:
  1. Open the QLR file in Notepad++ on Win10pc
  2. Extract all the <layername> lines by using a Find in Open File command
  3. Replace the XML tags with blanks to convert this to just a list of files
  4. Save this as a text file
  5. Run a simple Powershell script using Get-Content to read the file names from the file and then use Copy-Item to copy all the files from a source folder to a destination folder.
As time goes on I may well use Select-XML to directly convert the XML from the QLR file to a filename and copy as is, the tricky part is to be able to convert paths with forward slashes in them to backslashes and so forth, so in this case the Powershell script has hardcoded paths in it. Works like a charm and, as usual, is saving a lot of disk space. In the most recent case only about 20% of the files (0.1 m Dunedin suburban area) are actually needed and the result is about 10 GB disk space saved.

I still haven't got onto the backup solution but I plan on doing some testing over the next couple of days as I really do need to get this happening.


Friday, 13 April 2018

New bits for "old" computers [10]

As I detailed recently I have changed my desk layout to allow four keyboards to be used easily and have also changed the screen layout to suit. I had four wireless keyboards to make this happen. Unfortunately the MS multimedia keyboard I use with the win10pc has gone wonky and having go slows and keys randomly sticking and repeating so that has gone in the rubbish.

Since it is hard to get enough different wireless keyboards and especially multimedia keyboards for my layout I have decided not to bother with replacing it. Instead the left hand keyboard slide (the one where I often have drinking cups/glasses) will be adapted to become wider and deeper so it can double as a storage/usage location for the Genius mini USB keyboard I have. This will be used with a regular wireless mouse for the relatively small amount of time that I need to use this setup, since I can always switch one of the two main keyboards to this computer. 

The regular backups will be started this weekend. serverpc will in fact act as a server for all the computers but they will each have their own repo, which for mainpc will be on one particular 2 TB backup disk, while serverpc and mediapc will have a repo each on a shared 2 TB disk. Alternatively I may stick with a disk for each computer, so as to have spares, the main issue being not enough disks at the moment. This arrangement is preferred because serverpc can be easily shut down to change disks without disrupting things as can happen with disks having to be inserted in the removable bay and brought online.

The amount of disk space on mainpc for a complete set of aerial photos for a rail corridor 235 km long has turned out to be about 2.4 GB. This is very good so the required files can be kept on mainpc with the rest of the map project files, serverpc will be used to store the bulk downloads before the images actually needed are selected. So I am budgeting on having 100 GB of disk space used on mainpc for all the maps which is quite reasonable with its disk capacity at present.

The living room is getting a makeover at present to optimise all the things I do in here and a lot of stuff that doesn't need to be in here will get stored "temporarily" in the bedroom until I get that properly tidied up, as I need to make the living room the daytime space for everything to save on winter heating costs, using the aircon to make the room temp 16-17 degrees and wearing a few layers of clothes to avoid having to heat the room more than that.

Wednesday, 11 April 2018

KDE vs XFCE [2]

So I have been testing some VMs to see how things compare with different GUIs running on Linux.

First tryout has been KDE running on Kubuntu. So far so good. The right click issue hasn't gone away but drag and drop looks good.

Second tryout was LXQT with Kwin running on Debian. This isn't a supported option from the install, you have to install something else first (or no GUI) and then install LXQT. It took a few goes to find the right packages, the ones I installed in the end were LXQT, Kwin and task-lxqt-desktop. The last one pulled in a lot of other software, but was the only way I could get the system to boot up to a KDE login window. However the drag and drop issue is still very much live in LXQT in this configuration. So I have shut down this VM and will not use it again. 

Third tryout is Debian with KDE from the standard installer options. Having got this VM going it seems to work reasonably well. With both of the KDE VMs which I am using simultaneously to do the aerial photography layers, things look roughly the same but they need more testing to see what the issues are. I intend to work as much as I can in these VMs over the coming weeks to see how well they work and whether they resolve these XFCE issues. But I also intend to have a look at XFCE settings to see if there are any that can resolve these issues.

I have decided against installing KDE as a replacement on my mainpc for now because it is so different from XFCE that a huge learning curve and setting everything up from scratch is needed should I reinstall with it. It does also seem to be fairly bloated with some of the installations on the VMs being very slow with tons of files to install. Using it in a VM is a useful workaround if running it natively under XFCE is difficult but there are XFCE settings that control the drag and drop and playing with these seems to be one avenue I can explore for now.

Subsequent testing in VMs has also confirmed the issues are not resolved by using KDE instead of XFCE so I plan to stick with XFCE and the KDE experiment is officially over for now.

I am also rearranging the screens with the second screen for mediapc, which is on the left, swapping places with the only screen for win10pc, which is on the right. This will let me use win10pc's own Microsoft multimedia keyboard on its own and thus have all four keyboards easy to use, where it sits currently on the right it is too far away to use easily, but I can use the spare keyboard slide on the left (that is actually normally used for my drinking cup) for the MS keyboard being easily within reach. So then using the Win10pc as a fourth computer alongside the other three without switching keyboards becomes much more straightforward. When not in use the keyboard will still be stored on the right as I don't use this computer very much with the MS keyboard, I generally use it with one of the switchable keyboards, but there have been times when I want to use all four computers at the same time and having Win10pc's keyboard on the left and screen on the right isn't very user friendly. This also dispenses finally with the ideas about having an extra sliding shelf of some form or another on the right, I won't be doing any such thing now, what is on the right are the two KVMs and the scanner and these will remain unchanged.

Tuesday, 10 April 2018

KDE vs XFCE

Whilst I have been generally happy with both Xubuntu and Debian with XFCE as the GUI, there have been a number of issues running programs under XFCE that have caused me to doubt its capabilities. Mostly these surface with Qgis because of the nature and extensive use of the software and are in three two areas:
  • The right click or shortcut menu is almost impossible to open without accidentally clicking the menu item closest to the mouse pointer. This has been mostly under Qgis but I have lately been seeing it happen under other applications as well. This has been confirmed not to be a XFCE specific issue and is possibly application implementation specific.
  • Drag and drop in many cases is poorly implemented, that in many cases you will be dragging an item even when you aren't holding the mouse button down. This causes a lot of problems with the Qgis layer list which supports drag and drop to reorder items. Frequently layers are inadvertently dragged and dropped to wrong places in the list.
  • Double click also seems to be poorly handled and in many cases single click is taking the action where a double would normally be needed.
Up until now apart from filing a Qgis bug report concerning the right click issue I haven't done much, but seeing the right click affecting another piece of software in the last couple of weeks has spurred me forward into creating a Kubuntu virtual machine with Qgis installed for testing. So far the drag and drop issue seems to be resolved, but I need to spend a lot more time using it to be really sure. Understandably I will be testing the other issues on it as well.

This Kubuntu VM will be used on mainpc instead of the natively installed Qgis on that computer so that I can get as much testing as possible done with it over the coming weeks and that will give me time to look at whether to permanently adapt my Debian computers, probably just mainpc and serverpc at this stage, to KDE. This would probably happen when Buster comes out. There is no pressing need to upgrade all the computers at this stage.

In regard to Qgis, I have previously looked into making the raster aerials usage more efficient by scripting the copying of only the images used by extracting from the QLR file in XML. I have instead gone for a much simpler process of a simple command script that copies the manually entered filenames (with as much abbreviation as possible) running on the Windows 10 PC, to copy only the required imagery from serverpc to mainpc for each section of rail corridor that I have aerial imagery for. Hopefully this will soon progress to all the aerial imagery I have for the various corridors, and without gobbling hundreds of gigs of disk space as was happening before.

The need to come up with a backup solution is becoming more pressing and will, I think, simply consist of local Borg backups on each computer. The idea of a backup server is not well enough supported by Borg at present to work well with multiple PCs. In addition there are now problems with OverGrive which is a Linux sync client for Google Drive, which I rely on to do backups of map projects and data files. Google has changed its API yet again and typically they will drop support for an old API at the same time so I have been shocked to discover OG has no mechanism for flagging upload errors which are being reported in its log. It turns out the OG developers have abandoned it.

UPDATE: Because buster is probably as much as year to 18 months away I am looking at putting KDE onto mainpc as a replacement UI install, rather than doing a completely new install. It takes a bit of work to make it the default replacement for XFCE. I am also going to test out LXQT in a virtual machine, this is like LXDE but updated to use QT components and therefore has a more modern appearance than LXDE. Both environments will be tested in VMs before installing them, I am about to build a Debian 9.4 VM for LXQT testing.

I have decided to continue the "backup server" model with Borg but there will be separate disks for two different backups. One 2 TB disk will be mainpc by itself and the other will be for mediapc and serverpc combined on one 2 TB disk. It may be that I need to buy some more disks, but at the moment there isn't really any money to spend on these. I will begin testing out Borg for this very soon. There is a free replacement for OverGrive but without the automatic detection for uploading so I have to think about how to install it.