Home Uniquely NZ Travel Howto Pauline Small Firms Search
Diary of System and Website Development
Part 32 (January 2020 ->)

March 2020

Opera Browser

I am increasingly using Opera as a browser as many sites no longer work with Firefox as it has a problem with Captcha validation.

Installing Chrome extensions in Opera

Chrome extensions can be installed if first the Opera "Install Chrome Extensions" extension is installed.

Install Chrome Extensions allows you to install extensions from Google Chrome Web Store
in your Opera browser. Note: You can install extensions only. Themes are not supported. To use this extension:

I used this to install "Zoom Redirector" which was not available directly at the time.

Zoom Redirector transparently redirects any meeting links to use Zoom's browser based web client.

Instead of having to search for the hidden "join from your browser" link, this addon will take you there automatically.

Other Opera Extension I use

Test of Mint 20 beta on Helios using LiveUSB


Installing old versions from 6 debs from 18.04 version 52.and transfer of profiles seems to be OK

thunderbird_52.9.1+build3-0ubuntu0.18.04.1_amd64.deb **
thunderbird-gnome-support_52.9.1+build3-0ubuntu0.18.04.1_amd64.deb **
thunderbird-locale-en_52.9.1+build3-0ubuntu0.18.04.1_amd64.deb **
thunderbird-locale-en-gb_52.9.1+build3-0ubuntu0.18.04.1_all.deb *
xul-ext-gdata-provider_52.9.1+build3-0ubuntu0.18.04.1_amd64.deb *
xul-ext-lightning_52.9.1+build3-0ubuntu0.18.04.1_amd64.deb **

Only the starred .debs were installed after a complete uninstall of the existing thunderbird. Double starred installed on Defiant


Useful for transfers but 19.3 needed updated version at http://packages.linuxmint.com/pool/main/w/warpinator/warpinator_1.0.5+ulyana_all.deb

Wine under Mint 20

There were various comments that wine did not work well under Mint but I found that Wine worked under Mint 20 for me. I successfully installed an old windows program under wine using a LiveUSB using the following steps, starting in the terminal – some may be redundant but at least it worked!

sudo dpkg –add-architecture i386
sudo apt update
sudo apt install wine wine32 wine-binfmt
wine –version # showed version 5.0-3 was installed
wine Warpinator/OldWindows32bitProgInstall.exe

Install program was run but no menu item at this point so:

  1. I located the installed program in .wine/drive_c/program Files/
  2. Right click, use Other program option and put wine in box and set as default for .exe thus creating association of wine with .exe files for the future.
  3. Run program - result wine and program were now in Mint menu.

wine-binfmt seems to be important to allow association but it still had to be done manually the first time.

Wine Fonts ( ttf-mscorefonts-installer )

The ttf-mscorefonts-installer package sould allow for easy installation of the Microsoft True Type Core Fonts for the web but using Synaptic seems to miss part of the ULA acceptance which is in two parts. So

Run sudo apt-get install ttf-mscorefonts-installer and accept the EULA, or else if you already have ttf-mscorefonts-installer installed and you didn't accept the EULA, then uninstall ttf-mscorefonts-installer and reinstall it like this:

sudo dpkg -P ttf-mscorefonts-installer
sudo apt install ttf-mscorefonts-installer

Use the Tab and Enter keys to accept the EULA in the Microsoft TrueType core fonts windows that pops up. The terminal will output a new message each time it finishes downloading a new font. It takes a while.

GoogleEarth Installation

Googleearth always used to be a nightmare to install but I found no problems in an install using a .deb in the following way

wget https://dl.google.com/dl/earth/client/current/google-earth-pro-stable_current_amd64.deb
sudo gdebi google-earth-pro-stable_current_amd64.deb

It appeared in the menu and worked straight off.


