Pages

Showing posts with label Fedora 41. Show all posts
Showing posts with label Fedora 41. Show all posts

Saturday, November 16, 2024

Fedora 41 : Bookworm - open-source eBook reader !

Bookworm is an open-source eBook reader with an easy and simple layout supporting different file formats like epub, pdf, mobi, cbr and cbz. See the official webpage.
root@localhost:/home/mythcat# dnf5 search bookworm
Updating and loading repositories:
Repositories loaded.
Matched fields: name (exact)
 bookworm.x86_64: Simple, focused eBook reader
root@localhost:/home/mythcat# dnf5 install bookworm.x86_64
Updating and loading repositories:
Repositories loaded.
Package                 Arch   Version                      Repository      Size
Installing:
 bookworm               x86_64 1.1.3-0.13.20200414git.c7c36 fedora       3.6 MiB
Installing dependencies:
 granite                x86_64 6.2.0-9.fc41                 fedora     949.2 KiB
 javascriptcoregtk4.0   x86_64 2.46.3-1.fc41                updates     28.3 MiB
 webkit2gtk4.0          x86_64 2.46.3-1.fc41                updates     75.4 MiB

Transaction Summary:
 Installing:         4 packages
...
[6/6] Installing bookworm-0:1.1.3-0.13. 100% | 430.8 KiB/s |   3.7 MiB |  00m09s
Complete!ng trigger-install scriptlet: hicolor-icon-theme-0:0.17-19.fc41.noarch
The last step, search this on gnome environmet and you will find this application.

Wednesday, November 13, 2024

Fedora 41 : use pagure tool with ssh key ...

Pagure is a light-weight git-centered forge based on pygit2.
The basic tool can be found on this fedora package, the pagure has more features.
Because I used only like a repo I install with DNF5 tool the basic cli:
# dnf5 install pagure-cli.x86_64
I created a folder then I used easy like git tool for each project I have under basic fedora account:
mythcat@localhost:~/pagure_fedora$ git clone https://pagure.io/mythcat
Cloning into 'mythcat'...
remote: Enumerating objects: 1567, done.
remote: Counting objects: 100% (1567/1567), done.
remote: Compressing objects: 100% (1467/1467), done.
remote: Total 1567 (delta 76), reused 1496 (delta 63), pack-reused 0
Receiving objects: 100% (1567/1567), 5.82 MiB | 2.26 MiB/s, done.
Resolving deltas: 100% (76/76), done.
mythcat@localhost:~/pagure_fedora$ git clone https://pagure.io/radio-online-catafest
Cloning into 'radio-online-catafest'...
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 8 (delta 1), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (8/8), 6.01 KiB | 267.00 KiB/s, done.
These are git repos for folders: mythcat and radio-online-catafest, any git command can be run on these folders.
mythcat@localhost:~/pagure_fedora$ cd mythcat 
mythcat@localhost:~/pagure_fedora/mythcat$ nano test.txt
mythcat@localhost:~/pagure_fedora/mythcat$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file> ..." to include in what will be committed)
	test.txt

nothing added to commit but untracked files present (use "git add" to track)
mythcat@localhost:~/pagure_fedora/mythcat$ git add .
mythcat@localhost:~/pagure_fedora/mythcat$ git commit -am "test with a file"
[main 2c9fa14] test with a file
 Committer: Catalin George Festila <mythcat localhost.localdomain="">
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 1 insertion(+)
 create mode 100644 test.txt
 mythcat@localhost:~/pagure_fedora/mythcat$  git config --global --edit
mythcat@localhost:~/pagure_fedora/mythcat$ git commit --amend --reset-author
[main 308a2c9] test with a file
 1 file changed, 1 insertion(+)
 create mode 100644 test.txt
mythcat@localhost:~/pagure_fedora/mythcat$ git remote set-url origin git@pagure.io:mythcat.git
mythcat@localhost:~/pagure_fedora/mythcat$ git remote -v
origin	git@pagure.io:mythcat.git (fetch)
origin	git@pagure.io:mythcat.git (push)
You need to use ssh-keygen to have a ssh key for pagure on Fedora linux then remove the old key and, add the ssh key to Fedora pagure account, then I push the file:
mythcat@localhost:~/pagure_fedora/mythcat$ ssh-add ~/.ssh/mypagure
mythcat@localhost:~/pagure_fedora/mythcat$ ssh-keygen -y -f ~/.ssh/mypagure
mythcat@localhost:~/pagure_fedora/mythcat$ systemctl restart sshd.service mythcat@localhost:~/pagure_fedora/mythcat$ git push 
For my repo radio-online-catafest the git remote command is this:
mythcat@localhost:~/pagure_fedora/radio-online-catafest$ git remote set-url origin git@pagure.io:radio-online-catafest.git
mythcat@localhost:~/pagure_fedora/radio-online-catafest$ git push 
Everything up-to-date

