Pages

Sunday, April 11, 2021

Fedora 33 : Use hw-probe to collect hardware details .

This is a project to anonymously collect hardware details of Linux-powered computers over the world and help people collaboratively debug hardware-related issues, check for Linux compatibility and find drivers. 
Probe your computer in order to participate in the project and discover your hardware in detail. Share your probes with Linux developers to debug and fix problems with your computer. 

First, install the hw-probe package with the DNF Linux tool:
[root@desk mythcat]# dnf search hw-probe
Last metadata expiration check: 0:03:35 ago on Sun 11 Apr 2021 03:10:31 PM EEST.
======================== Name Exactly Matched: hw-probe ========================
hw-probe.noarch : Check operability of computer hardware and find drivers
[root@desk mythcat]# dnf install hw-probe.noarch
Last metadata expiration check: 0:03:52 ago on Sun 11 Apr 2021 03:10:31 PM EEST.
Dependencies resolved.
================================================================================
 Package             Architecture  Version                 Repository      Size
================================================================================
Installing:
 hw-probe            noarch        1.5-4.fc33              fedora          93 k
Installing dependencies:
 hdparm              x86_64        9.58-4.fc33             fedora          95 k
 hwinfo              x86_64        21.68-2.fc33            fedora          88 k
 hwinfo-libs         x86_64        21.68-2.fc33            fedora         872 k
 libx86emu           x86_64        3.1-2.fc33              fedora          69 k
 sysstat             x86_64        12.3.1-3.fc33           fedora         433 k
Installing weak dependencies:
 acpica-tools        x86_64        20200925-1.fc33         updates        960 k

Transaction Summary
================================================================================
Install  7 Packages

Total download size: 2.5 M
Installed size: 8.6 M
Is this ok [y/N]: y
...
This tool can be used easy:
[root@desk mythcat]# sudo -E hw-probe -all -upload
WARNING: 'edid-decode' package is not installed
Probe for hardware ... Ok
Reading logs ... Ok
Uploaded to DB, Thank you!

Probe URL: https://linux-hardware.org/?probe=7b4c090391
You can see my hardware on the link result.

Fedora 33 : Using the mutt software with Yahoo.

Mutt is a small but very powerful text-based mail client for Unix operating systems. In this tutorial, I configure mutt with yahoo to read mail account and send mails.
[root@desk mythcat]# dnf install mutt
Last metadata expiration check: 0:04:13 ago on Sat 10 Apr 2021 09:23:41 PM EEST.
Dependencies resolved.
================================================================================
 Package         Arch      Version                             Repository  Size
================================================================================
Installing:
 mutt            x86_64    5:2.0.5-1.fc33                      updates    1.9 M
Installing dependencies:
 tokyocabinet    x86_64    1.4.48-16.fc33                      fedora     506 k
 urlview         x86_64    0.9-28.20131022git08767a.fc33       fedora      31 k

Transaction Summary
================================================================================
Install  3 Packages

Total download size: 2.4 M
Installed size: 8.6 M
Is this ok [y/N]: y
...
Installed:
  mutt-5:2.0.5-1.fc33.x86_64                                                    
  tokyocabinet-1.4.48-16.fc33.x86_64                                            
  urlview-0.9-28.20131022git08767a.fc33.x86_64                                  

Complete!
The mutt should be compiled with support for tls, you can see all of these with this command:
[root@desk ~]# mutt -v | grep tls
Configure options: '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' 
...ode>
Let's create all settings for the mutt software with vi editor:
[root@desk mythcat]# vi ~/.muttrc
set imap_user = "catafest@yahoo.com"
set imap_pass = "your-generate-app-password"
set smtp_url = "smtp://catafest@yahoo.com@smtp.mail.yahoo.com:587"
set smtp_pass = "your-generate-app-password"
set from = "catafest@yahoo.com"
set realname = "Catalin George Festila"
set folder = "imaps://catafest@yahoo.com@imap.mail.yahoo.com:993"
set spoolfile = "+INBOX"
set postponed="+[Yahoo]/Drafts"
set header_cache = "~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/bodies"
set certificate_file = "~/.mutt/certificates"
set move = no
set sort = 'threads'
set sort_aux = 'last-date-received'
set imap_check_subscribed
set ssl_force_tls = yes
set abort_nosubject = no
set mail_check = 60
set timeout = 10
set sort = "reverse-date-received"
set signature = "~/.mutt/signature"
set copy = no
set imap_keepalive = 900
Then use this command to run it:
[root@desk ~]# mutt
See the result:

Thursday, March 18, 2021

Fedora 33 : The balenaEtcher tool.

You can flash OS images to SD cards & USB drives, safely and easily with this balenaEtcher.
You can flash from a file, URL, or clone a drive.
I download the AppImage and I run it easily on Fedora with an ISO Linux image antiX for an old laptop.
[mythcat@desk ~]$ ./balenaEtcher-1.5.116-x64.AppImage 
ready-to-show: 1816.354ms
Checking for update
Update for version 1.5.116 is not available (latest version: 1.5.116, downgrade is disallowed).
...

Monday, March 8, 2021

Fedora 33 : Unity FPS Microgame.

Today I tested the FPS Microgame from learning area of Unity 3D with Fedora linux distro.
The project works great even my hardware is old.
This is an screenshot of the running process of the project.

Sunday, March 7, 2021

Fedora 33 : Electron based terminal named Hyper.

Hyper is an Electron-based terminal built on HTML/CSS/JS.
About Electron is an open-source software framework developed and maintained by GitHub.
The original Hyper renderer was based on the DOM, and now Hyper 3 use Electron from V1 to V3 and is tested with V4.
You can install multiple plugins and themes to make your work easier.
The install process is easy, just download the RPM package and use the DNF tool to install it:
[root@desk mythcat]# dnf install Downloads/hyper-3.0.2.x86_64.rpm 
Last metadata expiration check: 0:14:49 ago on Sun 07 Mar 2021 11:22:49 AM EET.
Dependencies resolved.
================================================================================
 Package        Architecture    Version             Repository             Size
================================================================================
Installing:
 hyper          x86_64          3.0.2-3440          @commandline           37 M

Transaction Summary
================================================================================
Install  1 Package

Total size: 37 M
Installed size: 141 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : hyper-3.0.2-3440.x86_64                                1/1 
  Running scriptlet: hyper-3.0.2-3440.x86_64                                1/1 
  Verifying        : hyper-3.0.2-3440.x86_64                                1/1 

Installed:
  hyper-3.0.2-3440.x86_64                                                       

Complete!
The Hyper terminal is installed on the LXDE main menu on the Other submenu.
You can find more information on the official webpage.
The next image is a screenshot from my Fedora 33 distro with Hyper terminal.

Sunday, February 28, 2021

Fedora 33 : Unity Platformer Microgame 2D.

This Microgame Template is a classic 2D platform game that you can mod and make your own. Check out the Creative Mods to tweak the project and add your own levels, while learning the basics of Unity. Viewing from the Learn tab in the Unity Hub? Click Download Project > Open Project to automatically open it in Unity. Viewing from the Unity Learn website? Simply go to the Learn tab in the Unity Hub and search for this Microgame, or manually import it via the Asset Store link below.
I download the Unity Editor and Unity Hub AppImage.
I run the UnityHub.AppImage and I set the path of Unity Editor into settings area.
I login with my Unity account and on learning area in UnityHub application I download the Platformer Microgame.
I select to follow the tutorial on Unity I.D.E. environment.
You can see in the next screenshot how this works:

Saturday, February 27, 2021

Fedora 33 : Local 5.9.9 by flywheel for WordPress sites.

Build WordPress sites faster than ever before Local is built for speed and simplicity. We’ve spent years designing Local to make building, testing and deploying WordPress sites a breeze.
Basically this is a standalone local development application.
You can add locally all you need for your WordPress website:
  • SSH & WP-CLI;
  • simple root SSH access to individual sites;
  • mailcatcher;
  • view, test, and debug mail sending;
  • log files;
  • PHP, NGINX, and MySQL logs available;
