Resolving time issues with dual boot Windows and Linux

Unless you live in the GMT time zone, dual booting between Windows and Linux will cause your computer to display the wrong time each time you boot the other OS. This is because Linux (Ubuntu in this case) by default assumes the hardware clock is set to the UTC time zone and Windows assumes it’s set to the local time zone. One has to get changed, and because Windows is screwed up, it’s easier to tell Linux to use local time. The command to do this is:
timedatectl set-local-rtc 1 --adjust-system-clock
to confirm the change, run timedatectl

Reference: Gadget Gang


Comments (0)


Upgrade Carmine from Ubuntu 20.04 LTS to 22.04 LTS

/dev/volgroup1/ubuntu16.04 is really Ubuntu 20.04
/dev/volgroup1/ubuntu18.04 is the old Ubuntu 18.04 installation
Both logical volumes are the same size

Rename the old logical volume

First rename the old logical volume to reflect what will be stored there:
sudo lvrename volgroup1 ubuntu18.04 linux2

Back up the current OS

copy the contents of the current OS in ubuntu16.04 to linux2:
sudo dd if=/dev/volgroup1/ubuntu16.04 of=/dev/volgroup1/linux2 bs=1024k

Update the backup copy to be bootable

Mount the new volume:
sudo mkdir /media/linux2
sudo mount /dev/volgroup1/linux2 /media/linux2
Edit /media/linux2/etc/fstab and change / to point to /dev/mapper/volgroup1-linux2

Update Grub

Load Grub Customizer if you don’t already have it:
sudo apt install grub-customizer
Run Grub Customizer and check the entries for both logical volumes including the paths and LVIDs (which you can get from lvdisplay)
Rename the entries to Ubuntu primary (linux1) and Ubuntu alternate (linux2)
Don’t forget to save, which runs update-grub and install to MBR

Check both logical volumes are OK

Verify you can boot into primary and alternate

When running alternate, rename logical volume ubuntu16.04 to linux1, update its fstab and update Grub as above.

Now that there’s a backup copy of the current OS in Ubuntu alternate, it’s safe to boot into Ubuntu primary and begin the upgrade


Comments (0)


Upgrading from PHP 7.4 to 8.0

PHP 7.4 is no longer supported. My host offers 8.0, so I upgraded, but WordPress failed to run.

Starting State

WordPress version 6.1.1
PHP 7.4 FastCGI

Error Description

Upgrading to PHP 8.0 FastCGI caused WordPress to show:

There has been a critical error on this website. Please check your site admin email inbox for instructions.

None of the WordPress pages worked, including the recovery page that WordPress emailed to me, wp-login.php?action=enter_recovery_mode.


To diagnose the problem, I turned on debug logs by adding these lines to wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

This showed a fatal error in the wp-cache plugin. This was surprising because that plugin was disabled.


Moving the wp-cache directory from the plugins directory to another directory I created, plugins-old, fixed the problem.


Comments (0)


Open a File From the Command Line as if it were Double-Clicked in Nautilus

$ xdg-open {file-name}


Comments (0)


Ubuntu 20.04 NAS permission denied

On a new installation of Ubuntu 20.04, NAS mounts were readable, but not writable. When looking at the long directory listing, the files were owned by a UID and GID different than the user they were mounted for. The fix for this was to add forceuid and forcegid to the mount options in the autofs configuration file. After that, run
sudo service autofs restart
Verify the force options have been applied by accessing the mounted directory (to force automounting), then checking the output of mount and ls -l.


Comments (0)


Mapping Ctrl+Alt+Delete to Shut Down in Ubuntu 20

  1. Start Settings
  2. Select Keyboard Shortcuts
  3. In the System section, disable the shortcut for Log out
  4. At the bottom, select + to add a custom shortcut
  5. Name it Shut down
  6. Set the command to gnome-session-quit --power-off
  7. Enter Ctrl+Alt+Delete for the shortcut


Comments (0)


Backwards Natural Horizontal Scrolling

On a Thinkpad laptop with Ubuntu 20, I switched to Natural Scrolling, but was confused to find that, although vertical scrolling worked as expected, horizontal scrolling was unchanged, resulting in a very unnatural experience. It turns out that the culprit was a old input driver that was probably carried along as this laptop was upgraded over the years. The correct driver (xserver-xorg-input-libinput) was already installed, so the fix was to uninstall the old one:

