The Linux Page

Help other users realize that everything is possible, especially avoiding Windows for their own personal use.

Welcome to The Linux Page


Fox Trot by Bill Amend. Click to enlarge.
Click to enlarge

This site is a collection of my own work with Linux. Certain things are easy, others take time to decipher and if I ever need to repeat the work (which usually happens!), then I need to remember everything by memory or... have a site with all the steps taken and to take again.

The following are my most recent posts:

A Telephone post with many lines to the surrounding homes.

I have noticed that quite a few people were trying to create UDP communication and I thought that proposing my class could help them. This is very basic as it does not define anything such as the size of a packet or any protocol to ensure arrival of the packets. However, it can be useful if you want to send a signal from one process to another, which is exactly how I use this implementation (i.e. I send a PING message to wake up a background process whenever the front end adds data to the database.)

This code is part of the Snap! C++ implementation. The latest version can be found in GitHub ...

Rusty lock... when a deadlock happens, locks tend to rust over time.

Once in a while, in rather complicated application, I end up with a deadlock.

Looking for what is happening can be tedious since a deadlock doesn't tell you anything other than: this thread is waiting on a mutex (or possibly even a condition on a mutex).

In case of a deadlock, though, the mutex is already locked by another mutex and it is easy to find out which other thread locked the mutex.

In many cases, when a deadlock occurs, the two threads use the same two (or more) mutexes and at some point both are trying to lock those two mutexes out of order (A then B for one and B then A ...

Horse Eye Close Up

In the last two days, my Thunderbird installation was complaining about my GPG encryption key saying it was expired.

Error while saving draft - The key Alexis Wilke <alexis@m2osw.com> (key ID 0x123123123) has expired.

The interesting fact is that I created that key a long time ago so I guess even if you create a key for like 10 years, it still can expire... indecision

I found this page by Henning Koch with very simple list of steps on how to update the key. Here I have an updated copy. His page has a few other options you may also be interested in.

On my end, I have Thunderbird and the error ...

Upgrading PostgreSQL between OS upgrades

The following probably works with other versions of Linux, but I ran those commands on Ubuntu, so if you have a different OS, you may want to verify each step closely first.

The idea when you upgrade to a new OS is that the new version is available in that OS and the old version is now obsolete, so the best is to upgrade to the new database and make sure that the new database work. Then you can get rid of the old cluster.

The following are the steps I used:

sudo su -
su - postgresql
pg_dropcluster --stop 12 main
pg_upgradecluster 10 main

Once the transfer is done AND THE NEW ...

Forest Trail

Introduction

The cmake search algorithms are fairely simple, but it feels like each time I try to use them I make a small mistake and something goes wrong.

First there are three very important variables that are used in the search. Note that there are many other variables that can be used in the search which are listed on this page. But 99.9% of the time, these three are enough:

  1. CMAKE_MODULE_PATH

    This variable defines where to search for modules, but only if the prefix matches. Without a matching prefix, it somehow gets ignored.
     
  2. CMAKE_PREFIX_PATH

    ...

I had an issue on a system which could be started in a complete standalone manner. In other words, without an Internet connection.

That system runs 10 computers, 9 of which are slaves as far as NTP is concerned and these computers must have their clocked set as close as possible to the controller's clock or the system won't work as expected.

So the main issue was that by default NTP is setup to listen to a few NTP servers on the Internet and if it can't connect to the Internet, it pretty much shuts down. In other words, the ability of the server to allow the slaves to get time ...

Adjusting to your preference

When trying to setup the Ubuntu environment automatically by installing a package so it works as expected, I have to use the gsettings command. Only, in most cases, the posts you find online tell you to tweak such and such value and these are wrong about 50% of the time. (Or to be more correct, they changed over time and now those old posts give you the wrong answer each time).

In order to find out what you need to change, one way is to use the GUI to make the changes and compare the settings from before and after. Here are the steps to do exactly that:

1. Open the GUI preferences allowing ...

My new TP-Link and what I think about it...

TP-Link AC1900 (click to find it on Amazon.com where I'm an affiliate)

Introduction

As my old Belkin WiFi device was not able to properly support UDP packets that it was not even concerned about, I looked into a new system and selected the TP-Link AC 1900 also known as the Archer 9.

It works. But...

Setup

First I edited the settings. One reason I selected this (opposed to say a Google Nest thingy), is that this device has a normal web interface to edit the settings. I find that much better than the concept of the Google Nest WiFi router requires voice activation. I just ...

Removing the ffmpeg & ffprobe annoying banner permanently.

In some of my work, I use ffmpeg to compress/decompress video and audio files.

My big problem with the ffmpeg and ffprobe tools is the incredibly annoying banner that they print and covers most of my console output. It's not only useless, but it makes it really hard to very quickly see the standard output of the command. (if only they were to put a line of dash or something to separate that section with the next...)

Under Linux, there is actually a really easy way to prevent that stupid banner from appearing all the time. It's by using the alias command.

First, the command line ...

Hiding keyboard while typing.

Linux has options to encrypt zip or PDF files.

Note that the zip encryption capabilities are not very strong (i.e. they can be easily cracked). So don't use it if you can avoid it and keep in mind that most anyone can see what's inside either way.

zip --encrypt file.zip files

Note that there is an option to define the password on the command line (with --password) which is safe if you're the only user on your machine, but not so much on a shared machine since the password will appear in the list of processes.

And the PDF is very similar, but you have to enter the ...

Thank you for visiting my website.