I download the rpm package from the official website and I install it with the DNF tool.
[root@desk Downloads]# dnf install local-5.9.9-linux.rpm 
...
Installed:
  local-5.9.9-20210215.1.x86_64  ncurses-compat-libs-6.2-3.20200222.fc33.x86_64
  nss-tools-3.60.1-1.fc33.x86_64

Complete! 
Now you can start from the LXDE main menu environment.
You can use addons available for Local, see this webpage.
You can see in the next video tutorial from the official youtube how this works.

Friday, February 26, 2021

Fedora 33 : Bash script for GitHub to fix bad commit branch.

One mistake is to have changed in the [master] branch instead of [mymain]. This can be fixed with this bash script:
# check the branch that you committed to by accident, in this case, is master
git checkout master

# reset the branch back one commit
git reset --soft HEAD^

# use stash to record the current state of the working directory
git stash

# checkout the branch it should be in, in this case, is mymain
git checkout mymain

# apply the stash
git stash apply

# commit the changes 
git commit -am "main commit"

# then push the changes to our main branch
git push origin mymain

# checkout the original branch, in this case, is master
git checkout master

# the last step is to force push the commit deletion to the original branch.
git push --force origin master
Hope this help's !!

Saturday, February 13, 2021

Fedora 33 : Can be better? part 017.

Today I will show you how Fedora distro Linux can be better in terms of the LXDE environment.
Fedora team come with Fedora LXDE on Spins, see this intro:
LXDE, the "Lightweight X11 Desktop Environment", is an extremely fast, performant, and energy-saving desktop environment. It maintained by an international community of developers and comes with a beautiful interface, multi-language support, standard keyboard shortcuts, and additional features like tabbed file browsing.
Fedora does not have a defined environment because multiple work environments can be set.
Today, I will show you how to use the LXDE environment with Fedora can be improved.
I often use a simple environment in Linux because:
  • I have older hardware
  • their simplicity allows me to make my personal settings to be more efficient;
Here are some examples of how we can improve the LXDE environment:

Using the ObConf tool

ObConf now easily installs new themes that use the .obt Openbox theme archive format for distribution.
[root@desk mythcat]# dnf search obconf
...
obconf.x86_64 : A graphical configuration editor for the Openbox window manager
[root@desk mythcat]# dnf install obconf.x86_64
Last metadata expiration check: 0:25:25 ago on Sat 13 Feb 2021 11:49:09 AM EET.
Package obconf-2.0.4-17.20150213git63ec47.fc33.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Windows open on the center screen.

You need to add this source code to the end of the file named lxde-rc.xml.
<application type="normal">
<position>
 <x>center</x>
 <y>center</y>
</position>
</application>
Depending on the keyboard and configuration you can set key combinations for different functions such as the Fn key.
The Fn key is the wakeup key when the machine is suspended.
If anyone wants to map it to other functions, then that's okay.
Let's see one example with the lxde-rc.xml file.
<keybindkey="XF86AudioRaiseVolume">
<actionname="Execute">
<command>amixersetMaster5%+unmute</command></action>
</keybind>
<keybindkey="XF86AudioLowerVolume">
<actionname="Execute">
<command>amixersetMaster5%-unmute</command></action>
</keybind>
<keybindkey="XF86MonBrightnessDown">
<actionname="Execute">
<command>xbacklight-20</command>
<startupnotify><enabled>yes</enabled><name>Decreasescreenbrightness</name></startupnotify></action>
</keybind>
<keybindkey="XF86MonBrightnessUp">
<actionname="Execute">
<command>xbacklight+20</command>
<startupnotify><enabled>yes</enabled><name>Increasescreenbrightness</name></startupnotify></action>
</keybind>
You can now run this command for the changes to take effect each time you edit the lxde-rc.xml file:
[mythcat@desk ~]$ openbox --reconfigure

Settings for users and languages.

