Pages

Tuesday, September 20, 2022

Fedora 37 : Use radiotray-ng to simple radio player.

Radiotray-NG is a simple radio player for Ubuntu that runs from the system tray.
You can use this command to install the package.
dnf install radiotray-ng
After installation, you will see an icon on the tray area.
Use this to select the radio and this will play it.
The project can be found on GitHub.
.

Saturday, September 10, 2022

Fedora 37 : Starting with the conda tool.

In this tutorial, I will show the first steps for working with conda tool on Fedora 37.
Conda is an open-source package management system and environment management system that runs on Windows, macOS, Linux, and z/OS. Conda quickly installs, runs, and updates packages and their dependencies. Conda easily creates, saves, loads, and switches between environments on your local computer. It was created for Python programs, but it can package and distribute software for any language., see the official webpage.
I used the DNF tool to install this tool.
[root@fedora mythcat]# dnf install conda
By default, Conda is configured to activate the base environment when I open a fresh terminal session and you can set it to false.

[mythcat@fedora ~]$ conda config --set auto_activate_base false
For the changes to be applied, run the source command with the .bashrc file as an argument.

[mythcat@fedora ~]$ source ~/.bashrc
After installation, the conda can be activated with the base environment.

[mythcat@fedora ~]$ conda activate
(base) [mythcat@fedora ~]$ conda deactivate
[mythcat@fedora ~]$
Let's start a new project environment named test001 with this command:

[mythcat@fedora ~]$ conda create -n test001 python=3.9
...
  zlib               pkgs/main/linux-64::zlib-1.2.12-h5eee18b_3
Proceed ([y]/n)? y
Downloading and Extracting Packages
libffi-3.3           | 50 KB     | ##################################### | 100%
...
setuptools-63.4.1    | 1.1 MB    | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate test001
#
# To deactivate an active environment, use
#
#     $ conda deactivate
The next step is to activate this with the next command and list installed packages in a conda environment.

[mythcat@fedora ~]$ conda activate test001
(test001) [mythcat@fedora ~]$ conda list
If you want to see all environments then use the next command:

(test001) [mythcat@fedora ~]$ conda env list
# conda environments:
#
test001               *  /home/mythcat/.conda/envs/test001
base                     /usr
The basic usage of conda is to install packages, you can see how to install the scipy package with the next command:

(test001) [mythcat@fedora ~]$ conda install scipy
Using the conda tool.
Also, you can update a package like the pip tool, see the next command:

(test001) [mythcat@fedora ~]$ conda update
CondaValueError: no package names supplied
# Example: conda update -n myenv scipy 
You can deactivate/deactivate the environment with these commands:

(test001) [mythcat@fedora ~]$ conda deactivate
[mythcat@fedora ~]$ conda activate test001
(test001) [mythcat@fedora ~]$ 
You can export the conda environment into YML file type:

(test001) [mythcat@fedora ~]$ conda env export > test001.yml
(test001) [mythcat@fedora ~]$ ls test001.yml
test001.yml 
With this file, you can create a new environment in another area, and see the next commands for deactivating and creating the new environment.

(test001) [mythcat@fedora ~]$ conda deactivate
[mythcat@fedora ~]$ ls
Desktop    Downloads     Music     Public     test001.yml
Documents  kernel-tests  Pictures  Templates  Videos
[mythcat@fedora ~]$ conda env create -f test001.yml
CondaValueError: prefix already exists: /home/mythcat/.conda/envs/test001
Because I try to create in the same place as the old environment I got this error.
You need to use the YML file in another place.
Another option is to clone one environment.

[mythcat@fedora ~]$ conda create --name test001_new_clone --clone test001
Source:      /home/mythcat/.conda/envs/test001
Destination: /home/mythcat/.conda/envs/test001_new_clone
Packages: 34
...
You can see all environments with this command:

[mythcat@fedora ~]$ conda info --env
# conda environments:
#
test001                  /home/mythcat/.conda/envs/test001
test001_new_clone        /home/mythcat/.conda/envs/test001_new_clone
base                  *  /usr
These commands shown are just the beginning of working with the conda utility. It has many more development options.

Wednesday, August 24, 2022

Fedora 37 : Kernel Test Days.