sudo apt remove xserver-xorg-input-synaptics

then log out and back in again. Touchpad speed was at zero, so that had to be moved to 2/3 of maximum to restore the speed I had under the Synaptics driver.



Comments (0)


Linux Installation Check

Packages to Install

  • synaptic
  • vim-gnome
  • gkrellm
  • kvpm (replaces system-config-lvm, which is not available for Ubuntu 18)
  • cifs-utils
  • KeepassXC
  • gnucash
  • gimp
  • darktable
  • gnome-raw-thumbnailer (to view .CR2 file thumbnails, also view in Files with zoom of 150%
  • git
  • xsane

For laptop only

  • autofs
  • libpam-fprintd


  • Laptop only:  Enable fingerprint login under Settings > Users
  • Install or update Dotphiles
  • Laptop only: Set up Autofs
  • ds411+II mounts 
  • pCloud and sync’ed directory
  • /etc/group entry for ds411p2
  • Install NAS credentials /etc/ds411p2pwd. Set permissions to u=rw,go=. Repeat for ~/.ds411p2pwd.
  • VPN
  • Set up HP LaserJet MFP M477fdn with hp-setup


Comments (0)


Operating System Upgrade Strategy

Keep two LVM partitions on each machine.  When upgrading, always upgrade the secondary partition, leaving the primary partition in a working state.  The secondary partition then becomes the actively used one.


Comments (0)


Upgrading Jennings from Ubuntu 16.04 to 20.04

Jennings has been running Ubuntu 18.04 for a while in partition /dev/mapper/ubuntu--vg-root2. Rather than upgrade it to 20.04, I thought I’d upgrade the older Ubuntu 16.04 installation in partition /dev/mapper/ubuntu--vg-root. Here’s what needed to change:

Change from Dropbox to pCloud

This is as simple as installing from and setting up a sync from ~/pcloud-sync to Applications/Keepass2Android.

Upgrade Keepass

Since upgrading to Keepass 2 (the .kdbx format), I don’t have to keep locking KeepassX to an old 1.x version. Unlock the version of KeepassX, delete it and install KeepassXC. Add the keyboard shortcut Ctrl+Alt+A for autotype.

DS411+II NAS Mounts

A new router has been installed since Ubuntu 16.04 was running. The old router would create DNS entries for each client based on their host name, so ds411p2 was valid. The new one, a Comcast XB6, doesn’t do that. The hosts are reachable through .local names, so the NAS needs to be referenced as ds411p2.local now. This fix was made in /etc/fstab, as well as the fix to mount CIFS with the mount option vers=1.0 (because the NAS is old and doesn’t support the newer default version).

Fix Darktable Configuration

The files in ~/.config/darktable were from whatever version of Darktable was available in the Ubuntu 16 repositories and the current version, 3.0.1, didn’t like them. Replacing that directory tree with the one from the Ubuntu 18 installation fixed the problem.

HP Color LaserJet Pro MFP m477 Fdn Scanning

(Read through this whole section before doing anything, because it contains steps that didn’t work.)

This printer is an all-in-one and it works out of the box, except for scanning. For that, a proprietary plugin must be installed:

Unfortunately, the plugin doesn’t install on Ubuntu 20. hp-setup was an old version. It wasn’t upgraded because it wasn’t installed from the hplip package. To fix, find the old installation (it was 3.18.5) and run sudo make uninstall from there.

Then reinstall hplip:

sudo apt remove hplip
sudo apt autoremove
sudo apt install hplip hplip-gui

That failed, so I removed those packages and downloaded hplip from and installed using defaults, but python-pyqt5 and python-dbus.mainloop.pyqt5 failed.

GUI installation doesn’t work on Ubuntu 20 yet, so I ran again, selecting all defaults except:

  • installation mode=custom
  • Graphical User Interfaces (Qt5)=no
  • Restart or re-plug in your printer=ignore (since my printer is connected via network)

Then run hp-plugin (as myself, it uses sudo) and accept defaults.

Now the scanner works with xsane.


Comments (0)