[mythcat@desk ~]$ lxappearance 
[root@desk mythcat]# lxdm-config 
[root@desk mythcat]# setxkbmap -layout "us,ro" -option "grp:alt_shift_toggle".
In conclusion, there are enough settings that can be included by both the LXDE development team and Fedora team in a simpler way to configure the LXDE environment.
I would like to have in the LXDE environment from Fedora, the Fedora widget, the Fedora theme, Fedora Color.
The Fedora development team could effortlessly include its own utility to manage these settings for LXDE or other work environments.

Thursday, February 11, 2021

Fedora 33 : Meson build system.

Meson is a build system that is designed to be as user-friendly as possible without sacrificing performance. The main tool for this is a custom language that the user uses to describe the structure of his build. The main design goals of this language has been simplicity, clarity and conciseness. Much inspiration was drawn from the Python programming language, which is considered very readable, even to people who have not programmed in Python before., see the official webpage.
Let's test with an simple example on Fedora 33 distro.
First step, install this tool with DNF tool.
[root@desk mythcat]# dnf search meson
Last metadata expiration check: 2:20:41 ago on Thu 11 Feb 2021 08:39:26 PM EET.
============================== Name Exactly Matched: meson ==============================
meson.noarch : High productivity build system
[root@desk mythcat]# dnf install meson.noarch 
...
Installed:
  meson-0.55.3-1.fc33.noarch               ninja-build-1.10.2-1.fc33.x86_64              

Complete!
The next step is to create a C file with a simple example and one with the build file:
[mythcat@desk ~]$ mkdir CProjects
[mythcat@desk ~]$ cd CProjects/
[mythcat@desk CProjects]$ vi main.c
[mythcat@desk CProjects]$ vi meson.build
The C example file named main.c has this source code:
#include 

//
// main is where all program execution starts
//
int main(int argc, char **argv) {
  printf("Hello there.\n");
  return 0;
} 
The build file named meson.build comes with this content:
project('tutorial', 'c')
executable('demo', 'main.c') 
Use the meson with setup builddir and compile to build executable and run it.
[mythcat@desk CProjects]$ meson setup builddir
The Meson build system
Version: 0.56.2
Source dir: /home/mythcat/CProjects
Build dir: /home/mythcat/CProjects/builddir
Build type: native build
Project name: tutorial
Project version: undefined
C compiler for the host machine: cc (gcc 10.2.1 "cc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)")
C linker for the host machine: cc ld.bfd 2.35-18
Host machine cpu family: x86_64
Host machine cpu: x86_64
Build targets in project: 1