The main goal of a Kernel Test Day is to test a new kernel on many different machines as possible ...
To test the kernel and help the Fedora development team you need to run one tool from Fedora.
I used DNF to install the fedora python package.
[root@fedora kernel-tests]# dnf install python3-fedora.noarch
...
Installed:
  python3-fedora-1.1.1-7.fc37.noarch                                            
  python3-kitchen-1.2.6-14.fc37.noarch                                          
  python3-lockfile-1:0.12.2-8.fc37.noarch                                       
  python3-munch-2.5.0-10.fc37.noarch                                            
  python3-openidc-client-0.6.0-17.20220119git0e2ed81.fc37.noarch                

Complete!
I install the Development Tools group for development issues.
[mythcat@fedora kernel-tests]$ sudo dnf -y groupinstall "Development Tools"
I clone the kernel-tests tool from the GitHub repository.
[mythcat@fedora ~]$ git clone https://pagure.io/kernel-tests.git
Cloning into 'kernel-tests'...
Into the folder kernel-tests set your user and password to send data to the Fedora development team.
[mythcat@fedora ~]$ cd kernel-tests/
[mythcat@fedora kernel-tests]$ cp config.example .config
[mythcat@fedora kernel-tests]$ vi .config
Set the SELinux settings, if this is enabled.
[mythcat@fedora kernel-tests]$ sudo semanage boolean -m --on selinuxuser_execheap
I run both tests, like in the documentation area.
See these results of my tests on HP Compaq 6710b laptop:
[mythcat@fedora kernel-tests]$ sudo ./runtests.sh
[sudo] password for mythcat:
Test suite called with default
./default/cachedrop                                              PASS    
./default/insert_leap_second                                     PASS    
./default/libhugetlbfs                                           SKIP    
./default/memfd                                                  PASS    
./default/modsign                                                PASS    
./default/mq-memory-corruption                                   PASS    
./default/paxtest                                                SKIP    
./default/posix_timers                                           PASS    
./default/selinux-dac-controls                                   PASS    
./default/stack-randomness                                       PASS    
./default/sysfs-perms                                            WARN    
./default/timer-overhead                                         PASS    

Test suite complete                                              WARN    

Your log file is being submitted...
Upload successful!
The following information is not submitted with your log;
it is for informational purposes only.
Vulnerability status:
/sys/devices/system/cpu/vulnerabilities/itlb_multihit:KVM: Mitigation: VMX unsupported
/sys/devices/system/cpu/vulnerabilities/l1tf:Mitigation: PTE Inversion
/sys/devices/system/cpu/vulnerabilities/mds:Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
/sys/devices/system/cpu/vulnerabilities/meltdown:Mitigation: PTI
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data:Not affected
/sys/devices/system/cpu/vulnerabilities/retbleed:Not affected
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass:Vulnerable
/sys/devices/system/cpu/vulnerabilities/spectre_v1:Mitigation: usercopy/swapgs barriers and __user pointer sanitization
/sys/devices/system/cpu/vulnerabilities/spectre_v2:Mitigation: Retpolines, STIBP: disabled, RSB filling, PBRSB-eIBRS: Not affected
/sys/devices/system/cpu/vulnerabilities/srbds:Not affected
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort:Not affected

[mythcat@fedora kernel-tests]$ sudo ./runtests.sh -t performance
Test suite called with performance
Using config in CONFIG.fedora
Sun Aug 21 05:19:23 PM EEST 2022
Latency measurements
Sun Aug 21 05:21:46 PM EEST 2022
Calculating file system latency
Sun Aug 21 05:21:48 PM EEST 2022
Local networking
Sun Aug 21 05:25:29 PM EEST 2022
Bandwidth measurements
Sun Aug 21 05:34:57 PM EEST 2022
Calculating context switch overhead
Sun Aug 21 05:35:20 PM EEST 2022
./performance/lmbench3                                           PASS    

Test suite complete                                              PASS    

