Pages

Saturday, November 2, 2019

Fedora 30 : GIMP 2.10.14 with flatpak.

Flatpak is a software utility for software deployment and package management for Linux. It is advertised as offering a sandbox environment in which users can run application software in isolation from the rest of the system. see Wikipedia .
Flatpak builds available in i386, x86-64, ARM and AArch64.
[root@desk mythcat]# dnf install flatpak.x86_64 
Last metadata expiration check: 0:27:27 ago on Fri 01 Nov 2019 11:27:47 PM EET.
Dependencies resolved.
...
Installed:
  flatpak-1.4.3-1.fc30.x86_64                                                   
  p11-kit-server-0.23.16.1-1.fc30.x86_64                                        
  xdg-desktop-portal-1.4.2-1.fc30.x86_64                                        
  xdg-desktop-portal-gtk-1.4.0-1.fc30.x86_64                                    
  flatpak-selinux-1.4.3-1.fc30.x86_64                                           
  flatpak-session-helper-1.4.3-1.fc30.x86_64                                    
  ostree-libs-2019.4-3.fc30.x86_64                                              

Complete!
The install and run of last GIMP software is easy, see commands:
[mythcat@desk ~]$ flatpak install https://flathub.org/repo/appstream/org.gimp.GIMP.flatpakref

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/mythcat/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so applications installed by 
Flatpak may not appear on your desktop until the session is restarted.

Required runtime for org.gimp.GIMP/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.32) found in remote
 flathub
Do you want to install it? [Y/n]: Y       

org.gimp.GIMP permissions:
    ipc                   network        x11       file access [1]
    dbus access [2]       tags [3]

    [1] /tmp, host, xdg-config/GIMP, xdg-config/gtk-3.0
    [2] org.freedesktop.FileManager1, org.gtk.vfs, org.gtk.vfs.*
    [3] stable
        ID                                    Arch   Branch Remote  Download
        ID                                    Arch   Branch Remote  Download
 1. [✓] org.gnome.Platform                    x86_64 3.32   flathub 360.0 MB / 374.0 MB
 2. [✓] org.gnome.Platform.Locale             x86_64 3.32   flathub  17.4 kB / 320.0 MB
 3. [✓] org.freedesktop.Platform.VAAPI.Intel  x86_64 18.08  flathub   1.8 MB / 1.8 MB
 4. [✓] org.freedesktop.Platform.html5-codecs x86_64 18.08  flathub   3.2 MB / 3.3 MB
 5. [✓] org.gimp.GIMP                         x86_64 stable flathub 106.5 MB / 108.9 MB

Installation complete.
[mythcat@desk ~]$ flatpak update

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/mythcat/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the session is restarted.

Looking for updates…
Nothing to do.
[mythcat@desk ~]$ flatpak run org.gimp.GIMP//stable

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/mythcat/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the session is restarted.

GIMP-Error: Skipping '/home/mythcat/.var/app/org.gimp.GIMP/config/GIMP/2.10/pluginrc
wrong GIMP protocol version.
...

Tuesday, October 29, 2019

Fedora 30 : 8 Gb RAM to my old hardware.

