Pages

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_action
Add 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:

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.gz
Ensure 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 DBDIR
Check if the AIDE service file exists:
[mythcat@fedora ~]$ sudo ls /usr/lib/systemd/system/ | grep aide
If 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 --check
If 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.service
Fill 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 ...

Saturday, October 19, 2024

Fedora 42 : Still in the development without some features ...

An intrusion on my vodafone network , change my layout on windows.
Even the network provider say always is not from hardware or administration vodafone network ...
I tried to wrote a post on my graphics blogger on windows os , but I got something like this:
... ld ne frm 3 cmbire 224 ...
My nicknames comes like this: mhca caafe for mythcat and catafest ...
The tab and enter keys not works, also 1234 789 and num keys ... and more keys: s, t, w, y, o.
This post is wrote on Fedora 42 and works fine , but will be more good if this distro will have all features.
Some examples :
- Selinux still works but some enforced can change the default user permissions and privileges.
- Selinux works but you can use full features like : mls.
- the TPM device from this HP Laptop cannot be used with all features on Fedora.
In conclusion, this old laptop with Fedora and GNOME environment is more than 10 times faster human operations on the range of time, than the Asus laptop with the same 4GB RAM but with a different CPU Intel(R) Core(TM) i3-60060 @ 2.00 GHz 1.99 GHz and windows 10 pro.

Thursday, October 17, 2024

Fedora 42 : Testing isoimagewriter.

Today I tested the isoimagewriter tool on Fedora 42 and works well:
[mythcat@fedora ~]$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 984 MiB, 1031798784 bytes, 2015232 sectors
Disk model: USB FLASH DRIVE 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
[mythcat@fedora ~]$ isoimagewriter 
[mythcat@fedora ~]$ sudo file -s /dev/sdb
/dev/sdb: ISO 9660 CD-ROM filesystem data 'CorePure64' (bootable)
[mythcat@fedora ~]$ sudo qemu-system-x86_64 -cdrom /dev/sdb 
I used an linux iso image from CorePure64

Wednesday, October 16, 2024

Fedora 42 : Using dosbox to run old games in Fedora Linux distro.

You can run DOS games with the DOSBOX emulator ...
This can be install with DNF5 tool:
[root@fedora mythcat]# dnf5 install dosbox-staging.x86_64
Updating and loading repositories:
Repositories loaded.
Package                 Arch   Version                 Repository           Size
Installing:
 dosbox-staging         x86_64 0.81.2-3.fc42           updates-testing  14.6 MiB
The next step is to run the game ...
[mythcat@fedora ~]$ ls /usr/share/dunelegacy/
 ATRE.PAK                  DUNE.PAK       locale         SETUPENG.DIP
 CREDITS.ENG               ENGLISH.PAK    maps           Setup.EXE
 Dune2.BAT                 FINALE.PAK     MENTAT.PAK     SOUND.PAK
 Dune2.EXE                 GFXHD.PAK      MERC.PAK       VOC.PAK
 Dune2.ICO                 HARK.PAK       OneTime.DAT    Waveset.DAT
 Dune2-Versions.txt        HERC.PAK       OPENSD2.PAK    XTRE.PAK
 Dune.CFG                  INTRO.PAK      Options.CFG
'Dune II Icons.icl'        INTROVOC.PAK   ORDOS.PAK
'Dune II Unit Guide.txt'   LEGACY.PAK     SCENARIO.PAK
[mythcat@fedora ~]$ dosbox /usr/share/dunelegacy/Dune2.EXE 
date       time         | 
2024-10-16 11:39:03.508 | arguments: dosbox /usr/share/dunelegacy/Dune2.EXE
2024-10-16 11:39:03.509 | Current dir: /home/mythcat
2024-10-16 11:39:03.509 | stderr verbosity: 0
2024-10-16 11:39:03.509 | -----------------------------------

Monday, October 14, 2024

Fedora 42 : Dune Legacy game .

Dune Legacy is an effort by a handful of developers to revitalize the first-ever real-time strategy game.
It tries to be as similar as possible to the original gameplay but to integrate user interface features most modern realtime-strategy games have like selecting multiple units
I download this game from the official website, and I install with DNF5 tool:
[root@fedora Downloads]# dnf5 install dunelegacy-0.96.4.x86_64.rpm
Updating and loading repositories:
Repositories loaded.
Package                 Arch   Version                 Repository           Size
Installing:
 dunelegacy             x86_64 0.96.4-0.1              @commandline      5.8 MiB
Installing dependencies:
 SDL2_mixer             x86_64 2.8.0-2.fc41            updates-testing 345.3 KiB
 ...
 Warning: skipped PGP checks for 1 package from repository: @commandline
Complete!
Find the orifinal Dune II on web, or try this website.
The game can be start after I unarchive the DuneII archive into DuneII then copy to /usr/share/dunelegacy ...
[mythcat@fedora DuneII]$ sudo su 
[sudo] parola pentru mythcat: 
[root@fedora DuneII]# cp *.* /usr/share/dunelegacy
[root@fedora DuneII]# exit
exit
[mythcat@fedora DuneII]$ dunelegacy 
.. and works well :

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

Thursday, 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-920dd0452
I check and install these supporting libraries:
sudo yum install glibc.i686
sudo yum install libcurl.i686
sudo yum install gtk3.i686
I 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.0
The result is this:

Fedora 42 : Gnome intro ...

Today I tested the new GNOME environment and these are the screeenshot I get:
Look's good ..., see the tour idea ...

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-devel
I 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 lr
Let'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.s
Let'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

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 initia
I 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  0
To 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_version
I 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 tcsd
I 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.