PC Doctor Godalming

Dedicated to Fixing Computers of all Shapes and Sizes
01483 424378
07876 476990

Category: Linux

Linux based Operating Systems

Create Locally Trusted Host SSL Development Certificates

Use mkcert to making locally-trusted host development certificates that avoids browser self-certification dialog warning and requires little or no configuration

Install mkcert:

sudo apt update
sudo apt install libnss3-tools
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
chmod +x mkcert-v*-linux-amd64
sudo mv mkcert-v*-linux-amd64 /usr/local/bin/mkcert

Install the local CA:

mkcert -install

Generates and installs CA cert/key pair (rootCA-key.pem,rootCA.pem) in system trust store – $CAROOT (defaults to ~/.local/share/mkcert)
Installs local CA in the Firefox and/or Chrome/Chromium trust store (requires browser restart)

Generate certificate and key file for locally hosted website:

mkcert example.org localhost 127.0.0.1 ::1

Creates two files: example.org+3.pem (certificate) and example.org+3-key.pem (private key).

Continue Reading

Mount vhdx Image in Ubuntu

Install libguestfs library to allow accessing and modifying guest disk images

sudo apt-get install libguestfs-tools

Create mount point

sudo mkdir /mnt/vhd

Find target device filesystem using Guestfish – note this example is for ntfs system partition on device /dev/sd2

sudo guestfish --ro -a /path_to_vhd/vhd.vhdx

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: ‘help’ for help on commands
      ‘man’ to read the manual
      ‘quit’ to quit the shell

>

Continue Reading

Firefox Home Page Search Randomly Goes To Change Search Settings

Inadvertently hitting Up-Arrow just before striking the Enter key causes the search to select last drop down menu search option, i.e. “Change Search Settings” instead of searching the web. This could be intentional but more often than not it’s an annoyance. It also wipes the original search query forcing it to be retyped. In addition the “Change Search Settings” option doesn’t get highlighted to give you a clue that it is going to Change Search Settings.

Mount Microsoft Windows 7 System Image VHD in Linux

Install libguestfs tools for accessing and modifying virtual machine (VM) disk images

sudo yum install libguestfs-tools      # Fedora/RHEL/CentOS
sudo apt-get install libguestfs-tools  # Debian/Ubuntu

Mount Microsoft Windows 7 System Image Backup Virtual Hard Disk – VHD files using guestmount

Example to open a Windows System Image Backup VHD file stored on a backup drive (D:)

sudo mkdir /mnt/vhdmp
sudo guestmount --add /media/mike/New\ Volume/WindowsImageBackup/DESKTOP-86333F0/Backup\ 2023-11-28\ 145005/3300c520-45e9-48f0-aaca-5b5a0b380b77.vhdx --inspector --ro /mnt/vhdmp

Once mounted use Krusader (Admin mode) or Nautilus to open the mount point directory (\mnt\vhdmp) to browse the contents

Above example mounts in Read-Only mode.

Continue Reading

Mount Microsoft System Image Backup in Linux

Mount Microsoft Windows 7 System Image Backup Virtual Hard Disk – VHD file(s) in Linux using Guestmount

Example to open a System Image Backup VHD file stored on a USB backup drive (D:)

sudo mkdir /mnt/vhdmp
sudo guestmount --add /media/mike/New\ Volume/WindowsImageBackup/DESKTOP-86333F0/Backup\ 2023-11-28\ 145005/3300c520-45e9-48f0-aaca-5b5a0b380b77.vhdx --inspector --ro /mnt/vhdmp

Once mounted use Krusader (Admin mode) or Nautilus to open the mount point directory (\mnt\vhdmp) to browse contents

Mounted in Read-Only mode

To mount in Read-Write mode replace -ro with –rw.

Continue Reading

Exclude Loop devices from fdisk -l

sudo fdisk -l

Use SED script in command line to strip lines containing “Disk /dev/loop” pattern and delete following 5 lines including stripped line

sudo fdisk -l | sed -e '/Disk \/dev\/loop/,+5d'

~/.bashrc: alias shorthand to make it easier to remember

alias fdsk="sudo fdisk -l | sed -e '/Disk \/dev\/loop/,+5d'"

Then simply type fdsk in the command line and enter your password when prompted.

Credit remove dev loops

Continue Reading

Find Windows Version from File System using Linux

Example using bootable Live Mint 10.2 USB

Boot Mint USB
Install hivexget – contained within libhivex which is a self-contained library for reading and writing Windows Registry “hive” binary files

$ sudo apt install libhivex-bin
$ hivexget /media/mint/WINDOWS/Windows/System32/config/software 'Microsoft\Windows NT\CurrentVersion' \ | egrep 'BuildLab|ProductName|Version"|"ProductId'

Filtered output

"BuildLab"="19041.vb_release.191206-1406"
"BuildLabEx"="19041.1.amd64fre.vb_release.191206-1406"
"CurrentVersion"="6.3"
"EditionSubVersion"=""
"ProductName"="Windows 10 Pro"
"ProductId"="00330-80000-00000-AA669"
"DisplayVersion"="21H1"

Credit Superuser.com Post 11

Updraftplus plugin can’t read .directory file warnings

Unfortunately its not possible to exclude special Dolphin .directory files using Updraftplus settings. It ignores the setting exclusion and continues to report “…can’t read .directory” file warnings in the log file during backup.

To work around this add the following PHP code to your Functions file

//
// Updraftplus Backup filter
// Prevent attempts to backup .directory files and generate annoying warnings 
add_filter('updraftplus_exclude_file', 'my_updraftplus_exclude_file', 10, 2);
function my_updraftplus_exclude_file($filter, $file) {
return (basename($file) == '.directory') ? true : $filter;
}

Continue Reading

Fix Lost Dolphin File Copy Progress Notification

System: Kubuntu 18.04

Problem: No longer able to see file copy progress, e.g. Dolphin so you can’t monitor the progress and have no idea when it will complete

Solution edit the Plasma configuration file as follows:

Run Terminal and stop Plasma

kquitaap5 plasma

Edit

nano /home/[user]/.config/plasma-org.kde.plasma.desktop-appletsrc

Add the following

[AppletGlobals][plasma_applet_systemtray]
ShowJobs=false
ShowNotifications=false

Start Plasma again

kstart plasmashell

Credit: https://bbs.archlinux.org/viewtopic.php?id=70502

Continue Reading

Firefox Home Search Page moves Focus to Address Bar

To stop Firefox moving Home Search Page text focus to the Address Bar enter about:config in the Address Bar to bring up the advanced configuration page.

Type awesomebar in the search filter box to bring up the following variable

browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar

Toggle the boolean value from True (default) to False

ref: https://www.askvg.com/fix-restore-real-working-search-box-on-new-tab-page-in-firefox-89-and-later/