Found ninja-1.10.2 at /bin/ninja
[mythcat@desk CProjects]$ cd builddir/
[mythcat@desk builddir]$ ls
build.ninja  compile_commands.json  meson-info	meson-logs  meson-private
[mythcat@desk builddir]$ meson compile
Found runner: ['/bin/ninja']
ninja: Entering directory `.'
[2/2] Linking target demo
[mythcat@desk builddir]$ ls
build.ninja  compile_commands.json  demo  demo.p  meson-info  meson-logs  meson-private
[mythcat@desk builddir]$ ./demo
Hello there.
You can see this run well.

Sunday, February 7, 2021

Fedora 33 : Running Zeek - part 001.

Zeek is often used as a network analysis tool but can also be deployed as an IDS known as Intrusion Detection System.
The full documentation can be found on this website page.
Let's install this tool on Fedora 33 distro.
[root@desk mythcat]# dnf search zeek
Last metadata expiration check: 0:18:02 ago on Sun 07 Feb 2021 11:21:35 AM EET.
No matches found.
[root@desk mythcat]# dnf config-manager --add-repo 
https://download.opensuse.org/repositories/security:zeek/Fedora_33/security:zeek.repo
Adding repo from: https://download.opensuse.org/repositories/security:zeek/Fedora_33/security:zeek.repo
[root@desk mythcat]# dnf install zeek
The Zeek Network Security Monitor. (Fedora_33)  105 kB/s | 128 kB     00:01    
Last metadata expiration check: 0:00:01 ago on Sun 07 Feb 2021 11:40:31 AM EET.
...
  Verifying        : zeekctl-3.2.3-1.1.x86_64                               8/8 

Installed:
  libbroker-devel-3.2.3-1.1.x86_64       libpcap-devel-14:1.9.1-6.fc33.x86_64  
  openssl-devel-1:1.1.1i-1.fc33.x86_64   zeek-3.2.3-1.1.x86_64                 
  zeek-core-3.2.3-1.1.x86_64             zeek-devel-3.2.3-1.1.x86_64           
  zeek-libcaf-devel-3.2.3-1.1.x86_64     zeekctl-3.2.3-1.1.x86_64              

Complete!
[root@desk mythcat]# whereis zeek
zeek: /opt/zeek/bin/zeek
[root@desk mythcat]# whereis zeekctl
zeekctl: /opt/zeek/bin/zeekctl
I found this informations into the documentation area:
ZeekControl is an interactive shell for easily operating/managing Zeek installations on a single system or even across multiple systems in a traffic-monitoring cluster.
A Minimal Starting Configuration
These are the basic configuration changes to make for a minimal ZeekControl installation that will manage a single Zeek instance on the localhost:
  • In $PREFIX/etc/node.cfg, set the right interface to monitor.
  • In $PREFIX/etc/networks.cfg, comment out the default settings and add the networks that Zeek will consider local to the monitored environment.
  • In $PREFIX/etc/zeekctl.cfg, change the MailTo email address to a desired recipient and the LogRotationInterval to a desired log archival frequency.
Next step is to configure and adjust your PATH environment variable:
[root@desk mythcat]# export PATH=/opt/zeek/bin:$PATH
[root@desk mythcat]# zeekctl

Welcome to ZeekControl 2.2.0

Type "help" for help.
...
Use install , start and diag commands on Zeek command line to check if the Zeek tool works fine.
If you received this error on diag command , then you need to set your network interface:
==== stderr.log
fatal error: problem with interface eth0 (pcap_error: SIOCGIFHWADDR: No such device (pcap_activate))
Let's fix this error using the files configuration:
[root@desk mythcat]# updatedb
[root@desk mythcat]# locate node.cfg
/opt/zeek/etc/node.cfg
[root@desk mythcat]# vi /opt/zeek/etc/node.cfg
I change the row with the interface= with my network interface.
You can find your interface with these commands:
[root@desk mythcat]# ip link show
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
...
[root@desk mythcat]# nmcli device status
DEVICE  TYPE      STATE                   CONNECTION 
...
Now I can run the zeekctl command an check if is all right.
And first issue reported by diag and zeekctl is this:
1612693272.168741 Reporter::WARNING Your interface is likely receiving invalid TCP and UDP checksums, most likely from NIC checksum offloading. By default, packets with invalid checksums are discarded by Zeek unless using the -C command-line option or toggling the 'ignore_checksums' variable. Alternatively, disable checksum offloading by the network adapter to ensure Zeek analyzes the actual checksums that are transmitted. /opt/zeek/share/zeek/base/misc/find-checksum-offloading.zeek, line 54
You can see this tool can provide good information for users.

Fedora 33 : C# and Google A.P.I .

In this tutorial, I will show you how to use C # with Google A.P.I. on Fedora Linux. 
You can find more C # tutorials written by me on the web. 
This tutorial was added here by me because it is used with Fedora 33 distro. 
You will need to set an authentication key in your google account, see the credentials page
I used Fedora Linux to install the NuGet command:
[root@desk mythcat]# dnf install nuget 
...
Installed:
  nuget-2.8.7-11.fc33.x86_64                                                    
Complete!
Use this command to install it:
[mythcat@desk CSharpProjects]$ nuget install Google.Apis.Discovery.v1 
Attempting to resolve dependency 'Google.Apis (= 1.10.0)'.
Attempting to resolve dependency 'Google.Apis.Core (≥ 1.10.0)'.
...
Attempting to resolve dependency 'Google.Apis (≥ 1.49.0)'.
'Google.Apis' already has a dependency defined for 'Google.Apis.Core'.
Create a basic C# project and test it:
[mythcat@desk CSharpProjects]$ mkdir booksAPI && cd booksAPI
[mythcat@desk booksAPI]$ dotnet new console
Getting ready...
...
[mythcat@desk booksAPI]$ dotnet run
Hello World!
Add Google A.P.I. to this project:
[mythcat@desk booksAPI]$ dotnet add package Google.Apis.Discovery.v1 --version 1.49.0
  Determining projects to restore...
log  : Restored /home/mythcat/CSharpProjects/booksAPI/booksAPI.csproj (in 8.86 sec).
Change the default project source code with this example and add your Google key:
using System;
using System.Threading.Tasks;

using Google.Apis.Discovery.v1;
using Google.Apis.Discovery.v1.Data;
using Google.Apis.Services;
namespace booksAPI
{
    class Program
    {
    [STAThread]
        static void Main(string[] args)
        {
            Console.WriteLine("Discovery API Sample");
            Console.WriteLine("====================");
            try
            {
                new Program().Run().Wait();
            }
            catch (AggregateException ex)
            {
                foreach (var e in ex.InnerExceptions)
                {
                    Console.WriteLine("ERROR: " + e.Message);
                }
            }
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();
        }

        private async Task Run()
        {
            // Create the service.
            var service = new DiscoveryService(new BaseClientService.Initializer
                {
                    ApplicationName = "Discovery Sample",
                    ApiKey="...",
                });

            // Run the request.
            Console.WriteLine("Executing a list request...");
            var result = await service.Apis.List().ExecuteAsync();

            // Display the results.
            if (result.Items != null)
            {
                foreach (DirectoryList.ItemsData api in result.Items)
                {
                    Console.WriteLine(api.Id + " - " + api.Title);
                }
            }
        }
    }
}
I used my key and this is the result of the run project:
[mythcat@desk booksAPI]$ dotnet run
Discovery API Sample
====================
Executing a list request...
abusiveexperiencereport:v1 - Abusive Experience Report API
acceleratedmobilepageurl:v1 - Accelerated Mobile Pages (AMP) URL API
accessapproval:v1 - Access Approval API
accesscontextmanager:v1beta - Access Context Manager API
...

Sunday, January 31, 2021

Fedora 33 : Roblox and Wine.

Because I tried to install this platform, I will show you what works and what doesn't. 
At this moment Roblox Player cannot be run with Wine. 
I tested two ways to run it.
First is the roblox-linux-wrapper and the second is the direct way to install RobloxPlayerLauncher.exe.
The roblox-linux-wrapper works but you will get this error
The install process is simple:
[mythcat@desk ~]$ git clone https://github.com/roblox-linux-wrapper/roblox-linux-wrapper.git
Cloning into 'roblox-linux-wrapper'...
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 1471 (delta 7), reused 4 (delta 1), pack-reused 1454
Receiving objects: 100% (1471/1471), 380.74 KiB | 274.00 KiB/s, done.
Resolving deltas: 100% (901/901), done.

[mythcat@desk ~]$ whereis wine
wine: /usr/bin/wine /usr/lib/wine /usr/lib64/wine /usr/share/wine /usr/share/man/man1/wine.1.gz

[mythcat@desk ~]$ roblox-linux-wrapper/rlw
> main: Sourcing /home/mythcat/roblox-linux-wrapper/data/rlw-core.sh
> wineinitialize: sourcing /home/mythcat/.rlw/wine_choice
Another way is to download the EXE file and run it with Wine.
[mythcat@desk ~]$ wget http://setup.rbxcdn.com/RobloxPlayerLauncher.exe
wine RobloxPlayerLauncher.exe 
...
You can try to start a game on browser , select the Roblox Player and will get the same error. A good news is about Roblox Studio, this works very well:
[mythcat@desk ~]$ wget https://setup.rbxcdn.com/RobloxStudioLauncherBeta.exe
[mythcat@desk ~]$ wine RobloxStudioLauncherBeta.exe
My video card NVIDIA Corporation GT218 [GeForce 210] (rev a2) is not very good with this application , but works.