Tutorials and tips on Fedora Linux, Python programming, and software development. Clear guides, source code, and practical examples by Catalin George Festila.
Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts
Thursday, July 9, 2026
Tuesday, June 16, 2026
Fedora immutable : Immutable Linux distributions and their development by the Fedora team.
What Are Immutable Linux Versions?
- Immutable Linux distributions are operating systems where the core system is read-only and cannot be modified directly by the user.
- Examples include Fedora Silverblue (GNOME-based) and Fedora Kinoite (KDE Plasma-based) ...
- The system is built from atomic images, similar to how mobile operating systems update.
- Applications and development tools run in containers instead of modifying the base system.
Main Characteristics and Functionality
- The base system is read-only, preventing accidental or harmful changes.
- Updates are atomic: the entire system updates as one unit and can be rolled back instantly.
- Applications are installed through Flatpak or container environments like Toolbox and Distrobox.
- System integrity is preserved because the OS image remains consistent across reboots.
Security Features
- The read-only system reduces the attack surface by preventing unauthorized modifications.
- Atomic updates ensure that incomplete or corrupted updates do not break the system.
- Containerized applications isolate software from the core system, improving security.
- Rollback capability allows users to revert to a previous working state after a failed update.
Hardware and Software Limitations
- Some proprietary drivers may require manual workarounds because the base system cannot be modified directly.
- Legacy hardware may not be fully supported due to the modern design of immutable systems.
- Traditional package managers like dnf or apt cannot install software into the base system.
- Advanced system customization is limited because configuration files are protected.
Advantages
- High stability due to the read-only system design.
- Fast and reliable updates with rollback support.
- Improved security through isolation and immutability.
- Ideal for developers using container-based workflows.
- Consistent system state across reboots and installations.
Disadvantages
- Less flexibility for users who want to modify system internals.
- Some software may not work if it requires direct system-level installation.
- Learning curve for users unfamiliar with Flatpak or container tools.
- Not ideal for niche hardware requiring custom drivers.
Immutable Fedora Linux Versions: Silverblue and Kinoite
What Are Immutable Linux Versions?
- Immutable Linux distributions are operating systems where the core system is read-only and cannot be modified directly by the user.
- Examples include Fedora Silverblue (GNOME-based) and Fedora Kinoite (KDE Plasma-based).
- The system is built from atomic images, similar to how mobile operating systems update.
- Applications and development tools run in containers instead of modifying the base system.
Main Characteristics and Functionality
- The base system is read-only, preventing accidental or harmful changes.
- Updates are atomic: the entire system updates as one unit and can be rolled back instantly.
- Applications are installed through Flatpak or container environments like Toolbox and Distrobox.
- System integrity is preserved because the OS image remains consistent across reboots.
Security Features
- The read-only system reduces the attack surface by preventing unauthorized modifications.
- Atomic updates ensure that incomplete or corrupted updates do not break the system.
- Containerized applications isolate software from the core system, improving security.
- Rollback capability allows users to revert to a previous working state after a failed update.
Hardware and Software Limitations
- Some proprietary drivers may require manual workarounds because the base system cannot be modified directly.
- Legacy hardware may not be fully supported due to the modern design of immutable systems.
- Traditional package managers like dnf or apt cannot install software into the base system.
- Advanced system customization is limited because configuration files are protected.
Advantages
- High stability due to the read-only system design.
- Fast and reliable updates with rollback support.
- Improved security through isolation and immutability.
- Ideal for developers using container-based workflows.
- Consistent system state across reboots and installations.
Disadvantages
- Less flexibility for users who want to modify system internals.
- Some software may not work if it requires direct system-level installation.
- Learning curve for users unfamiliar with Flatpak or container tools.
- Not ideal for niche hardware requiring custom drivers.
Why Fedora Atomic Desktop Versions Lag Behind Workstation
Fedora Atomic Desktops (immutable editions - 40) do not follow the same release pace as Fedora Workstation 44 – April 2026.
While Workstation receives a new version every six months, the immutable editions often remain several versions behind.
This happens because immutable systems require additional testing, image validation, and stability checks before release.
Main Reasons for Version Differences
- Immutable systems use rpm-ostree, which requires more complex testing than traditional package-based systems.
- Atomic updates and rollback functionality must be verified for every release.
- Desktop environments must be adapted to work correctly in a read-only system.
- The Fedora Atomic team is smaller and focuses on stability over rapid version progression.
- New immutable editions (Onyx, Aurora, Sericea) increased development workload.
Current Immutable Editions
- Fedora Silverblue (immutable, GNOME)
- Fedora Kinoite (immutable, KDE Plasma)
- Fedora Sericea (immutable, Sway)
- Fedora Onyx (immutable, Budgie)
- Fedora Aurora (immutable, LXQt)
Release Timeline for Immutable Editions
- Fedora releases occur twice per year: April and October.
- Workstation versions advance regularly (e.g., Fedora 44 in 2026).
- Immutable editions often remain at older versions (e.g., Silverblue 40) until stability is guaranteed.
- Development for immutable editions happens first in Rawhide, then moves to a stable branch.
- Version numbers for immutable editions may skip or delay compared to Workstation.
Development
- Atomic Rawhide (future Fedora 41 Atomic)
- Rawhide is the testing ground for all new immutable features.
- New images are built and validated before becoming a stable release.
How Development Works for Immutable Fedora
- All new changes are introduced in Rawhide, the rolling development branch.
- The system is built as an OSTree image instead of traditional packages.
- Each image must pass atomic update and rollback validation.
- Flatpak integration and container tools (Toolbox, Distrobox) must be tested for compatibility.
- Only after stability is confirmed, the immutable edition receives a new version number.
Why Immutable Editions Prioritize Stability
- Atomic systems must guarantee that updates never break the OS.
- Rollback must work flawlessly for every release.
- Desktop environments must behave correctly in a read-only environment.
- Consistency and reliability are more important than rapid version progression.
Posted by
Cătălin George Feștilă
Labels:
2026,
Fedora,
Fedora immutable,
linux,
Linux 32,
Linux 64,
linux tools,
tutorial,
tutorials
Tuesday, June 2, 2026
Fedora 44 : the Zert plugin manager.
Zert is a pure-Zsh plugin manager built around a simple idea: your plugins should be declared directly in your .zshrc, pinned to exact commits, and reproducible on any machine just like npm does for Node projects.
This project can be found on this GitHub repo.
Let's see some commands:
zert zert # zert manages itself
zert use ohmyzsh # enable Oh-My-Zsh compatibility
zert ohmyzsh lib/clipboard # OMZ library
zert use prezto # enable Prezto compatibility
zert prezto modules/utility # Prezto module
zert zsh-users/zsh-autosuggestions # GitHub shorthand
zert https://github.com/user/repo # full URL
zert user/repo --branch dev # track a branch
zert /home/me/my-plugin # local plugin
zert user/plugin --pin abc123 # pin to commit
zert user/plugin --branch dev # track branch
zert user/plugin --no-alias # skip aliases
zert user/plugin --no-completion # skip completions
zert user/plugin --only-completion # completions only
zert list # show installed plugins
zert update # update all plugins
zert prune # remove unused pluginsFriday, April 10, 2026
Fedora 44 : testing Django 6.0.4 .
Today I used Fedora 44 beta 12 server on VirtualBox, and I wanted to test how Python works with Django on this Linux distribution. In the Fedora distribution, I have Python version 3.14.3 and Django version 6.0.4. I created a basic project with multiple pages, CSS, JavaScript, and an admin interface. It seems that Django is functional, and the result is very good for a basic project.:
Posted by
Cătălin George Feștilă
Labels:
2026,
django,
Fedora,
Fedora 44,
linux tools,
python,
python 3,
tutorial,
tutorials,
web development,
youtube
Sunday, January 5, 2025
Fedora 41 : the pref tool under Fedora.
Today I tested the perf tool in Fedora 41 and it is a bit difficult to use. I documented myself and found some information on the web and in the online linux community. Here is what I thought was worth remembering and what I tested.
The pref tool can't run anyway:
mythcat@fedora:~/PythonProjects$ perf record -e cache-misses,page-faults,minor-faults,major-faults,cpu-migrations,L1-dcache-load-misses,L1-dcache-store-misses,L1-icache-load-misses,LLC-load-misses,LLC-store-misses,dTLB-load-misses,dTLB-store-misses,iTLB-load-misses
Error:
Access to performance monitoring and observability operations is limited.
Enforced MAC policy settings (SELinux) can limit access to performance
monitoring and observability operations. Inspect system audit records for
more perf_event access control information and adjusting the policy.
Consider adjusting /proc/sys/kernel/perf_event_paranoid setting to open
access to performance monitoring and observability operations for processes
without CAP_PERFMON, CAP_SYS_PTRACE or CAP_SYS_ADMIN Linux capability.
More information can be found at 'Perf events and tool security' document:
https://www.kernel.org/doc/html/latest/admin-guide/perf-security.html
perf_event_paranoid setting is 2:
-1: Allow use of (almost) all events by all users
Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK
>= 0: Disallow raw and ftrace function tracepoint access
>= 1: Disallow CPU event access
>= 2: Disallow kernel profiling
To make the adjusted perf_event_paranoid setting permanent preserve ...I used with sudo , wait and Ctrl + C to stop:
mythcat@fedora:~/PythonProjects$ sudo perf record -e cache-misses,page-faults,minor-faults,major-faults,cpu-migrations,L1-dcache-load-misses,L1-dcache-store-misses,L1-icache-load-misses,LLC-load-misses,LLC-store-misses,dTLB-load-misses,dTLB-store-misses,iTLB-load-misses ...To get the accurate number of events count then number of results:
mythcat@fedora:~/PythonProjects$ perf report -D -i perf.data | grep RECORD_SAMPLE | wc -l
22461I get my pref data and I saw all my system data with:
mythcat@fedora:~/PythonProjects$ sudo perf report -f -i perf.data 
Posted by
Cătălin George Feștilă
Labels:
2025,
Fedora,
Fedora 41,
linux,
linux tools,
pref,
tutorial,
tutorials
Friday, January 3, 2025
Fedora 41 : NVim from sources or packages !
Today I tried the nvim and saw this big issue:
root@fedora:/home/mythcat# dnf5 install neovim
...
Package Arch Version Repository Size
Installing:
neovim x86_64 0.10.2-1.fc41 fedora 29.1 MiB
...
Installing weak dependencies:
nodejs x86_64 1:22.11.0-3.fc41 updates 148.5 KiB
nodejs-docs noarch 1:22.11.0-3.fc41 updates 91.9 MiB
nodejs-full-i18n x86_64 1:22.11.0-3.fc41 updates 29.3 MiB
nodejs-npm x86_64 1:10.9.0-1.22.11.0.3.fc41 updates 9.4 MiB
ripgrep x86_64 14.1.1-1.fc41 updates 4.7 MiB
tree-sitter-cli x86_64 0.23.2-1.fc41 updates 12.4 MiB
wl-clipboard x86_64 2.2.1-3.fc41 fedora 140.9 KiB
xsel x86_64 1.2.1-2.fc41 fedora 47.9 KiB
You can see comes with nodejs. I remove the nodejs and I tested nvim and works.
Using the source code works also well:
root@fedora:/home/mythcat# curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 11.4M 100 11.4M 0 0 5739k 0 0:00:02 0:00:02 --:--:-- 14.1M
root@fedora:/home/mythcat# sudo rm -rf /opt/nvim
root@fedora:/home/mythcat# sudo tar -C /opt -xzf nvim-linux64.tar.gz
root@fedora:/home/mythcat# export PATH="$PATH:/opt/nvim-linux64/bin"
root@fedora:/home/mythcat# nvim
Posted by
Cătălin George Feștilă
Labels:
2025,
Fedora,
Fedora 41,
linux tools,
nvim,
tutorial,
tutorials
Saturday, December 14, 2024
Fedora 41 : OpenCV example with PyQt6.
Today I tested another source code with opencv, numpy, PyQt6 python packages.
I install opencv python package with dnf5 tool:
root@localhost:/home/mythcat# dnf5 install python3-opencv.x86_64The source code let you to open, change a image and save using sliders and a reset option.