The Leafpad editor is no long available so I have had to modify my git installation which specified it as the default editor called during commit rebasing (to avoid conflicts when using the same editor for changes in the files. the following section in git.htm needs changing:

Git is now the most widely used source code management tool, with over 40% of professional software developers using Git as their primary source control system. Before you worry the whole installation and setup of Git is done in about 9 terminal commands you can cut and pasted from below. This assumes you have already set up an account on GitHub which is easy and well explained on their site and their is a repository you want to use..

sudo apt-get install git gitk leafpad meld

git config --global user.name "your_username_on_github"
git config --global user.email "yourname@your_git_email"

git config --global core.editor leafpad
git config --global diff.tool meld
git config --global merge.tool meld
git config --global color.ui auto
git config --global push.default simple

git config --global credential.helper 'cache --timeout=7200'

git clone https://github.com/username/repositoryname
cd repositoryname

The apt-get install command not only installs Git but its visualiser (gitk), a merging program (meld) and a simple editor (leafpad) which will only be used by Git.

The first two pieces of configuration are to provide a suitable name and email which is added to every commit you make. If you intend to use GitHub there are great advantages to having them the same and using your GitHub username rather than your full name.

The use of a simple text editor called leafpad avoids all sorts of problems in using the same editor for your editing of files and within Git. meld is a really good difference tool and is also set to be the default for hand crafting conflicts in a merge. The color.ui auto allows suitable terminal programs to display some information in colour. The push.default simple is to make sure that you only push your master to the remote repository by default - it should not be needed with the latest versions of Git but I started before that was the default so some of my early repositories seemed to have a different setting. I have put details of how to obtain the most recent version of Git in an Appendix.

The --global credential.helper 'cache --timeout=7200' means that Git will save your password in memory for some time after you have entered it the first time in a session - here I have set it to 2 hours.

in a couple of places

Sublime Text Editor

I have installed sublime as an extra editor for accessment - it looks a good and very powerful 'coding' editor but has it a big learning curve? Alternative is to reinstall gedit as a second editor if it will co-exist with xed.

One command to remember is Ctrl Shift p which is a command search. This is the way to get the top menu back!


This is based on Leafpad and looks to be the replacement although still under development

See https://ubuntuforums.org/showthread.php?t=1178974 In a terminal do:

sudo apt-get install apt-xapian-index
sudo update-apt-xapian-index -vf

Install Chromium

xed admin:///etc/apt/preferences.d/saiarcot895-chromium-beta.pref
apt remove --purge chromium-browser
sudo add-apt-repository ppa:saiarcot895/chromium-beta && apt update
apt install chromium-browser

Brackets HTML Editor and use of Flatpaks

It seemed a good idea to go back to trying Adobe Brackets but the PPA I had used previously has not beenupdated for some time so I made the mistake of using a Flatpak. I will not go into Flatpaks to much but they see a good idea but I had not realised what the overhead would be for the first major program. Installing Brackets had a 4 Gbyteoverhead, more than many Linux installations, which results from their installing almost all their dependencies as well as the program, true it makes them independent but at a considerable cost.

Worse stil I discovered that uninstalling stillleft a library overhead of 3.6 Gbytes. I eventually found an article which explained how to remove the bloat at https://www.linuxuprising.com/2019/02/how-to-remove-unused-flatpak-runtimes.html . It is simple in a terminal to do:

flatpak uninstall --unused

This command should list all unused Flatpak runtimes, and offer to uninstall them from your system.

peter@defiant:~$ flatpak uninstall --unused
ID Branch Op
1. [-] org.freedesktop.Platform.GL.default 19.08 r
2. [-] org.freedesktop.Platform.VAAPI.Intel 1.6 r
3. [-] org.freedesktop.Platform.VAAPI.Intel 19.08 r
4. [-] org.freedesktop.Platform.ffmpeg 1.6 r
5. [-] org.freedesktop.Platform.openh264 2.0 r
6. [-] org.freedesktop.Sdk 1.6 r
7. [-] org.freedesktop.Sdk.Locale 1.6 r
8. [-] org.freedesktop.Sdk 19.08 r
9. [-] org.freedesktop.Sdk.Locale 19.08 r
10. [-] org.gtk.Gtk3theme.Mint-Y-Darker 3.22 r
11. [-] org.gtk.Gtk3theme.Mint-Y 3.22 rUninstall complete.

I have writen briefly about Brackets before but this time I could not make the killer feature to work, namely the ability to continuously update your work in a browser giving a close or arguably better than WSIWIG experience

Changing from an encrypted home folder.

The process is not very obvious but the article at https://askubuntu.com/questions/4950/how-to-stop-using-built-in-home-directory-encryption gave some clues as to what to do. Most of the solutions seemed overly complex but combined with my observations about doing fresh program instals whilst retaing the information in ones home folder led to a proceedure which works.

Firstly, how doe ecryptfs work.

BIOS problems

My output from dmesg shows a huge number of errors. This is a problem which can existewhen using recent kernels with with an old BIOS. Many old BIOSes do not support the full set of current ACPI calls. To quote the Mint 20 Release Notes

Choosing the right version of Linux Mint"

Each new version comes with a new kernel and a newer set of drivers. Most of the time, this means newer versions are compatible with a larger variety of hardware components, but sometimes it might also introduce regressions. If you are facing hardware issues with the latest version of Linux Mint and you are unable to solve them, you can always try an earlier release. If that one works better for you, you can stick to it, or you can use it to install Linux Mint and then upgrade to the newer release.

One option with ACPI problems is to try various BIOS options acpi=off , acpi=noirq , acpi=strict , pci=noacpi but these tend to reduce functionality of the bios and various things like the temperature sensors fail. They are limited to geting a system running enough to lok for solutions.

Errors in my output from dmesg look like this

[180074.103311] ACPI Error: Aborting method \_SB.PCI0.LPCB.H_EC._Q50 due to previous error (AE_AML_OPERAND_TYPE) (20190816/psparse-529)
[180074.301840] ACPI Error: Needed type [Reference], found [Integer] 000000006398d7d6 (20190816/exresop-66)
[180074.301867] ACPI Error: AE_AML_OPERAND_TYPE, While resolving operands for [Store] (20190816/dswexec-424)
[180074.301894] No Local Variables are initialized for Method [_Q50]
[180074.301900] No Arguments are initialized for method [_Q50]
[180074.301909] ACPI Error: Aborting method \_SB.PCI0.LPCB.H_EC._Q50 due to previous error (AE_AML_OPERAND_TYPE) (20190816/psparse-529)
[180074.503033] ACPI Error: Needed type [Reference], found [Integer] 000000001785f600 (20190816/exresop-66)
[180074.503044] ACPI Error: AE_AML_OPERAND_TYPE, While resolving operands for [Store] (20190816/dswexec-424)
[180074.503055] No Local Variables are initialized for Method [_Q50]
[180074.503057] No Arguments are initialized for method [_Q50]

These are filling the log files and my standard check of log files which is:

sudo du -hsxc --time /var/log/* | sort -rh | head -16 && journalctl --disk-usage && date


mint@mint:~$ sudo du -hsxc --time /var/log/* | sort -rh | head -16 && journalctl --disk-usage && date
764M 2020-06-19 03:28 total
382M 2020-06-19 03:28 /var/log/kern.log
345M 2020-06-19 00:00 /var/log/syslog.1
38M 2020-06-19 03:28 /var/log/syslog
112K 2020-06-17 15:53 /var/log/dmesg
88K 2020-06-17 20:29 /var/log/apt
68K 2020-06-19 03:28 /var/log/auth.log
44K 2020-06-18 03:51 /var/log/Xorg.0.log
28K 2020-06-17 20:29 /var/log/dpkg.log
20K 2020-06-19 02:53 /var/log/cups
12K 2020-06-19 00:00 /var/log/lightdm
12K 2020-06-19 00:00 /var/log/boot.log.1
4.0K 2020-06-17 15:53 /var/log/wtmp
4.0K 2020-06-17 15:53 /var/log/ubuntu-system-adjustments-start.log
4.0K 2020-06-17 15:53 /var/log/ubuntu-system-adjustments-adjust-grub-title.log
4.0K 2020-06-17 15:53 /var/log/private
Archived and active journals take up 80.0M in the file system.
Fri Jun 19 03:28:27 BST 2020

This is actually a serious problem as it not only fills the log files but causes an extra very large nuber of write activities which are not good for the life of an SSD which have a limited number of write cycles so it must be addressed.

Method 1 - Revert to earlier kernel to avoid ACPI errors

This may not be an option as earlier kernels may not support all of the features required for the underlying Ubuntu system or Mint itself. In this case I would probably need to go back to a kernel which is no longer supported.

Method 2 - avoid ACPI flooding log files by adding limits in logrotate

Logrotate will have to be sorted as per changes for TimeShift. A quick check shows the files seem unchanged so the description in System Housekeeping to reduce TimeShift storage requirements can be used directly. This does not completely solve the excessive number of write cycles to an SSD.

Method 3 to avoid ACPI flooding log files - stop syslog daemon

This may seem a bit dramatic but the log files are useless anyway when full of junk. It is however not quite as simple as just disabling the syslog daemon syslogd. Syslog has been replaced by rsyslog on numerous OS. So, on Debian > 5, Ubuntu > 11.2, Centos 6.x. Also rsyslog now uses socket activation under systemd. So whenever there is a log message coming in, rsyslog will be started on demand. This means as fast as you stop it it will be restarted! The unit is named syslog.socket so if you want to stop the rsyslog service and the socket activation, you will need to stop both units:

systemctl stop syslog.socket rsyslog.service

This is, of course only a temporary stop as it will be reactivated at boot so you also need to disable them at boot:

systemctl disable syslog.socket rsyslog.service

You can re enable them at boot by

systemctl enable syslog.socket rsyslog.service
Add the --now flag to start now as well as enable for the next boot

You can check the state with

systemctl status syslog.socket rsyslog.service

You can also list all enable units by

systemctl list-unit-files | grep enabled

Enabled means the system will run the service on the next boot. So if you enable a service, you still need to manually start it, or reboot and it will start.

dmesg to the rescue

Stopping the syslog daemon does not completely stop logging as dmesg is still available to look at the kernel ring buffer. The 'kernel ring buffer' is a memory buffer created by the kernel at boot in which to store log data it generates during the bootloader phase. A ring buffer is a special kind of buffer that is always a constant size, removing the oldest messages when new messages come in. The main reason the kernel log is stored in a memory buffer is to allow the initial boot logs to be stored, until the system has bootstrapped itself to the point where the syslog daemon can take over. The contents of the buffer at that point seems to be saved in /var/log/dmesg but fortunately it continues to be updated.

dmesg offers a number of powerful tools to view and manipulate the ring buffer which, combined with piping to grep, allow one to still investigate most problems even without the full set of system log files. In practice I am not sure I have ever had to use the log files as the answers have always been available through dmesg, perhaps once when I had a series of kernel panics following segfaults.

We are still left with a problem as dmesg is still flooded with ACPI error messages at a rate of 5 lines every 200 msecs so it rapidly 'cycles'. There is however a command to pass the input from kernel straight on to the terminal which is accessed by the --follow or -w options. If that is piped to grep the offending 5 lines can lines be removed by the less well known grep option -v .

grep -w -e string1 -e string2 -e string3 -e string4 -e etc

passes on everything but lines containing string1 etc

In my case the magic incantation is:

dmesg -w | grep -v -e Q50 -e SB.PCI0 -e exec-424 -e sop-66

This makes it easy to watch as devices are plugged in etc

Concluding remarks on ACPI issue

I have decided to disable logging through rsyslog at boot time and depend on use of dmesg in the knowledge that I can easily enable it again if I need full logs. This will save considerable wear on the SSD and reduce the requirement for large amounts of space in Timeshift images. There may however be unintended consequences I have not yet discovered in, for example, access to histories from various utilities.

July 14th 2020

Updates to web site to reflect new Media Queries Approach to Responsive design

This was put sucinctly in the Flash update:

This started as some fixes to get round a bug in some browsers mobile devices and turned into the start of much more major enhancement to the site, in particular for touch screen devices. In essence, the existing responsive design works by reloading a modified version of the page when absolutely essential, for example when changed from portrait to landscape view on a mobile or a major reduction in window size. In some browsers this is relatively seamless as the information is cached locally and the page is left at the same point, in others such as Firefox the page is returned to the top which is disturbing especially if it was a brief and unintentional orientation change. Browsers and web standards have developed over the last 4 years and all currently supported versions of browsers allow an alternative method called Media Queries, a feature of CCS3, to provide an alternative way to implement a responsive design by only changing the 'styles' when, for example the screen width meets a certain criteria (A Media Query)

The changes are progressing and most of the pages accessible from the 'entry' pages (those accessible from the header bar) have been updated to the new format other than the UNZ Travel pages and the early newsletters (~20). Some of the pages showed errors with the latest HTML5 validator or had not been converted to HTML5 at all and needed correcting. Travel pages require changes to every block of pictures as well as to the headers and footers to benefit from the Media Queries approach so that will be a major undertaking. Approximately 160 pages are now updated and validated of which ~45 are travel pages out of a total of 500 pages with picture blocks - a long way to go. Progres updated as of 14 July 2020.

The number of pages and searches for incompatibilities has been done by a grep search through all the web pages by commands like:

:~$ grep -iRl "<script>inhibitReload()</script>" "/media/DATA/My Web Site"

where other searches have been for "media.css" and "hpop("

CopyQ application

Perhaps the most important tools has been use of the CopyQ clipboard manager – a desktop application which stores content of the system clipboard whenever it changes and allows to search the history and copy it back to the system clipboard or paste it directly to other applications. It has a sophisticated tab mechanism which enables me to store headers, footers and various other 'snippets' required for each of the major page types on separate tabs. CopyQ is available for all major operating systems and is in the Mint repositories. It is unusually well documented and offers a huge range of possibilities - I am only exploiting a few

It is normally accessed from the toolbar tray but I have also set it up so that it is opened by a system shortcut key of Ctrl Alt C (Preferences -> Shortcuts -> Global -> Show/Hide main window) and use the option to paste into the cusor position from CopyQ by a return.

So I can select the complete existiong header in an editor, open CopyQ by Ctrl Alt C selet the tab and snippet, Enter and on to the next. The snippets as I am calling the items on the CopyQ tabs can be edited in situ by F2 (or an external editor) so it is easy to set the date in the footer block for the day or the bulk of the title in the header. Individual items on a tab or the clipboard history can be pinned in positin which also gives protection against accidental deletion. It is possible to configure a tree view of tabs in use. It is already obvious that one does not want to lose the hard work in setting up and there is an Export command (Export on file menu) which enable selective exporting of tabs.

Repeated edits to update picture blocks.

Background: There are three main formats for picture blocks in use. In all cases scripting is used to expand to the complex code required by writing on the fly as the page loads. This saves long strings with the same text for title, alt statements etc. All three have the same basic 'function parameters' - an 'image location', a 'title string' and a 'position' parameter (which becomes muti-use in the case of lightbox displays) and all expect images in triplicates in 4:3 or 3:4 aspect ratio. The small 'icon' image is always 160 x 120 or 120 x 160 pixels and ends in i the middle size is always 400 x 300 or 300 x 400 pixels and ends in w and is used for compact popup displays which are being phased out. The large images are used primarily for lightbox displays and the size is not baked in but historically were 600 x 450 and now 800 x 600 is the norm. Popups shrink this to be 600 x 450 pixels.

The first two formats were basically the same and used tables for layout and adapted the layout on the fly. Both depended an a reload to respond to window/screen size changes. Version two used a single script round the whole table and wrote the table details <table>, <tr> and <td> etc by function calls as well as the reponsivePictureblockSplit(n) call

Original type of block using table

<table class="pictureblock">
    <td class="pictureblock"><script>hpop('2011/qe11/img_3231', ' &copy; P Curtis 2011', 'center' )</script></td>
    <td class="pictureblock"><script>vpop('2011/qe11/img_3243', ' &copy; P Curtis 2011', 'center' )</script></td>
    <td class="pictureblock"><script>hpop('2011/qe11/img_3244', ' &copy; P Curtis 2011', 'center' )</script></td>
    <td class="pictureblock"><script>vpop('2011/qe11/img_3248', ' &copy; P Curtis 2011', 'center' )</script></td>

Single script block with table codes written in scripts

   tdCpictureblock();hpop('2018/qv18ev/',' &copy; P Curtis 2018', 'center' );tdE();
   tdCpictureblock();vpop('2018/qv18ev/',' &copy; P Curtis 2018', 'center' );tdE();
   tdCpictureblock();hpop('2018/qv18ev/',' &copy; P Curtis 2018', 'center' );tdE();
   tdCpictureblock();vpop('2018/qv18ev/',' &copy; P Curtis 2018', 'center' );tdE();

New Solution without tables and depending on Media Queries to adapt the css dynamically with the need for reloading pages

<div class="picFrame">
  <div class=pic><script>hpic('2019/auqe19/',' &copy; P Curtis 2019', 'center' )</script></div>
  <div class=pic><script>vpic('2019/auqe19/',' &copy; P Curtis 2019', 'center' )</script></div>
  <div class=pic><script>hpic('2019/auqe19/',' &copy; P Curtis 2019', 'center' )</script></div>
  <div class=pic><script>vpic('2019/auqe19/',' &copy; P Curtis 2019', 'center' )</script></div>

The transformation of either type needs 5 repeated edits and deletion of n-1 responsivePictureblockSplit elements. Often pages will have both sorts.

Dreamweaver is capable of handling large numbers of open pages and I have used up to thirty for repeated edits. A certain ammount of checking and hand crafting is always needed.

So where are the priorities. Our world cruises are arguable the most import and comprise 33 pages between them it is logical to complete the other two holidays in 2017 for another 11 parts. New Zealand 2016 is important with the Wanaka air show and has 18 parts but 2017 is small at 6 parts and should be included. This would in total mean we completed the coverage of 3 years with 68 pages. So three multiple repeating edits of circa 25 pages each seems to be on the way forwards.

Updating Active Maps

This is the other area where changes are needed. Once the size has reduced to below the width of an Active Map it has tobe replaced by an image which shrinks to fit.

The old code used code like this:

<div class="center">

  <div id="activeMap" >
<img src="2017/qv17xm_map.jpg" style="width:600px; height:450px;" usemap="#qv17xm_map1" alt="Map">
    <map name="qv17xm_map1">
      <area shape="rect" coords="165,10,515,58" href="qv17xm-p1.htm#soton" alt="Introduction and Embarkation at Southampton" title="Introduction and Embarkation at Southampton">

  <div id="shrinkableMap" >
    <img src="2017/qv17xm_map.jpg" style="max-width:95%; height:auto;" alt="Map">


and the new code is

<div id="activeMap" class="showLarge center">
  <img src="2019/qe19ne_map.jpg" alt="Map" width="600" height="400" usemap="#qe19ne_map">
  <map name="qe19ne_map">
    <area shape="rect" coords="6,320,197,398" href="qe19ne-p1.htm#soton" alt="Southampton, UK" title="Southampton, UK">

<div id="shrinkableMap" class="showMedium center">
  <img src="2019/qe19ne_map.jpg" style="max-width:95%; height:auto;" alt="Map">

So the changes are:

Which is a considerable simplification

Finding pages which need changes and assessing progress

I have made use of grep in many ways to locate pages which needed changes, track progress and generally tidy up.

Basic list of all pages containing HTML 4.01 Transitional in current directory not sub-directories

grep -il "HTML 4.01 Transitional" *.htm

Count of all pages containing HTML 4.01 Transitional in current directory

grep -il "HTML 4.01 Transitional" *.htm | grep -c htm

Note: The grep -c is counting the file names piped to it which contain htm ie all. In my case it is useful to instead count files with nz or qe

Count of all .htm pages containing both HTML 4.01 Transitional and media.css (eg. new header in old HTML 4.01 page such as old diary page) in current directory

grep -il "HTML 4.01 Transitional" `grep -l media.css *.htm` | grep -c htm

Count of all .htm pages containing both HTML 4.01 Transitional but not media.css in current directory

grep -il "HTML 4.01 Transitional" `grep -L media.css *.htm` | grep -c htm
At the end of all these various searches and pruning of old unlinked pages by copying them to n archive it was possible to know that there still 41 NZ travel pages but only 11 other travel pages without the new headers and footers. Although they were all 2003 or earlier it seemed worth updating them to have the new headers and footers and basic responsive response although they remained HTML 4.01 standard.

Looking at the remaining NZ Touring pages by

peter@defiant:/media/DATA/My Web Site$ grep -il "HTML 4.01 Transitional" `grep -L media.css nz*.htm` | grep -c htm

We find that there are still 41 NZ touring pages and I currently have no plans to covert those as almost all the pictres and information is duplicated and better presented in later years apart from the sailing which have already been updated. I might review the 1996 - 99 pages at some point

Before you leave

I would be very pleased if visitors could spare a little time to give us some feedback - it is the only way we know who has visited the site, if it is useful and how we should develop it's content and the techniques used. I would be delighted if you could send comments or just let me know you have visited by sending a quick Message.

Link to W3C HTML5 Validator Copyright © Peter & Pauline Curtis
Content revised: 5 th August, 2020