Your log file is being submitted...
Upload successful!
The following information is not submitted with your log;
it is for informational purposes only.
Vulnerability status:
/sys/devices/system/cpu/vulnerabilities/itlb_multihit:KVM: Mitigation: VMX unsupported
/sys/devices/system/cpu/vulnerabilities/l1tf:Mitigation: PTE Inversion
/sys/devices/system/cpu/vulnerabilities/mds:Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
/sys/devices/system/cpu/vulnerabilities/meltdown:Mitigation: PTI
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data:Not affected
/sys/devices/system/cpu/vulnerabilities/retbleed:Not affected
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass:Vulnerable
/sys/devices/system/cpu/vulnerabilities/spectre_v1:Mitigation: usercopy/swapgs barriers and __user pointer sanitization
/sys/devices/system/cpu/vulnerabilities/spectre_v2:Mitigation: Retpolines, STIBP: disabled, RSB filling, PBRSB-eIBRS: Not affected
/sys/devices/system/cpu/vulnerabilities/srbds:Not affected
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort:Not affected

Monday, August 22, 2022

Fedora 37 : Install PyQt5 and PyQt6 on Fedora.

In this tutorial, I will show you how to install PyQt5 and PyQt6 on Fedora 37 Distro Linux.
I used the DNF tool on the sudo user.
To install PyQt5 I used this command:
[root@fedora mythcat]# dnf install python3-qt5.x86_64
Last metadata expiration check: 2:20:40 ago on Wed 17 Aug 2022 09:42:57 PM EEST.
Dependencies resolved.
...
Installed:
  openal-soft-1.22.2-2.fc37.x86_64                                              
  python-qt5-rpm-macros-5.15.6-7.fc37.noarch                                    
  python3-pyqt5-sip-12.11.0-2.fc37.x86_64                                       
  python3-qt5-5.15.6-7.fc37.x86_64                                              
  python3-qt5-base-5.15.6-7.fc37.x86_64                                         
  qt5-qtconnectivity-5.15.5-2.fc37.x86_64                                       
  qt5-qtlocation-5.15.5-3.fc37.x86_64                                           
  qt5-qtmultimedia-5.15.5-2.fc37.x86_64                                         
  qt5-qtsensors-5.15.5-2.fc37.x86_64                                            
  qt5-qtserialport-5.15.5-2.fc37.x86_64                                         
  qt5-qtsvg-5.15.5-2.fc37.x86_64                                                
  qt5-qttools-common-5.15.5-2.fc37.noarch                                       
  qt5-qttools-libs-designer-5.15.5-2.fc37.x86_64                                
  qt5-qttools-libs-help-5.15.5-2.fc37.x86_64                                    
  qt5-qtwebchannel-5.15.5-2.fc37.x86_64                                         
  qt5-qtwebsockets-5.15.5-2.fc37.x86_64                                         
  qt5-qtxmlpatterns-5.15.5-2.fc37.x86_64                                        

Complete!
If you want to use PyQt6 then you need to use the sip solution.
Let's search and install it with the DNF tool.
[root@fedora mythcat]# dnf search qt6 | grep python
Last metadata expiration check: 1:02:01 ago on Sun 21 Aug 2022 04:43:24 PM EEST.
python3-pyqt6-sip.x86_64 : The sip module support for PyQt6
[root@fedora mythcat]# dnf install python3-pyqt6-sip.x86_64
Last metadata expiration check: 1:02:24 ago on Sun 21 Aug 2022 04:43:24 PM EEST.
Dependencies resolved.
...
Installed:
  python3-pyqt6-sip-13.3.0-3.fc37.x86_64                                        

Complete!
I used the python command and I import PyQt5 and PyQt6
[mythcat@fedora ~]$ python
Python 3.11.0rc1 (main, Aug  9 2022, 00:00:00) [GCC 12.1.1 20220810 (Red Hat 12.1.1-4)] on linux
...
The python modules are installed and working well.

Monday, August 15, 2022

Fedora 37 : About DNF tool.