This is the source code:
import sys
import cv2
import numpy as np
from PyQt6.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QLabel, QSlider, QFileDialog, QPushButton, QHBoxLayout
from PyQt6.QtGui import QImage, QPixmap
from PyQt6.QtCore import Qt, pyqtSlot
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Real-Time Color Selection")
self.setGeometry(100, 100, 1200, 800)
# Create central widget and main layout
central_widget = QWidget()
self.setCentralWidget(central_widget)
main_layout = QVBoxLayout(central_widget)
# Create image label
self.image_label = QLabel()
main_layout.addWidget(self.image_label)
# Initialize sliders
self.lower_h = QSlider(Qt.Orientation.Horizontal)
self.lower_s = QSlider(Qt.Orientation.Horizontal)
self.lower_v = QSlider(Qt.Orientation.Horizontal)
self.upper_h = QSlider(Qt.Orientation.Horizontal)
self.upper_s = QSlider(Qt.Orientation.Horizontal)
self.upper_v = QSlider(Qt.Orientation.Horizontal)
# Set slider ranges
for slider in [self.lower_h, self.upper_h]:
slider.setRange(0, 179)
for slider in [self.lower_s, self.lower_v, self.upper_s, self.upper_v]:
slider.setRange(0, 255)
# Set initial slider values
self.lower_h.setValue(50)
self.lower_s.setValue(100)
self.lower_v.setValue(50)
self.upper_h.setValue(130)
self.upper_s.setValue(255)
self.upper_v.setValue(255)
# Connect sliders to update function
self.lower_h.valueChanged.connect(self.update_hsv_range)
self.lower_s.valueChanged.connect(self.update_hsv_range)
self.lower_v.valueChanged.connect(self.update_hsv_range)
self.upper_h.valueChanged.connect(self.update_hsv_range)
self.upper_s.valueChanged.connect(self.update_hsv_range)
self.upper_v.valueChanged.connect(self.update_hsv_range)
# Create slider layouts with labels
sliders_layout = QVBoxLayout()
# Add slider pairs with labels
slider_pairs = [
("Lower Hue", self.lower_h),
("Lower Saturation", self.lower_s),
("Lower Value", self.lower_v),
("Upper Hue", self.upper_h),
("Upper Saturation", self.upper_s),
("Upper Value", self.upper_v)
]
for label_text, slider in slider_pairs:
row_layout = QHBoxLayout()
label = QLabel(label_text)
label.setMinimumWidth(120)
row_layout.addWidget(label)
row_layout.addWidget(slider)
sliders_layout.addLayout(row_layout)
main_layout.addLayout(sliders_layout)
# Add buttons
button_layout = QHBoxLayout()
self.reset_button = QPushButton("Reset Values")
self.reset_button.clicked.connect(self.reset_values)
button_layout.addWidget(self.reset_button)
self.open_image_button = QPushButton("Open Image")
self.open_image_button.clicked.connect(self.open_image)
button_layout.addWidget(self.open_image_button)
self.save_button = QPushButton("Save Image")
self.save_button.clicked.connect(self.save_image)
button_layout.addWidget(self.save_button)
main_layout.addLayout(button_layout)
# Process initial image
self.process_image()
def process_image(self):
image_bgr = cv2.imread("image.png")
if image_bgr is None:
image_bgr = cv2.imread("default_image.png")
self.image_bgr = image_bgr
self.image_hsv = cv2.cvtColor(image_bgr, cv2.COLOR_BGR2HSV)
# Create initial mask using current slider values
lower_values = np.array([self.lower_h.value(), self.lower_s.value(), self.lower_v.value()])
upper_values = np.array([self.upper_h.value(), self.upper_s.value(), self.upper_v.value()])
mask_test = cv2.inRange(self.image_hsv, lower_values, upper_values)
image_bgr_masked = cv2.bitwise_and(image_bgr, image_bgr, mask=mask_test)
self.image_rgb = cv2.cvtColor(image_bgr_masked, cv2.COLOR_BGR2RGB)
self.update_image()
def update_image(self):
height, width, channel = self.image_rgb.shape
bytes_per_line = width * channel
q_image = QImage(self.image_rgb.data, width, height, bytes_per_line, QImage.Format.Format_RGB888)
pixmap = QPixmap.fromImage(q_image)
self.image_label.setPixmap(pixmap.scaled(700, 500, Qt.AspectRatioMode.KeepAspectRatio))
def update_hsv_range(self):
lower_values = np.array([self.lower_h.value(), self.lower_s.value(), self.lower_v.value()])
upper_values = np.array([self.upper_h.value(), self.upper_s.value(), self.upper_v.value()])
mask_test = cv2.inRange(self.image_hsv, lower_values, upper_values)
image_bgr_masked = cv2.bitwise_and(self.image_bgr, self.image_bgr, mask=mask_test)
self.image_rgb = cv2.cvtColor(image_bgr_masked, cv2.COLOR_BGR2RGB)
self.update_image()
def reset_values(self):
self.lower_h.setValue(50)
self.lower_s.setValue(100)
self.lower_v.setValue(50)
self.upper_h.setValue(130)
self.upper_s.setValue(255)
self.upper_v.setValue(255)
def open_image(self):
filename, _ = QFileDialog.getOpenFileName(self, "Select Image File", "", "Image Files (*.png *.jpg *.jpeg)")
if filename:
self.image_bgr = cv2.imread(filename)
if self.image_bgr is not None:
self.image_hsv = cv2.cvtColor(self.image_bgr, cv2.COLOR_BGR2HSV)
self.update_hsv_range() # This will apply current filter and update display
def save_image(self):
filename, _ = QFileDialog.getSaveFileName(self, "Save Image", "", "PNG Files (*.png);;JPEG Files (*.jpg)")
if filename:
# Make sure filename has an extension
if not filename.endswith(('.png', '.jpg', '.jpeg')):
filename += '.png'
# Convert and save
output_image = cv2.cvtColor(self.image_rgb, cv2.COLOR_RGB2BGR)
cv2.imwrite(filename, output_image)
if __name__ == "__main__":
app = QApplication(sys.argv)
window = MainWindow()
window.show()
sys.exit(app.exec())
Posted by
Cătălin George Feștilă
Labels:
2024,
cv2,
Fedora 41,
linux,
linux tools,
numpy,
opencv-python,
pip,
PyQt6,
python,
python 3,
tutorial,
tutorials
Monday, November 25, 2024
Fedora 41 : assembly fasm with cat command and qemu test.
I tested the basic direct binary concatenation where the second file is appended to the end of the first file, preserving all bytes exactly as they are without any linking metadata or relocations with the cat command.
Let's see how can do this.
You need to create two files: kernel.fasm and kernel2.fasm.
First will like this:
org 7C00h
; First stage bootloader
start:
mov [bootdrive], dl
mov ax, 0x2000 ; Load kernel at 0x2000:0
mov es, ax
xor bx, bx ; ES:BX = buffer
mov ah, 02h ; Read sectors
mov al, 6 ; Number of sectors to read
mov ch, 0 ; Cylinder 0
mov cl, 2 ; Start from sector 2
mov dh, 0 ; Head 0
mov dl, [bootdrive]
int 13h
jmp 0x2000:0 ; Jump to second stage
bootdrive db 0
times 510-($-$$) db 0
dw 0xAA55The second one named kernel2.fasm will come with new features:
org 0
COLS equ 80
ROWS equ 25
VIDEO_MEM equ 0xB800
; Box drawing characters
BOX_DR equ 201 ; ╔
BOX_HL equ 205 ; ═
BOX_DL equ 187 ; ╗
BOX_VL equ 186 ; ║
BOX_UR equ 200 ; ╚
BOX_UL equ 188 ; ╝
BOX_BLOCK equ 219 ; █
...Use fasm and cat commands to create the bin files and the result file for qemu:
mythcat@localhost:~/fasm$ ./fasm.x64 kernel.fasm kernel.bin
flat assembler version 1.73.32 (16384 kilobytes memory, x64)
2 passes, 512 bytes.
mythcat@localhost:~/fasm$ ./fasm.x64 kernel2.fasm kernel2.bin
flat assembler version 1.73.32 (16384 kilobytes memory, x64)
2 passes, 132 bytes.
mythcat@localhost:~/fasm$ cat kernel.bin kernel2.bin > os.imgThe last step is to run qemu-system-i386 to test the result
mythcat@localhost:~/fasm$ qemu-system-i386 -fda os.imgThe result is this:

Sunday, November 24, 2024
Fedora 41 : Error gio default application for image.
I run today an old python script in my Fedora 41 to create an image and the result after running was:
mythcat@localhost:~$ python test_001.py
gio: file:///tmp/tmpwy1k4wyo.PNG: Failed to find default application for content type ‘image/png’This can be fixed with an default application for images like feh:
$ sudo dnf5 install fehFedora 41 : remove package lead to unexpected results.
Today I saw the mutter package from Fedora distro come with a new update.
I don't use this package, ... is a mess in my oppinion.
But I found this output when I tried to remove
root@localhost:/home/mythcat# dnf5 remove mutter
Package Arch Version Reposit Size
Removing:
mutter x86_64 47.1-3.fc41 updates 12.5 MiB
Removing dependent packages:
gdm x86_64 1:47.0-8.fc41 updates 5.3 MiB
gnome-shell x86_64 47.1-1.fc41 updates 13.8 MiB
Removing unused dependencies:
accountsservice x86_64 23.13.9-5.fc41 fedora 379.5 KiB
accountsservice-libs x86_64 23.13.9-5.fc41 fedora 212.3 KiB
bluez-obexd x86_64 5.79-1.fc41 updates 345.1 KiB
bolt x86_64 0.9.8-3.fc41 fedora 503.3 KiB
boost-thread x86_64 1.83.0-8.fc41 fedora 136.8 KiB
color-filesystem noarch 1-34.fc41 fedora 151.0 B
colord x86_64 1.4.7-5.fc41 fedora 1.7 MiB
colord-gtk4 x86_64 0.3.1-2.fc41 fedora 35.6 KiB
composefs-libs x86_64 1.0.6-1.fc41 fedora 166.3 KiB
cups-pk-helper x86_64 0.2.7-8.fc41 fedora 379.0 KiB
dbus-daemon x86_64 1:1.14.10-4.fc41 fedora 553.2 KiB
evolution-data-server x86_64 3.54.1-1.fc41 updates 8.8 MiB
evolution-data-server-langpacks noarch 3.54.1-1.fc41 updates 8.8 MiB
flatpak-libs x86_64 1.15.10-1.fc41 fedora 1.0 MiB
...
Is this ok [y/N]: N
... If I used this command the gdm and gnome-shell is gone:
root@localhost:/home/mythcat# dnf5 remove --noautoremove mutter
Package Arch Version Repository Size
Removing:
mutter x86_64 47.1-3.fc41 updates 12.5 MiB
Removing dependent packages:
gdm x86_64 1:47.0-8.fc41 updates 5.3 MiB
gnome-session-wayland-session x86_64 47.0.1-1.fc41 fedora 15.9 KiB
gnome-shell x86_64 47.1-1.fc41 updates 13.8 MiB
Transaction Summary:
Removing: 4 packages
Is this ok [y/N]: N
...I tried with the --noautoremove, and --exclude args and not result:
root@localhost:/home/mythcat# dnf5 remove --noautoremove --exclude=gnome-shell,gdm mutter
Failed to resolve the transaction:
Problem: installed package gnome-shell-47.1-1.fc41.x86_64 requires libmutter-15.so.0()(64bit), but none of the providers can be installed
- installed package gnome-shell-47.1-1.fc41.x86_64 requires libmutter-clutter-15.so.0()(64bit), but none of the providers can be installed
- installed package gnome-shell-47.1-1.fc41.x86_64 requires libmutter-cogl-15.so.0()(64bit), but none of the providers can be installed
- installed package gnome-shell-47.1-1.fc41.x86_64 requires libmutter-mtk-15.so.0()(64bit), but none of the providers can be installed
- installed package gnome-shell-47.1-1.fc41.x86_64 requires mutter(x86-64) >= 47.0, but none of the providers can be installed
- conflicting requests
- problem with installed package
The solution is old rpm tool:
root@localhost:/home/mythcat# rpm -e --nodeps mutter
root@localhost:/home/mythcat# dnf5 remove mutter
No packages to remove for argument: mutter
Nothing to do.
Sunday, October 27, 2024
Fedora 42 : Can be better? part 020.
I wrote in some posts about this blog about the possibility of improving the distribution of Linux Fedora.
Today I discovered that choosing GNOME is a better option with lighting modes and options for the Nemo file manager actions.
I would have wanted to have a better network system similar to portmanager with S.P.N. for fedora users and team on web.
SPN (Secure Peer Name) is a technology related to secure communication protocols, particularly in the context of peer-to-peer
networks and distributed systems.
I want to have more tools and applications on tty with GUI, like ncurses... I created an radio online application with ncurses and you can find it on my pagure.
The main goal of these type of graphic user interface is simplicity, no need hardware resources - this HP Compaq 6710b has only 4Gb RAM, and cand be used with Single Board Computer.
I think Fedora don't have a Fedora Spin for Single Board Computer hardware.
Let's start with python 3 action on nemo file manager.
Go to the action folder and create an action file named: python3.nemo_action.
[root@fedora mythcat]# cd /usr/share/nemo/actions
[root@fedora actions]# nano python3.nemo_actionAdd this source code :
[Nemo Action]
Name=Execute Python Script
Icon-Name=python
Exec=env /usr/bin/python3 %F
Selection=S
Name[tr]=Python script
Extensions=py;Reopen the Nemo file manager and you see an an Execute Python Script, only on the python script on right click menu.
Let's see some screenshots:



Posted by
Cătălin George Feștilă
Labels:
2024,
Fedora,
Fedora 42,
module,
python 3,
python modules,
tutorial,
tutorials
Saturday, October 26, 2024
Fedora 42 : ... testing Advanced Intrusion Detection Environment (AIDE).
Advanced Intrusion Detection Environment (AIDE) is a utility that creates a database of files on the system, and then uses that database to ensure file integrity and detect system intrusions.. See more on the official fedora documentation webpage.
NOTE : The documentation and translations on the official page are in progress due to ongoing development and resource management
...
I used the DNF tool to install:
[mythcat@fedora ~]$ sudo dnf install aide
... aide x86_64 0.18.6-5.fc41 rawhide Make sure the AIDE database file exists and is accessible:
[mythcat@fedora ~]$ sudo ls -l /var/lib/aide/aide.db.gzEnsure that the user running AIDE has the necessary permissions:
[mythcat@fedora ~]$ sudo ls -l /var/lib/aide/Check the AIDE configuration file:
[mythcat@fedora ~]$ sudo cat /etc/aide.conf | grep DBDIRCheck if the AIDE service file exists:
[mythcat@fedora ~]$ sudo ls /usr/lib/systemd/system/ | grep aideIf the service exists then check the status:
[mythcat@fedora ~]$ sudo systemctl status aide
Unit aide.service could not be found.If the service not exist then take some time to run first time ...
[mythcat@fedora ~]$ sudo /sbin/aide --init
...
End timestamp: 2024-10-26 14:10:00 +0300 (run time: 98m 41s)You can check each time you want ...
[mythcat@fedora ~]$ sudo /sbin/aide --checkIf you want and your Fedora linux need to use this tool, then you can use it like service:
sudo nano /usr/lib/systemd/system/aide.serviceFill with the basic service source code like any unit service :
[Unit]
Description=Advanced Intrusion Detection Environment
After=network.target
[Service]
Type=simple
ExecStart=/sbin/aide --init
ExecStop=/sbin/aide --check
Restart=on-failure
[Install]
WantedBy=multi-user.target
This is a simple tutorial about how to start with AIDE tool ...
Sunday, October 13, 2024
Fedora 42 : The cvxpy python module ... part 001.
We are building a CVXPY community on Discord. Join the conversation!
CVXPY is an open source Python-embedded modeling language for convex optimization problems. It lets you express your problem in a natural way that follows the math, rather than in the restrictive standard form required by solvers.
Today I install the cvxpy python module ...
You can see on the official website - www.cvxpy.org .
NOTE: I don't understand why the blogger don't have a a code tag , I used a div - pre - code into txt file to wrote my posts ...
[mythcat@fedora ~]$ nano tutoriale.txt Let's see ...
[mythcat@fedora home]# dnf5 upgrade
[mythcat@fedora home]# dnf5 install openblas-devel
[mythcat@fedora home]# dnf5 install blas-devel
...
$ ldconfig -p | grep openblas
$ ldconfig -p | grep blas
...
[mythcat@fedora home]$ pip install cvxpy
...
Successfully built cvxpy ecos scs qdldl
Installing collected packages: scipy, scs, qdldl, ecos, clarabel, osqp, cvxpy
Successfully installed clarabel-0.9.0 cvxpy-1.5.2 ecos-2.0.14 osqp-0.6.7.post3 qdldl-0.1.7.post4 scipy-1.14.1 scs-3.2.7Thursday, October 10, 2024
Fedora 42 : First test with red language - part 001.
Red is a next-generation programming language strongly inspired by Rebol, but with a broader field of usage thanks to its native-code compiler, from system programming to high-level scripting and cross-platform reactive GUI, while providing modern support for concurrency, all in a zero-install, zero-config, single ~1MB file!
I download and change to be executable:
[mythcat@fedora ~]$ cd red-lang/
[mythcat@fedora red-lang]$ ls
red-03oct24-920dd0452 red-toolchain-03oct24-920dd0452 red-view-03oct24-920dd0452
[mythcat@fedora red-lang]$ ls -l
total 4444
-rw-r--r--. 1 mythcat mythcat 1347348 Oct 4 23:56 red-03oct24-920dd0452
-rw-r--r--. 1 mythcat mythcat 1611781 Oct 4 23:55 red-toolchain-03oct24-920dd0452
-rw-r--r--. 1 mythcat mythcat 1589092 Oct 4 23:55 red-view-03oct24-920dd0452
[mythcat@fedora red-lang]$ chmod 760 red*
[mythcat@fedora red-lang]$ ls -l
total 4444
-rwxrw----. 1 mythcat mythcat 1347348 Oct 4 23:56 red-03oct24-920dd0452
-rwxrw----. 1 mythcat mythcat 1611781 Oct 4 23:55 red-toolchain-03oct24-920dd0452
-rwxrw----. 1 mythcat mythcat 1589092 Oct 4 23:55 red-view-03oct24-920dd0452I check and install these supporting libraries:
sudo yum install glibc.i686
sudo yum install libcurl.i686
sudo yum install gtk3.i686I start with the basic intro example from the official website.
Then I need to check the missing files with the DNF tool and install Fedora packages for each error on runtime with executable result
dnf provides \*/libgtk-3.so.0The result is this:

Posted by
Cătălin George Feștilă
Labels:
2024,
development,
dnf,
dnf5,
Fedora,
Fedora 42,
red,
tutorial,
tutorials
Monday, October 7, 2024
Fedora 42 : Fedora game project with pygame and agentpy - part 004.
... working on hacking game code , you can test two version of the unfinished game with agentpy at my pagure Fedora account.
* Hack the code based on minimal information versus total information.
The code has 5 distinct letters.
- click on the letters on the keypad
- the number of guessed letters is displayed in the form: centered - guessed letters on positions and moved guessed letters but on other positions
NOTE: the source code is under development, I need to enter a scroll to be able to enter more codes with letters
Saturday, September 28, 2024
Fedora 42 : testing programming for ARM - part 001.
Today I tested the creation of a program that works on ARM processors and tested with QEMU emulator in Fedora 42.
I install with dnf5 these fedora packages:
[root@fedora mythcat]# dnf5 clean all
[root@fedora mythcat]# dnf5 install qemu-system-arm
[root@fedora mythcat]# dnf5 install arm-none-eabi-gcc gcc-arm-linux-gnu gcc-c++-arm-linux-gnu
[root@fedora mythcat]# dnf5 install arm-none-eabi-newlib.noarch
...
[root@fedora mythcat]# dnf5 install binutils-develI create a new folder into may pagure account to test this issue with QEMU:
[mythcat@fedora mythcat]$ mkdir ARMProjects
[mythcat@fedora mythcat]$ cd ARMProjects/
[mythcat@fedora ARMProjects]$ qemu-system-arm --version
QEMU emulator version 9.1.0 (qemu-9.1.0-2.fc42)I create a default assembly file for ARM named hello.s:
[mythcat@fedora ARMProjects]$ cat hello.s
.global _start
_start:
mov r0, #1
mov r7, #4
str r0, [r7]
bx lrLet's see how this means:
- global _start: This declares the _start label as global, making it
accessible from outside the file.
- _start:: This marks the beginning of the program.
- mov r0, #1: Moves the immediate value 1 into register R0.
- mov r7, #4: Moves the immediate value 4 into register R7. This represents the system call number for write().
- str r0, [r7]: Stores the contents of R0 (which contains 1) into the memory address pointed to by R7.
- bx lr: Branches to the address in Link Register (LR). In this case, it loops indefinitely because there's no return instruction.
The compile of the file:
[mythcat@fedora ARMProjects]$ arm-none-eabi-gcc -nostartfiles -lc hello.s -o hello.o
[mythcat@fedora ARMProjects]$ ls
hello.o hello.sLet's see the hello.o file:
[mythcat@fedora ARMProjects]$ nm hello.o
00008000 t $a
00009010 T __bss_end__
00009010 T _bss_end__
00009010 T __bss_start
00009010 T __bss_start__
00009010 T __data_start
00009010 T _edata
00009010 T __end__
00009010 T _end
00080000 B _stack
00008000 T _start
[mythcat@fedora ARMProjects]$ objdump -f hello.o
hello.o: file format elf32-little
architecture: UNKNOWN!, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00008000
Posted by
Cătălin George Feștilă
Labels:
2024,
ARM,
development,
dnf,
dnf5,
Fedora,
Fedora 42,
tutorial,
tutorials
Fedora 42 : ima: Error Communicating to TPM chip ... cannot be fixed.
TPM stands for Trusted Platform Module. It's a hardware security chip designed to provide cryptographic
capabilities and perform platform authentication.
I found this error and I tried to fix on my laptop HP 6710b:
[mythcat@fedora ~]$ sudo dmesg | grep Error
[ 1.274790] tpm tpm0: [Hardware Error]: Adjusting reported timeouts: A 750->750000us B 2000->2000000us C 750->750000us D 750->750000us
[ 2.240276] ima: Error Communicating to TPM chip
[ 2.243913] ima: Error Communicating to TPM chip
[ 2.246923] ima: Error Communicating to TPM chip
[ 2.249919] ima: Error Communicating to TPM chip
[ 2.253088] ima: Error Communicating to TPM chip
[ 2.255923] ima: Error Communicating to TPM chip
[ 2.258921] ima: Error Communicating to TPM chip
[ 2.261938] ima: Error Communicating to TPM chip
[ 2.415255] RAS: Correctable Errors collector initiaI update and nistall with the dnf5 tool
[root@fedora mythcat]# dnf5 upgrade
...
[root@fedora mythcat]# dnf install tpm-tools
...I reboot the Fedora and I try to test it:
[mythcat@fedora ~]$ ls /dev/tpm*
/dev/tpm0
[mythcat@fedora ~]$ lsmod | grep tpm
tpm_infineon 20480 0To see all commands, use:
[mythcat@fedora ~]$ tpm_
tpm_changeownerauth tpm_nvwrite tpm_setclearable
tpm_clear tpm_resetdalock tpm_setenable
tpm_createek tpm_restrictpubek tpm_setoperatorauth
tpm_getpubek tpm_restrictsrk tpm_setownable
tpm_nvdefine tpm_revokeek tpm_setpresence
tpm_nvinfo tpm_sealdata tpm_takeownership
tpm_nvread tpm_selftest tpm_unsealdata
tpm_nvrelease tpm_setactive tpm_versionI install tcsd
[root@fedora mythcat]# dnf install tcsd
...
[mythcat@fedora ~]$ sudo usermod -a -G tss $USER
[root@fedora mythcat]# systemctl daemon-reload
[root@fedora mythcat]# systemctl start tcsd
[root@fedora mythcat]# systemctl status tcsdI check the tpm version vith:
[mythcat@fedora ~]$ tpm_version
TPM 1.2 Version Info:
Chip Version: 1.2.1.2
Spec Level: 2
Errata Revision: 0
TPM Vendor ID: IFX
TPM Version: 01010000
Manufacturer Info: 49465800
[mythcat@fedora ~]$ sudo dnf5 search tpm2-tools
Updating and loading repositories:
Repositories loaded.
Matched fields: name (exact)
tpm2-tools.x86_64: A bunch of TPM testing toolS build upon tpm2-tss
[mythcat@fedora ~]$ sudo dnf5 install tpm2-tools
...
Package "tpm2-tools-5.7-2.fc41.x86_64" is already installed.
The last error :
[mythcat@fedora ~]$ sudo tpm2_startup
ERROR:tcti:src/tss2-tcti/tcti-device.c:455:Tss2_Tcti_Device_Init() Failed to open specified TCTI device file /dev/tpmrm0: No such file or directory
ERROR:tcti:src/tss2-tcti/tctildr-dl.c:149:tcti_from_file() Could not initialize TCTI file: libtss2-tcti-device.so.0
ERROR:tcti:src/tss2-tcti/tcti-device.c:455:Tss2_Tcti_Device_Init() Failed to open specified TCTI device file /dev/tpm0: Device or resource busy
ERROR:tcti:src/tss2-tcti/tctildr-dl.c:149:tcti_from_file() Could not initialize TCTI file: libtss2-tcti-device.so.0
ERROR:tcti:src/tss2-tcti/tcti-device.c:455:Tss2_Tcti_Device_Init() Failed to open specified TCTI device file /dev/tcm0: No such file or directory
ERROR:tcti:src/tss2-tcti/tctildr-dl.c:149:tcti_from_file() Could not initialize TCTI file: libtss2-tcti-device.so.0
WARNING:tcti:src/util-io/io.c:262:socket_connect() Failed to connect to host 127.0.0.1, port 2321: errno 111: Connection refused
ERROR:tcti:src/tss2-tcti/tcti-swtpm.c:617:Tss2_Tcti_Swtpm_Init() Cannot connect to swtpm TPM socket
ERROR:tcti:src/tss2-tcti/tctildr-dl.c:149:tcti_from_file() Could not initialize TCTI file: libtss2-tcti-swtpm.so.0
WARNING:tcti:src/util-io/io.c:262:socket_connect() Failed to connect to host 127.0.0.1, port 2321: errno 111: Connection refused
ERROR:tcti:src/tss2-tcti/tctildr-dl.c:149:tcti_from_file() Could not initialize TCTI file: libtss2-tcti-mssim.so.0
ERROR:tcti:src/tss2-tcti/tctildr-dl.c:263:tctildr_get_default() No standard TCTI could be loaded
ERROR:tcti:src/tss2-tcti/tctildr.c:477:tctildr_init_context_data() Failed to instantiate TCTI
ERROR: Could not load tcti, got: "(null)"
Fedora 42 : Fedora game project with pygame and agentpy - part 003.
I have upgraded the source code with the following changes:
- added agent with logic using the python agentpy module;
- I increased the grid to 16 x 16;
- I kept the win condition at 8 pieces aligned in any direction;
- I added conditions for displaying the equality message;
The game is hard to win, you can try on my pagure account.
Wednesday, September 25, 2024
Fedora 42 : Fedora game project with pygame and agentpy - part 002.
... and update from 8 in 8 with SVG file type.

