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 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

Things to do after installation of Debian 12 (Bookworm)

Finally, I managed to install Debian 12 XFCE, also known as, Bookworm on my laptop and found that though it installed and booted successfully, it needed some issues to be resolved and some additional activities to be done. These are all listed below with links to the relevant posts. Assign sudo rights to a normal … Continue reading Things to do after installation of Debian 12 (Bookworm)

How to enable missing bluetooth icon in system tray in Debian

After installation of Debian 12, it appears that bluetooth is not working. However, all the services related to bluetooth on the computer are running, but the bluetooth icon does not appear in the system tray. To enable the bluetooth icon, install the blueman package. To do so, open a terminal window and enter the following … Continue reading How to enable missing bluetooth icon in system tray in Debian

How to fix poor resolution of menu fonts in Libreoffice

Libreoffice installed out of the box from Debian 12 displays a menu with an outdated theme. The fonts displayed appear distorted and squiggly. To overcome this issue, open a terminal window and enter the command below to install the libreoffice-gtk3 package. $ sudo apt-get install libreoffice-gtk3 <enter> Restart Libreoffice and the fonts now conform to … Continue reading How to fix poor resolution of menu fonts in Libreoffice

ffmpeg audio file editing commands

To edit video and audio files in ffmpeg, below are some commands. Open a terminal window and try them out. These are very useful when creating training videos. Extract mp3 audio from mp4 file$ ffmpeg -i video.mp4 -vn -ab 256k -ar 48000 -y audio.mp3 <enter> Split from 7 seconds to end$ ffmpeg -i audio.mp3 -ss … Continue reading ffmpeg audio file editing commands

Completely remove Firefox from Ubuntu Linux or Xubuntu or Debian

Exercise due caution with your data before doing these steps. Take a data backup first. In order to completely remove Firefox from Ubuntu Linux or Debian, open a terminal window and enter the following: Delete the application $ sudo apt-get purge firefox* <enter> Remove the folders $ sudo rm -Rf /etc/firefox <enter>$ sudo rm -Rf … Continue reading Completely remove Firefox from Ubuntu Linux or Xubuntu or Debian