DNF's name tool comes from Dandified YUM.
You can find all about this tool in the Fedora documentation area.
As you know the YUM is in use on older systems and comes from Yellowdog Updater, Modified.
All of these tools need to have sudo that gives you administrative access to your system.
When you run the DNF tool this will checks for metadata automatically whenever you begin a system update or otherwise install software from repositories.
For this reason, the update and upgrade commands perform the same function.
Let's see the basic usage of the DNF tool:
Search a fedora package named FedoraPackage in the repositories.
sudo dnf search FedoraPackage
Install the FedoraPackage package if exist in the repository.
sudo dnf install FedoraPackage
If you want to uninstall the package FedoraPackage use this:
sudo dnf remove FedoraPackage
I can reinstall the package FedoraPackage
sudo dnf reinstall FedoraPackage -y
To automatically remove unneeded dependencies, use:
sudo dnf autoremove
The DNF can find out which package provides a particular file.
sudo dnf provides /etc/httpd/conf/httpd.conf
The detailed information of a package can be viewed with:
sudo dnf info httpd
The DNF history contains all actions that have been performed by the DNF command.
sudo dnf history
I can view further information about a transaction by specifying its ID:
sudo  dnf history info 13
I can undo this transaction if we want:
sudo dnf history undo 13 -y
I can redo with:
sudo dnf history redo 13 -y
The DNF will cache data to the /var/cache/dnf directory and I clean it with:
dnf clean all
I have the option to manually make the cache so that future actions will be quicker.
sudo time dnf makecache
The DNF tool gives me the ability to list all packages that are currently installed on our Linux system:
sudo dnf list installed
Packages that are related to each other may be grouped together into a package group.
sudo dnf grouplist
I can install it with this command:
sudo dnf groupinstall "Web Server" -y
I can check if an update is available
sudo dnf check-update
I can ignore an update for the FedoraPackage package with this command:
sudo dnf update -x FedoraPackage
I can use it for automatic tasks such as updating regularly via cron jobs.
sudo  dnf install dnf-automatic -y
I can install security only
sudo dnf updateinfo list sec
I can see displays information for enabled repositories only:
sudo dnf repolist
I can see all of the repositories
sudo dnf repolist all
Set update testing with:
sudo dnf config-manager --set-enable updates-testing
Disable update testing:
sudo dnf config-manager --set-disable updates-testing
You can list packages from a specified repository, for instance, FedoraPackage:
sudo dnf repository-packages FedoraPackage list
To display only a list of those packages available from the specified repository, add the available option.
sudo dnf repository-packages fedora list available
To display only a list of those packages installed from the specified repository, add the installed option
sudo dnf repository-packages fedora list installed
To add and enable a new repository like Grafana, run the following command.
Open a new file named grafana.repo:
sudo nano /etc/yum.repos.d/grafana.repo
Add this in the grafana.repo
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
sudo dnf config-manager --add-repo /etc/yum.repos.d/grafana.repo
To enable the DNF repository
sudo dnf --enablerepo=grafana install grafana
To disable a DNF repository
sudo dnf --disablerepo=fedora-extras install grafana 
To permanently disable a particular repository
sudo dnf config-manager --set-disabled grafana
These are just a few basic ways to use the DNF utility.

Fedora 37 : First test with the Fedora Cinnamon spin.

The Fedora Cinnamon spin provides advanced innovative features and a traditional user experience.
I install this Fedora Spin from the official website.
I installed it again without an update.
It seemed faster than the old distro 36 with the Mate environment.
Here is a screenshot of Fedora 37 on the HP C6710b laptop. 

Sunday, August 7, 2022

Fedora 36 : Rootkit Hunter tool.

rkhunter (Rootkit Hunter) is a Unix-based tool that scans for rootkits, backdoors and possible local exploits. It does this by comparing SHA-1 hashes of important files with known good ones in online databases, searching for default directories (of rootkits), wrong permissions, hidden files, suspicious strings in kernel modules, and special tests for Linux and FreeBSD..., see wikipedia .
You can find it on this website.
On Fedora 36 you can search and install with the DNF tool.
[root@fedora mythcat]# dnf search rkhunter
Last metadata expiration check: 3:38:34 ago on Sat 06 Aug 2022 10:35:34 AM EEST.
======================== Name Exactly Matched: rkhunter ========================
rkhunter.noarch : A host-based tool to scan for rootkits, backdoors and local exploits
[root@fedora mythcat]# dnf install rkhunter.noarch
Last metadata expiration check: 3:39:00 ago on Sat 06 Aug 2022 10:35:34 AM EEST.
The first step is to upgrade it and then you can check the system.
[root@fedora mythcat]# rkhunter --propupd
[ Rootkit Hunter version 1.4.6 ]
File created: searched for 179 files, found 139

[root@fedora mythcat]# rkhunter --check
[ Rootkit Hunter version 1.4.6 ]

Checking system commands...

  Performing 'strings' command checks

...
The result can be found on the log file and you can set settings on the conf file type.
[root@fedora mythcat]# vi /var/log/rkhunter/rkhunter.log
[root@fedora mythcat]# vi /etc/rkhunter.conf