I add another DDR3 memory RAM to my hardware for Fedora distro Linux version 30.
I will try to find a CPU gen2 for 1155 socket because is an old CPU.
This is a part of fpaste command output:
[mythcat@desk ~]$ sudo fpaste --sysinfo --printonly 
=== fpaste 0.4.0.1 System Information (fpaste --sysinfo) ===
* OS Release (cat /etc/*-release | uniq):
     Fedora release 30 (Thirty)
     NAME=Fedora
     VERSION="30 (Server Edition)"
     ID=fedora
     VERSION_ID=30
     VERSION_CODENAME=""
... 
* Kernel (uname -r ; cat /proc/cmdline):
     5.3.7-200.fc30.x86_64
* Desktop(s) Installed (ls -m /usr/share/xsessions/ | sed 's/\.desktop//g' ):
     LXDE, openbox
     
* SELinux Status (sestatus):
     SELinux status:                 enabled
     SELinuxfs mount:                /sys/fs/selinux
     SELinux root directory:         /etc/selinux
     Loaded policy name:             targeted
     Current mode:                   enforcing
     Mode from config file:          enforcing
     Policy MLS status:              enabled
     Policy deny_unknown status:     allowed
     Memory protection checking:     actual (secure)
     Max kernel policy version:      31
     
* SELinux Errors (without results: "selinuxenabled && journalctl --since yesterday |grep avc: | grep 
-Eo comm="[^ ]+" | sort |uniq -c |sort -rn"):
     N/A

* CPU Model (grep 'model name' /proc/cpuinfo | awk -F: '{print $2}' | uniq -c |
         sed -re 's/^ +//' ):
     2  Intel(R) Celeron(R) CPU G1620 @ 2.70GHz
     
* 64-bit Support (grep -q ' lm ' /proc/cpuinfo && echo Yes || echo No):
     Yes
     
* Hardware Virtualization Support (grep -Eq '(vmx|svm)' /proc/cpuinfo && echo Yes || echo No):
     Yes
     
* Load average (uptime):
      21:42:37 up  2:46,  1 user,  load average: 0.42, 0.60, 0.90
     
* Memory usage (free -m):
                   total        used        free      shared  buff/cache   available
     Mem:           9694        2641        5422         189        1631        6605
     Swap:          3563           0        3563
     
* Top 5 CPU hogs (ps axuScnh | awk '$2!=3629' | sort -rnk3 | head -5):
         1000  2306 20.8  4.4 3620080 444832 ?      Sl   21:05   7:39 firefox
         1000  3497 17.2  0.0  16304  5284 pts/0    Ss   21:41   0:11 bash
         1000  2590 10.2  3.9 2825496 392932 ?      Sl   21:07   3:34 Web Content
         1000  2362  9.5  4.8 3206080 480436 ?      Sl   21:05   3:30 Web Content
         1000  2801  5.4  4.4 2989744 437088 ?      Sl   21:12   1:38 Web Content
     
* Top 5 Memory hogs (ps axuScnh | sort -rnk4 | head -5):
         1000  2362  9.5  4.8 3206080 480436 ?      Sl   21:05   3:30 Web Content
         1000  2468  3.1  4.6 2986868 466524 ?      Sl   21:05   1:09 Web Content
         1000  2801  5.4  4.4 2989744 437088 ?      Sl   21:12   1:38 Web Content
         1000  2306 20.8  4.4 3620080 444832 ?      Sl   21:05   7:39 firefox
         1000  2590 10.2  3.9 2825496 392932 ?      Sl   21:07   3:34 Web Content
...
* GL Support (glxinfo | grep -E "OpenGL version|OpenGL renderer"):
     OpenGL renderer string: NVA8
     OpenGL version string: 3.3 (Compatibility Profile) Mesa 19.1.7
     
* Xorg errors (without results: "grep '^\[.*(EE)' /var/log/Xorg.0.log ~/.local/share/xorg/Xorg.0.log
 | cut -d ':' -f 2- "):
     N/A
   
* DNF Repositories (dnf repolist):
     repo id                     repo name                                     status
     *fedora                     Fedora 30 - x86_64                            56,582
     *fedora-modular             Fedora Modular 30 - x86_64                       135
     *rpmfusion-free             RPM Fusion for Fedora 30 - Free                  616
     *rpmfusion-free-updates     RPM Fusion for Fedora 30 - Free - Updates        290
     *rpmfusion-nonfree          RPM Fusion for Fedora 30 - Nonfree               227
     *rpmfusion-nonfree-updates  RPM Fusion for Fedora 30 - Nonfree - Updates      68
     *updates                    Fedora 30 - x86_64 - Updates                  13,734
     *updates-modular            Fedora Modular 30 - x86_64 - Updates             144
     
...
* EFI boot manager output (without results: "efibootmgr -v"):
     N/A
My test performance with octane.

Wednesday, October 16, 2019

Fedora 30 : News about python 3.8.0 and install on Linux.

The new release of python development comes today.
You can see on the official webpage the new versions of Python 3.7.5 Oct. 15, 2019 and Python 3.8.0 Oct. 14, 2019.
I wrote about how to install version 3.8.0 on Fedora 30.
See the full tutorial here.

Sunday, October 6, 2019

Fedora 30 : The paris-traceroute tool.

Today I tested two Linux tools named:paris-traceroute. This tool can be install with dnf tool. This tool named paris-traceroute was implemented by Xavier Cuvellier. Debugged and enhanced by Brice Augustin. The techniques invented by the authors of Paris-traceroute to enumerate the paths of ECMP flow-based load balancing. I used the 8.8.8.8 address to test this tool.
[root@desk mythcat]# paris-traceroute 8.8.8.8 -p icmp
...
[root@desk mythcat]# paris-traceroute 8.8.8.8 -i
...
[root@desk mythcat]# paris-traceroute 8.8.8.8 -l
...
Using the verbose mode the tool will print debug messages:
[root@desk mythcat]# paris-traceroute 8.8.8.8 -v
[DEBUG](Options.cc, 222)dst_addr = 8.8.8.8
[DEBUG](Options.cc, 340)protocol     = udp
[DEBUG](Options.cc, 341)src_add      = 
[DEBUG](Options.cc, 342)dst_addr     = 8.8.8.8
[DEBUG](Options.cc, 343)ttl_initial  = 1
[DEBUG](Options.cc, 344)ttl_max      = 30
[DEBUG](Options.cc, 345)tos          = 0
[DEBUG](Options.cc, 346)probe_length = 0
[DEBUG](Options.cc, 347)algo         = hopbyhop
[DEBUG](Options.cc, 348)timeout      = 5000
[DEBUG](Options.cc, 349)delay        = 50
[DEBUG](Options.cc, 350)max_try      = 3
[DEBUG](Options.cc, 351)max_missing  = 3
[DEBUG](Options.cc, 352)id_initial   = 1
[DEBUG](Options.cc, 353)resolve      = true
[DEBUG](Options.cc, 354)ipid         = false
[DEBUG](Util.cc, 246)p_proto = 1
[INFO](Server.cc, 216)waiting for the first packet..

[INFO](TracertImpl.cc, 48)HopByHop algo
[INFO](TracertImpl.cc, 183)Send probe, ttl=1, id=1
[DEBUG](UDPProbe.cc, 247)==> UDP Probe :
[DEBUG](IP4Header.cc, 346)IP4 header :
[DEBUG](IP4Header.cc, 347)tos                = 0
[DEBUG](IP4Header.cc, 348)total_length       = 30
[DEBUG](IP4Header.cc, 349)ttl                = 1
[DEBUG](IP4Header.cc, 350)protocol           = 17
[DEBUG](IP4Header.cc, 353)source_address     = 
[DEBUG](IP4Header.cc, 355)dest_address       = 8.8.8.8
[DEBUG](UDPHeader.cc, 143)UDP header :
[DEBUG](UDPHeader.cc, 144)source_port        = 
[DEBUG](UDPHeader.cc, 145)dest_port          = 
[DEBUG](UDPHeader.cc, 146)datagram_length    = 10
[DEBUG](UDPHeader.cc, 147)checksum           = 12584
[DEBUG](UDPProbe.cc, 250)Data :
[DEBUG]0x01 0x00 
[DEBUG]0x45 0x00 0x00 0x1e 0x00 0x01 0x00 0x00 
[DEBUG]0x01 0x11 0x00 0x00 0xc0 0xa8 0x00 0x8f 
[DEBUG]0x08 0x08 0x08 0x08 0x82 0xb0 0x82 0xb1 
[DEBUG]0x00 0x0a 0x28 0x31 0x01 0x00 
[INFO](Server.cc, 276)Captured first packet!

[DEBUG](Server.cc, 280)Incoming message :
[DEBUG](Server.cc, 281)parsing.. ef72baa0 58
[DEBUG]0x45 0xc0 0x00 0x3a 0x5c 0xcd 0x00 0x00 
[DEBUG]0x40 0x01 0x9b 0x55 0xc0 0xa8 0x00 0x01 
[DEBUG]0xc0 0xa8 0x00 0x8f 0x0b 0x00 0xc6 0x62 
[DEBUG]0x00 0x00 0x00 0x00 0x45 0x00 0x00 0x1e 
[DEBUG]0x00 0x01 0x00 0x00 0x01 0x11 0xe8 0x87 
[DEBUG]0xc0 0xa8 0x00 0x8f 0x08 0x08 0x08 0x08 
[DEBUG]0x82 0xb0 0x82 0xb1 0x00 0x0a 0x28 0x31 
[DEBUG]0x01 0x00 
[DEBUG](Server.cc, 285)Incoming message parsed :
[DEBUG](IP4Header.cc, 346)IP4 header :
[DEBUG](IP4Header.cc, 347)tos                = 192
[DEBUG](IP4Header.cc, 348)total_length       = 58
[DEBUG](IP4Header.cc, 349)ttl                = 64
[DEBUG](IP4Header.cc, 350)protocol           = 1
[DEBUG](IP4Header.cc, 353)source_address     = 
...
You can see more about this tool here. Another tool is dublin-traceroute works like paris-traceroute but introduces a new technique for NAT detection ( this is not in the Fedora repo).

Friday, October 4, 2019

Fedora 30 : A general intro to linux signals with python.

UNIX/Linux systems offer special mechanisms to communicate between each individual process with signals. Let's see these signals:
[mythcat@desk ~]$ kill -l
 1) SIGHUP  2) SIGINT  3) SIGQUIT  4) SIGILL  5) SIGTRAP
 6) SIGABRT  7) SIGBUS  8) SIGFPE  9) SIGKILL 10) SIGUSR1
11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM
16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP
21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ
26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR
31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3
38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8
43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7
58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2
63) SIGRTMAX-1 64) SIGRTMAX
Each signal is represented by an integer value, and the list of signals that are available. This simple python script create a process and print one message. Each process named PID comes with a number.
[mythcat@desk ~]$ cat python3 signal_001.py 
cat: python3: No such file or directory
import os
import sys
import time
print('PID number is:', os.getpid())
while True:
    print('Waiting...')
    time.sleep(6)
[mythcat@desk ~]$ python3 signal_001.py 
PID number is: 2566
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Hangup
The PID process can be kill with this command:
[mythcat@desk ~]$ kill -SIGTERM 2566
Let's see another example that receives the signal we have sent to the process.
import os
import signal
import time

def receiveSignal(signalNumber, frame):
    print('Received:', signalNumber)
    raise SystemExit('Exiting')
    return

if __name__ == '__main__':
    # register the signals to be caught
    signal.signal(signal.SIGHUP, receiveSignal)
    signal.signal(signal.SIGINT, receiveSignal)
    signal.signal(signal.SIGQUIT, receiveSignal)
    signal.signal(signal.SIGILL, receiveSignal)
    signal.signal(signal.SIGTRAP, receiveSignal)
    signal.signal(signal.SIGABRT, receiveSignal)
    signal.signal(signal.SIGBUS, receiveSignal)
    signal.signal(signal.SIGFPE, receiveSignal)
    #signal.signal(signal.SIGKILL, receiveSignal)
    signal.signal(signal.SIGUSR1, receiveSignal)
    signal.signal(signal.SIGSEGV, receiveSignal)
    signal.signal(signal.SIGUSR2, receiveSignal)
    signal.signal(signal.SIGPIPE, receiveSignal)
    signal.signal(signal.SIGALRM, receiveSignal)
    signal.signal(signal.SIGTERM, receiveSignal)
    # register the signal to be caught
    signal.signal(signal.SIGUSR1, receiveSignal)

    # register the signal to be ignored
    signal.signal(signal.SIGINT, signal.SIG_IGN)

    # output current process id
    print('My PID is:', os.getpid())

    signal.pause()
Let't run it and see what happend when send a signal to the PID:
[mythcat@desk ~]$ python3 py_pid.py
My PID is: 2698
Received: 10
Exiting
You can see the kill command will send this output: Received: 10 Exiting .
[mythcat@desk ~]$ kill -SIGUSR1 2698

Sunday, September 22, 2019

Fedora 30 : Detect hardware issues.

You can detect your hardware and read the health of your system using many commands and tools.
Today I show you these tools: lm_sensors-sensord.x86_64 and lshw.
[root@desk mythcat]# dnf install lm_sensors-sensord.x86_64 
...
Installed:
  lm_sensors-sensord-3.5.0-6.fc30.x86_64       rrdtool-1.7.2-1.fc30.x86_64      
  libdbi-0.9.0-13.fc30.x86_64                 

Complete!
...
[root@desk mythcat]# dnf install lshw
Last metadata expiration check: 0:50:16 ago on Sun 22 Sep 2019 10:27:55 PM EEST.
Dependencies resolved.
================================================================================
 Package       Architecture    Version                   Repository        Size
================================================================================
Installing:
 lshw          x86_64          B.02.18-21.fc30           updates          315 k

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

Total download size: 315 k
Installed size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
lshw-B.02.18-21.fc30.x86_64.rpm                 598 kB/s | 315 kB     00:00    
--------------------------------------------------------------------------------
Total                                            56 kB/s | 315 kB     00:05     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : lshw-B.02.18-21.fc30.x86_64                            1/1 
  Running scriptlet: lshw-B.02.18-21.fc30.x86_64                            1/1 
  Verifying        : lshw-B.02.18-21.fc30.x86_64                            1/1 

Installed:
  lshw-B.02.18-21.fc30.x86_64                                                   

Complete!
First, use this command to select and setup the sensors:
[root@desk mythcat]# sensors-detect
# sensors-detect revision $Revision$
# System: Gigabyte Technology Co., Ltd. Z68P-DS3
# Kernel: 5.2.13-200.fc30.x86_64 x86_64
# Processor: Intel(R) Celeron(R) CPU G1620 @ 2.70GHz (6/58/9)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): YES
...

Driver `coretemp':
  * Chip `Intel digital thermal sensor' (confidence: 9)

Driver `it87':
  * ISA bus, address 0x290
    Chip `ITE IT8728F Super IO Sensors' (confidence: 9)

Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): YES
Unloading i2c-dev... OK
The output of sensors can be show like this:
[root@desk mythcat]# sensors
it8728-isa-0290
Adapter: ISA adapter
in0:          +1.04 V  (min =  +0.00 V, max =  +3.06 V)
in1:          +2.00 V  (min =  +0.00 V, max =  +3.06 V)
in2:          +2.98 V  (min =  +0.00 V, max =  +3.06 V)
in3:          +2.96 V  (min =  +0.00 V, max =  +3.06 V)
in4:          +0.00 V  (min =  +0.00 V, max =  +3.06 V)  ALARM
in5:          +0.70 V  (min =  +0.00 V, max =  +3.06 V)
in6:          +1.52 V  (min =  +0.00 V, max =  +3.06 V)
3VSB:         +3.38 V  (min =  +0.00 V, max =  +6.12 V)
Vbat:         +3.00 V  
fan1:        1180 RPM  (min =    0 RPM)
fan2:           0 RPM  (min =    0 RPM)
fan3:           0 RPM  (min =    0 RPM)
fan4:           0 RPM  (min =    0 RPM)
temp1:        +37.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:        +25.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp3:        +25.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = Intel PECI
intrusion0:  ALARM

nouveau-pci-0500
Adapter: PCI adapter
GPU core:     +0.90 V  (min =  +0.85 V, max =  +1.00 V)
temp1:        +42.0°C  (high = +95.0°C, hyst =  +3.0°C)
                       (crit = +105.0°C, hyst =  +5.0°C)
                       (emerg = +135.0°C, hyst =  +5.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +37.0°C  (high = +85.0°C, crit = +105.0°C)
Core 0:        +36.0°C  (high = +85.0°C, crit = +105.0°C)
Core 1:        +37.0°C  (high = +85.0°C, crit = +105.0°C)
Using the lshw tool:
[root@desk mythcat]# lshw
desk                        
    description: Desktop Computer
...
The tool extracts detailed information on the hardware configuration of the machine and output is shown like HTML, JSON or SQLite database, see the help:
       lshw [ -version ]

       lshw [ -help ]

       lshw [ -X ]

       lshw [  [ -html ]  [ -short ]  [ -xml ]  [ -json ]  [ -businfo ]  ]  [ -dump filename ]  [
       -class class... ]  [ -disable test... ]  [ -enable test... ]  [ -sanitize ]  [ -numeric  ]
       [ -quiet ]

Monday, September 16, 2019

Fedora 30 : Interactive learning and reinventing the wheel in programming.

Today I returned from an activity that prompted me to find a solution to display logos.
I found this GitHub repo that I read and then turned it into a single script.
It took about an hour.