Saturday, November 9, 2024

Fedora 41 : timeshift tool for backup.

... one old tool for backup was rsync ...
Now you have a tool named timeshift with this tool named timeshift and more features ...
You can install with:
root@localhost:/home/mythcat# dnf5 install timeshift.x86_64
I run this tool with :
mythcat@localhost:~$ sudo timeshift-gtk 
The result is this G.U.I. ...
... because the backup is not easy, I search on web and I found a video tutorial from the official youtube channel - DrewHowdenTech
...

Fedora 41 : Minimal gnome install and nemo additionals packages.

I reinstall the Fedora, somehow was crashed with a bad systemd error:
uname -a
Linux localhost.localdomain 6.11.5-300.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct 22 20:11:15 UTC 2024 x86_64 GNU/Linux
If you install nemo with minimal gnome features then you need to install fedora packages, like this one:
root@localhost:/home/mythcat# dnf5 install nemo-image-converter

Monday, June 10, 2024

Fedora 41 : Install portmaster.

Portmaster is a free and open-source application firewall that does the heavy lifting for you. Restore privacy and take back control over all your computer's network activity.
First, download the RPM package from the official website.
Use the dnf5 tool and install it.
The last step is to open, after restart Fedora, see the result on my openbox environment:

Friday, June 7, 2024

Fedora 41 : solving conky default configuration in openbox environment.

I installed Conky on an openbox environment and found an error, it doesn't display upload and download from the network correctly.
I had to use the ifconfig command to see the network interface and then I had to modify the default file.
The default configuration file can be found and edited with any text editor:
[root@fedora mythcat]# nano /etc/conky/conky.conf
Here's how it looks functionally.
-- Conky, a system monitor https://github.com/brndnmtthws/conky
--
-- This configuration file is Lua code. You can write code in here, and it will
-- execute when Conky loads. You can use it to generate your own advanced
-- configurations.
--
-- Try this (remove the `--`):
--
--   print("Loading Conky config")
--
-- For more on Lua, see:
-- https://www.lua.org/pil/contents.html

conky.config = {
    alignment = 'top_left',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'DejaVu Sans Mono:size=12',
    gap_x = 60,
    gap_y = 60,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_x = true,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'desktop',
    show_graph_range = false,
    show_graph_scale = false,
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
}

conky.text = [[
${color grey}Info:$color ${scroll 32 Conky $conky_version - $sysname $nodename $kernel $machine}
$hr
${color grey}Uptime:$color $uptime
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes
$hr
${color grey}File systems:
 / $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color cyan}Networking:
${color grey}Up: ${upspeed ens1} ${color grey} - Down: ${downspeed ens1}

$hr
${color grey}Name              PID     CPU%   MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
]]

Thursday, April 18, 2024

Fedora 41 : python and Federated Message Bus in Fedora Linux Distro.

Federated Message Bus is a library built on ZeroMQ using the PyZMQ Python bindings. fedmsg aims to make it easy to connect services together using ZeroMQ publishers and subscribers.
You can use this python package named fedmsg to use this functionality ...
This is the source code :
import fedmsg
from fedmsg import *

import os
# Set the routing_nitpicky flag to True
os.environ['FEDMSG_ROUTING_NITPICKY'] = 'True'


config = fedmsg.config.load_config([],None)
config['mute'] = True
config['timeout'] = 0

for name, endpoint, topic, msg in fedmsg.tail_messages(**config):
    print ("name ", name)
This is the result :
[mythcat@fedora FedoraMessaging]$ python fedmsg_001.py
No routing policy defined for "org.fedoraproject.prod.copr.build.start" but routing_nitpicky is False so the message is being treated as authorized.
name  fedora-infrastructure
No routing policy defined for "org.fedoraproject.prod.copr.chroot.start" but routing_nitpicky is False so the message is being treated as authorized.
name  fedora-infrastructure
No routing policy defined for "org.fedoraproject.prod.github.check_run" but routing_nitpicky is False so the message is being treated as authorized.
name  fedora-infrastructure
No routing policy defined for "org.fedoraproject.prod.github.pull_request_review" but routing_nitpicky is False so the message is being treated as authorized.
name  fedora-infrastructure
No routing policy defined for "org.fedoraproject.prod.github.pull_request_review_comment" but routing_nitpicky is False so the message is being treated as authorized.
name  fedora-infrastructure ... 

Thursday, April 4, 2024

Fedora 41 : Python and the Fedora Messaging Infrastructure - part 001.