The source code I used or you can find it on the pagure project:
import pygame
from pygame.math import Vector2
import random
import os
username = os.getlogin()
# Initialize Pygame
pygame.init()
# Set up the display
width, height = 800, 800
screen = pygame.display.set_mode((width, height))
pygame.display.set_caption("Eight-in-a-Row")
# Font setup
font = pygame.font.Font(None, 74)
# Colors
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
BLUE = (0, 0, 120)
# Game board dimensions
BOARD_WIDTH = 8
BOARD_HEIGHT = 8
class Player:
def __init__(self, color, is_computer=False):
self.color = color
self.pieces = set()
self.is_computer = is_computer
self.svg_image = self.load_svg_image()
def add_piece(self, x, y):
self.pieces.add((x, y))
# def draw_pieces(self):
# for x, y in self.pieces:
# pygame.draw.circle(screen, self.color,
# (x * width // BOARD_WIDTH + width // (2 * BOARD_WIDTH),
# y * height // BOARD_HEIGHT + height // (2 * BOARD_HEIGHT)),
# min(width, height) // (2 * BOARD_WIDTH) - 5)
def load_svg_image(self):
if self.color == BLUE:
svg_path = "penguin-svgrepo-com.svg"
elif self.color == WHITE:
svg_path = "cube-svgrepo-com.svg"
else:
svg_path = "cube-svgrepo-com.svg"
return pygame.image.load(svg_path)
def draw_pieces(self):
piece_size = min(width, height) // (BOARD_WIDTH) - 10
for x, y in self.pieces:
pos = Vector2(x * width // BOARD_WIDTH + width // (2 * BOARD_WIDTH),
y * height // BOARD_HEIGHT + height // (2 * BOARD_HEIGHT))
scaled_image = pygame.transform.scale(self.svg_image, (piece_size, piece_size))
image_rect = scaled_image.get_rect(center=pos)
screen.blit(scaled_image, image_rect)
def make_move(self, board):
if self.is_computer:
empty_squares = [(x, y) for x in range(BOARD_WIDTH) for y in range(BOARD_HEIGHT)
if (x, y) not in board[0] and (x, y) not in board[1]]
if empty_squares:
return random.choice(empty_squares)
return None
def check_winner(player):
directions = [(0, 1), (1, 0), (1, 1), (1, -1)]
for x, y in player.pieces:
for dx, dy in directions:
if all((x + i*dx, y + i*dy) in player.pieces for i in range(8)):
return True
return False
def display_winner(winner):
text = font.render(f"Player {winner} wins!", True, [145,190,190])
text_rect = text.get_rect(center=(width // 2, height // 2))
screen.blit(text, text_rect)
pygame.display.flip()
pygame.time.wait(3000) # Display the message for 3 seconds
# Create players
player1 = Player(BLUE)
player2 = Player(WHITE, is_computer=True)
# Game loop
running = True
turn = 0
game_over = False
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
elif event.type == pygame.MOUSEBUTTONDOWN and not game_over:
if turn % 2 == 0: # Human player's turn
mouse_x, mouse_y = event.pos
column = mouse_x // (width // BOARD_WIDTH)
row = mouse_y // (height // BOARD_HEIGHT)
if (column, row) not in player1.pieces and (column, row) not in player2.pieces:
player1.add_piece(column, row)
if check_winner(player1):
# print("Player 1 wins!")
display_winner(username)
game_over = True
turn += 1
if not game_over and turn % 2 == 1: # Computer player's turn
move = player2.make_move((player1.pieces, player2.pieces))
if move:
player2.add_piece(*move)
if check_winner(player2):
# print("Player 2 (Computer) wins!")
display_winner("Computer")
game_over = True
turn += 1
screen.fill(BLACK)
# Draw game board
for i in range(BOARD_WIDTH + 1):
pygame.draw.line(screen, WHITE, (i * width // BOARD_WIDTH, 0), (i * width // BOARD_WIDTH, height), 2)
for i in range(BOARD_HEIGHT + 1):
pygame.draw.line(screen, WHITE, (0, i * height // BOARD_HEIGHT), (width, i * height // BOARD_HEIGHT), 2)
# Draw pieces
player1.draw_pieces()
player2.draw_pieces()
pygame.display.flip()
pygame.quit()
Saturday, September 21, 2024
Fedora 42 : Fedora game project with pygame and agentpy - part 001.
I started a game project with the python packages pygame and agentpy in the Fedora 42 Linux distribution.
I used this version of Fedora:
[mythcat@fedora fedora_game]$ uname -a
Linux fedora 6.11.0-63.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Sep 15 17:14:12 UTC 2024 x86_64 GNU/Linux
... and this python version:
Python 3.12.3 (main, Apr 17 2024, 00:00:00) [GCC 14.0.1 20240411 (Red Hat 14.0.1-0)] on linuxYou can find it on my fedora pagure repo
Subscribe to:
Posts (Atom)
