How to fix Error Permission denied:’/dev/input/eventX’ running kivy app in Linux

On running a Python script in vscode with the kivy package, the error of Permission denied:'/dev/input/eventX' appears, where X is a number. To correct this error, open a terminal window and enter the following command: $ sudo chmod u+r /dev/input/eventX <enter> Above is only for one time execution. Error will repeat again if code is … Continue reading How to fix Error Permission denied:’/dev/input/eventX’ running kivy app in Linux

How to create a python virtual environment for a project in Linux

Python interpreters can be installed globally system-wide or as a virtual environment within a project folder. The advantage of within a virtual environment is isolation of the packages from system-wide use and execution. To set up a virtual environment for a project, open a terminal window and enter the following commands: $ sudo apt-get install … Continue reading How to create a python virtual environment for a project in Linux

How to convert PNG images in a directory to JPG using Python

To convert several PNG images to JPG images, the convert command in Linux was not good enough and gave errors. It seems it could not process the large volume of PNG files. Therefore, the image files were converted from PNG to JPG using Python using the following code. Before using the code, Python 3 gave … Continue reading How to convert PNG images in a directory to JPG using Python

How to replace line feeds in a text file with Python

The below Python code will replace line feeds in a text file with space or replace consecutive line feeds with one line feed. I named this replacelf.py. # file outtext in the current directory file_path = r"./outtext" # Note that the file has to be opened in binary mode. with open(file_path, "rb") as open_file: #read … Continue reading How to replace line feeds in a text file with Python

How to view heic format files in Linux Mint or Debian Linux

To view heic or heif format files in Debian Linux open a terminal window and enter below command:$ sudo apt-get install heif-gdk-pixbuf <enter> Now the default image viewer (ristretto, etc) will automatically be able to open these files. Without heif-gdk-pixbuf, the default application to open HEIC format files was gimp.

How to sort and rename files in Python on Linux and use tesseract OCR to extract text to a file

In order to convert a series of images with text as an image in them to text files, the best tool is tesseract. It is quite old, but very reliable when it comes to looking for and extracting text from images. After saving some screen shots as jpg files, it was found their names contained … Continue reading How to sort and rename files in Python on Linux and use tesseract OCR to extract text to a file

How to get dark theme in Geany Code Editor on LinuxMint, Debian, Xubuntu Linux

Even though a dark theme is chosen for the desktop in XFCE, geany will display it's toolbars and window elements in dark mode, but the code displays with a white background. To make it a dark background, go to Edit -> Preferences -> Editor -> Display and check the box that says "Invert syntax highlighting … Continue reading How to get dark theme in Geany Code Editor on LinuxMint, Debian, Xubuntu Linux

How to debug “There was a system error retrieving the price quotes” in Gnucash Finance::Quotes on Linux

There was a system error retrieving the price quotes. This error is a debugging nightmare as it is not specific, gives no clue as to where the error lies and there is no easy debugging mechanism to find out what went wrong. Nonetheless, all is not lost. In order to debug the problem, open a … Continue reading How to debug “There was a system error retrieving the price quotes” in Gnucash Finance::Quotes on Linux

How to mount internal disk drive in Debian 12 Linux without entering password everytime

When mouting an internal disk on Debian 12 Linux (Bookworm), a password is asked to be entered each time the internal disk is mounted. This is the root password. To stop the system from asking for a password each time the internal disk is to be mounted, open a terminal window and enter the following … Continue reading How to mount internal disk drive in Debian 12 Linux without entering password everytime

How to add fonts on the XFCE desktop in Linux

Fonts can be downloaded and then added to the XFCE Desktop in Linux by using the font manager. To install the font manager, open a terminal window and enter the commands as below: $ sudo apt-get install thunar-font-manager <enter> To run the font manager, enter: $ font-manager <enter> Or open thunar file manager, click on … Continue reading How to add fonts on the XFCE desktop in Linux