Yesterday I tried to use Fedora Messaging.
You can find the documentation on the official page./div>
I created a working folder called FedoraMessaging:
[mythcat@fedora PythonProjects]$ mkdir FedoraMessaging
[mythcat@fedora PythonProjects]$ cd FedoraMessaging
You need to install the fedora-messaging and rabbitmq-server packages.
[root@fedora FedoraMessaging]# dnf5 install fedora-messaging
Updating and loading repositories:
Repositories loaded.
Package                             Arch    Version                       Repository         Size
Installing:                                                                                      
 fedora-messaging                   noarch  3.5.0-1.fc41                  rawhide        38.6 KiB
...
[root@fedora FedoraMessaging]# dnf install rabbitmq-server
At some point it will ask for a reboot.
You need to install the python package named fedora-messaging.
[root@fedora FedoraMessaging]# pip install --user fedora-messaging
Collecting fedora-messaging
...
Installing collected packages: pytz, incremental, wrapt, tomli, rpds-py, pyasn1, pika, hyperlink, constantly, attrs, 
referencing, pyasn1-modules, automat, twisted, jsonschema-specifications, service-identity, jsonschema, crochet, 
fedora-messaging
Successfully installed attrs-23.2.0 automat-22.10.0 constantly-23.10.4 crochet-2.1.1 fedora-messaging-3.5.0 
hyperlink-21.0.0 incremental-22.10.0 jsonschema-4.21.1 jsonschema-specifications-2023.12.1 pika-1.3.2 pyasn1-0.6.0 
pyasn1-modules-0.4.0 pytz-2024.1 referencing-0.34.0 rpds-py-0.18.0 service-identity-24.1.0 tomli-2.0.1 twisted-24.3.0 
wrapt-1.16.0
You need to start the broker:
[mythcat@fedora FedoraMessaging]$ sudo systemctl start rabbitmq-server
I used the source code from the documentation to test its functionality with a python script named hello_test.py.
from fedora_messaging import api, config

config.conf.setup_logging()
api.consume(lambda message: print(message))

from fedora_messaging import api, config

config.conf.setup_logging()
api.publish(api.Message(topic="hello by mythcat", body={"Hello": "world!"}))
I ran it and got this response:
[mythcat@fedora FedoraMessaging]$ python hello_test.py
[fedora_messaging.message INFO] Registering the 'base.message' key as the '<class 'fedora_messaging.message.Message'>' 
class in the Message class registry
[fedora_messaging.twisted.protocol INFO] Waiting for 0 consumer(s) to finish processing before halting
[fedora_messaging.twisted.protocol INFO] Finished canceling 0 consumers
[fedora_messaging.twisted.protocol INFO] Disconnect requested, but AMQP connection already gone
I created another python script named my_consumer.py, to check if this works:
from fedora_messaging import api, config
# Setup logging
config.conf.setup_logging()
# Define the callback function to process messages
def process_message(message):
    # Check if the message topic matches "hello by mythcat"
    if message.topic == "hello by mythcat":
        print(f"Received message: {message.body}")
    else:
        print(f"Ignoring message with topic: {message.topic}")
# Consume messages
api.consume(process_message)
I ran it and got this response:
[mythcat@fedora FedoraMessaging]$ python my_consumer.py
[fedora_messaging.twisted.protocol INFO] Successfully registered AMQP consumer Consumer(queue=amq.gen-9lKk7sGeYY5I40bdc5VrzQ,
callback=<function process_message at 0x7fdb0f5da160>)
[fedora_messaging.message INFO] Registering the 'base.message' key as the '<class 'fedora_messaging.message.Message'>'
class in the Message class registry
[fedora_messaging.twisted.consumer INFO] Consuming message from topic hello by mythcat 
(message id 800a1540-1e91-4b4a-a125-15e33eebb699)
Received message: {'Hello': 'world!'}
[fedora_messaging.twisted.consumer INFO] Successfully consumed message from topic hello by mythcat 
(message id 800a1540-1e91-4b4a-a125-15e33eebb699)
It can be seen that the answer is received and displayed correctly.

Saturday, March 30, 2024

Fedora 41 : Memstrack tool.

A runtime memory allocation tracer, like a hot spot analyzer for memory allocation, can help analyze overall memory usage, peak memory usage, kernel module memory usage, all combined with stacktrace. Userspace memory trace is planned and not yet implemented.
This tool works by tracing all page-level memory allocation events in kernel (currently supports using perf or ftrace), and actively integrate the events into a stack trace tree. It can also work with kernel's page owner log file and use as a memory usage viewer.
I tested this tool today and it is quite useful for development and monitoring the operating system, it seems to work very well, you can even see in the screenshot how ...
You can find this project on the GitHub repo.