This article explains how to create some fractal plots with graphics.py, a popular graphics library for Python written by John Zelle. Graphics.py is a single file containing graphics functions such as Point, Line, Circle and Rectangle. Elsewhere on this blog, it’s been used to create sinusoidal patterns, including a Mexican hat/blancmange surface. This article focuses on the creation of fractal images.
Continue readingCategory Archives: Linux
Getting the Age of a File in Days in Bash
Gatting the age of a file in days is sometimes useful in scripts.
The date +%s command will give the current time in epoch seconds. It can be handily combined with -r, which causes date to use the modification time of a file rather than the current time. For example:
$ ls -l /etc/hosts
-rw-r--r-- 1 root root 3031 Mar 22 20:23 /etc/hosts
Our hosts file was last modified on March 22nd. Converting that date to "epoch" time, gives us the age of the file (since Jan 1970), in seconds:
Continue reading VMware Disconnection Caused by Network Manager Connectivity Check
A Windows virtual machine running under VMware 17 Pro was freezing several times a day, seemingly due to a brief network outage. The cause was found to be a Network Manager setting on the host computer, a laptop running Linux Mint 21.2. As explained below, the fix was to disable connectivity checking in the NM configuration, which is on by default, while noting the side effect of disabling captive portals.
Continue readingInstall and Optimize Linux Mint 21
This article is about installing and optimizing Linux Mint. The focus is on Mint 21, but it’s relevant to all versions. The best disk layout is discussed at the end of the article.
Install vs Update
If Mint is already installed on your system, then updating to the latest version is an option. I would recommend updating between minor versions, but for major versions, a fresh install is better.
Continue readingConnect a Second Monitor to Linux Mint with a USB to HDMI Adapter
Having a second or even a third monitor attached to your PC gives a helpful increase in screen space. Being able to have more windows and applications visible at once improves productivity and can reduce the stress of computer usage.
Generally, the number of screens is limited by the number of PC interfaces. Especially for laptops, which often have fewer ports than desktop/tower systems. Fortunately, the number of monitor ports can be increased by the addition of a simple adapter. For Windows users it’s easy. For Linux users, well it is quite easy too, as this article explains.
Continue readingInstall Docker on Raspberry Pi
This article explains how to install Docker on a Raspberry Pi, how to build a simple image, and how to run a container based on it.
Update 20/9/22: This procedure has been updated and tested successfully on RaspiOS “Bullseye”, release date 2022-09-06 (lite version).
Docker provides a mobile execution environment in which to run software. It is a very popular container technology. Docker is useful in the rapid deployment of applications and in application isolation. It is a valuable tool for developers, users and systems administrators. In this procedure, it will be used to install a simple video processing application called “comskip“.
Although the article is entitled Install Docker on Raspberry Pi, this procedure will work unaltered on most Linux distros, which is one of the advantages of Docker.
Besides acting as a demonstration for those wanting to learn about Docker, this article is aimed at readers of my previous articles How to Watch and Record Live TV with a Raspberry Pi and How to Install Comskip on a Rasperry Pi (without Docker).
Continue readingInterrupted System Call with CIFS Mount on Kernel 5.3.0
The above kernel causes previously working CIFS mounts to fail with an “interrupted system call” error. A Linux system which had been using a NAS share for years acquired the new kernel on 17th March 2020 and the mount became unstable thereafter.
Update. Resolved 13th June 2020. The issue was not seen again after an update to kernel version 5.3.0-53.
Continue readingHow to Install Comskip on a Raspberry Pi
The raspberry Pi makes a good platform for watching Live TV. Software packages like TVHeadend, OSMC/Kodi, NextPVR and Plex allow you to turn a normal Pi into a powerful media centre.
Recording your favourite TV shows is great, as is being able to skip through commercial breaks on playback. Every time an ad break arrives, just press “fast forward” a few times and hey presto, you are watching the next part of the show. You still have to actually press the button though, and sometimes rewind too, if the break is overshot. However, there are software tools that will skip the breaks for you, and one of these is Comskip.
This procedure explains how to install Comskip on a Raspberry Pi, with examples pertaining to TVHeadend. You might have come here from my earlier article “How to Watch and Record Live TV on a Raspberry Pi“, to which this article is an effective continuation. Or you might have some other existing system to which you want to add comskip. Even if you are using a different backend, like Plex, this article should still be useful.
Continue readingInstall Freeview Channel Logos for OSMC/Kodi
This brief article explains how to enhance an existing OSMC (or Kodi) installation by the addition of TV channel logos. Anyone who uses OSMC/Kodi for watching live TV might find it useful
A procedure for building your own OSMC server is explained in my accompanying article How to Watch and Record Live TV with a Raspberry Pi. You might have followed that procedure and be looking to add channel logos. Or you might have an existing OSMC setup. The procedure below should apply in either case. Special notes are included below for users who are running straight Kodi rather than OSMC.
The logo packs described are for Freeview and Freesat channels in the the UK. If you are not a Freeview or Freesat user, the installation process is the same, but you will need to source logo packs appropriate to the channels you are receiving.
Continue readingHow to Enlarge Kodi Fonts
Kodi is one of the most popular media centre solutions. However, unless you like to sit very close to the TV, the font sizes are a bit small. This article describes a simple procedure to improve legibility. It’s assumed that you are using the default Kodi skin, called “Estuary“. This article was updated 6th April 2020 and tested for Kodi 18.6.
The Kodi user interface is highly customizable, and there are many Internet pages explaining how it all works. But in this procedure, we will just make a few small changes. These instructions were originally written for OSMC running on a Raspberry Pi, but they work for stand alone Kodi too, and should also work for other hardware platforms.
Continue reading