[root@fedora mythcat]# dnf install yubikey-manager.noarch
Last metadata expiration check: 0:41:43 ago on Sat 16 Oct 2021 10:46:03 PM EEST.
Dependencies resolved.
================================================================================
Package Arch Version Repo Size
================================================================================
Installing:
yubikey-manager noarch 4.0.7-1.20210908gitbf45dad.fc35 fedora 9.4 k
Installing dependencies:
libyubikey x86_64 1.13-16.fc35 fedora 34 k
python3-fido2 noarch 0.9.1-4.fc35 fedora 237 k
python3-pyscard x86_64 1.9.7-13.fc35 fedora 180 k
python3-yubikey-manager noarch 4.0.7-1.20210908gitbf45dad.fc35 fedora 223 k
ykpers x86_64 1.20.0-8.fc35 fedora 106 k
Downgrading:
python3-cryptography x86_64 3.4.7-5.fc35 fedora 695 k
Transaction Summary
================================================================================
Install 6 Packages
Downgrade 1 Package
Total download size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): python3-fido2-0.9.1-4.fc35.noarch.rpm 401 kB/s | 237 kB 00:00
(2/7): libyubikey-1.13-16.fc35.x86_64.rpm 52 kB/s | 34 kB 00:00
(3/7): python3-pyscard-1.9.7-13.fc35.x86_64.rpm 808 kB/s | 180 kB 00:00
(4/7): python3-yubikey-manager-4.0.7-1.20210908 526 kB/s | 223 kB 00:00
(5/7): yubikey-manager-4.0.7-1.20210908gitbf45d 81 kB/s | 9.4 kB 00:00
(6/7): ykpers-1.20.0-8.fc35.x86_64.rpm 225 kB/s | 106 kB 00:00
(7/7): python3-cryptography-3.4.7-5.fc35.x86_64 68 kB/s | 695 kB 00:10
--------------------------------------------------------------------------------
Total 130 kB/s | 1.4 MB 00:11
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Downgrading : python3-cryptography-3.4.7-5.fc35.x86_64 1/8
Installing : python3-fido2-0.9.1-4.fc35.noarch 2/8
Installing : python3-pyscard-1.9.7-13.fc35.x86_64 3/8
Installing : libyubikey-1.13-16.fc35.x86_64 4/8
Installing : ykpers-1.20.0-8.fc35.x86_64 5/8
Installing : python3-yubikey-manager-4.0.7-1.20210908gitbf45dad.f 6/8
Installing : yubikey-manager-4.0.7-1.20210908gitbf45dad.fc35.noar 7/8
Cleanup : python3-cryptography-35.0.0-2.fc35.x86_64 8/8
Running scriptlet: python3-cryptography-35.0.0-2.fc35.x86_64 8/8
Verifying : python3-cryptography-3.4.7-5.fc35.x86_64 1/8
Verifying : python3-cryptography-35.0.0-2.fc35.x86_64 2/8
Verifying : libyubikey-1.13-16.fc35.x86_64 3/8
Verifying : python3-fido2-0.9.1-4.fc35.noarch 4/8
Verifying : python3-pyscard-1.9.7-13.fc35.x86_64 5/8
Verifying : python3-yubikey-manager-4.0.7-1.20210908gitbf45dad.f 6/8
Verifying : ykpers-1.20.0-8.fc35.x86_64 7/8
Verifying : yubikey-manager-4.0.7-1.20210908gitbf45dad.fc35.noar 8/8
Downgraded:
python3-cryptography-3.4.7-5.fc35.x86_64
Installed:
libyubikey-1.13-16.fc35.x86_64
python3-fido2-0.9.1-4.fc35.noarch
python3-pyscard-1.9.7-13.fc35.x86_64
python3-yubikey-manager-4.0.7-1.20210908gitbf45dad.fc35.noarch
ykpers-1.20.0-8.fc35.x86_64
yubikey-manager-4.0.7-1.20210908gitbf45dad.fc35.noarch
Complete!
[mythcat@fedora ~]$ ykman
Usage: ykman [OPTIONS] COMMAND [ARGS]...
Configure your YubiKey via the command line.
Examples:
List connected YubiKeys, only output serial number:
$ ykman list --serials
Show information about YubiKey with serial number 0123456:
$ ykman --device 0123456 info
Options:
-d, --device SERIAL Specify which YubiKey to interact with by
serial number.
-r, --reader NAME Use an external smart card reader. Conflicts
with --device and list.
-l, --log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
Enable logging at given verbosity level.
--log-file FILE Write logs to the given FILE instead of
standard error; ignored unless --log-level
is also set.
--diagnose Show diagnostics information useful for
troubleshooting.
-v, --version Show version information about the app
--full-help Show --help, including hidden commands, and
exit.
-h, --help Show this message and exit.
Commands:
info Show general information.
list List connected YubiKeys.
config Enable or disable applications.
fido Manage the FIDO applications.
oath Manage the OATH application.
openpgp Manage the OpenPGP application.
otp Manage the YubiOTP application.
piv Manage the PIV application.
[mythcat@fedora ~]$ ykman info
Device type: YubiKey 4
Serial number:
Firmware version: 4.3.4
Enabled USB interfaces: OTP, FIDO, CCID
Applications
FIDO2 Not available
OTP Enabled
FIDO U2F Enabled
OATH Enabled
YubiHSM Auth Not available
OpenPGP Enabled
PIV Enabled
[mythcat@fedora ~]$ ykman fido list
WARNING: The use of this command is deprecated and will be removed!
Replace with: ykman fido credentials list
Error: Credential Management is not supported on this YubiKey.
tutorials, tips, tricks, commands, programming, linux, windows, database, sql, python, programming language, Fedora, drawing, painting, tutorial, tutorials
Sunday, October 17, 2021
Fedora 35 : The yubikey tool.
Sunday, June 27, 2021
Fedora 34 : Install evolution tool.
[root@desk mythcat]# dnf search evolution
Last metadata expiration check: 3:46:10 ago on Sun 27 Jun 2021 10:18:50 AM EEST.
======================= Name Exactly Matched: evolution ========================
evolution.x86_64 : Mail and calendar client for GNOME
...
[root@desk mythcat]# dnf install evolution.x86_64
Last metadata expiration check: 3:48:05 ago on Sun 27 Jun 2021 10:18:50 AM EEST.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
evolution x86_64 3.40.2-1.fc34 updates 3.7 M
Installing dependencies:
evolution-langpacks noarch 3.40.2-1.fc34 updates 5.6 M
highlight x86_64 3.60-3.fc34 fedora 887 k
libytnef x86_64 1:1.9.3-5.fc34 fedora 39 k
Transaction Summary
================================================================================
Install 4 Packages
Total download size: 10 M
Installed size: 56 M
Is this ok [y/N]: y
...
Installed:
evolution-3.40.2-1.fc34.x86_64 evolution-langpacks-3.40.2-1.fc34.noarch
highlight-3.60-3.fc34.x86_64 libytnef-1:1.9.3-5.fc34.x86_64
Complete!
Wednesday, June 16, 2021
Fedora 34 : The grubby command line tool.
[root@desk mythcat]# man grubby
[root@desk mythcat]# grubby --info=ALL | grep ^kernel
kernel="/boot/vmlinuz-5.12.10-300.fc34.x86_64"
kernel="/boot/vmlinuz-5.12.8-300.fc34.x86_64"
kernel="/boot/vmlinuz-0-rescue-fc76db87af524282b0c7e05a9c5d18f4
[root@desk mythcat]# grubby --info="/boot/vmlinuz-$(uname -r)"
index=0
kernel="/boot/vmlinuz-5.12.10-300.fc34.x86_64"
args="ro resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet splash
acpi_osi=Linux"
root="/dev/mapper/fedora-root"
initrd="/boot/initramfs-5.12.10-300.fc34.x86_64.img"
title="Fedora (5.12.10-300.fc34.x86_64) 34 (MATE-Compiz)"
id="fc76db87af524282b0c7e05a9c5d18f4-5.12.10-300.fc34.x86_64"
[root@desk mythcat]# grubby --update-kernel ALL --args selinux=0
[root@desk mythcat]# grubby --info="/boot/vmlinuz-$(uname -r)"
index=0
kernel="/boot/vmlinuz-5.12.10-300.fc34.x86_64"
args="ro resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet splash
acpi_osi=Linux selinux=0"
root="/dev/mapper/fedora-root"
initrd="/boot/initramfs-5.12.10-300.fc34.x86_64.img"
title="Fedora (5.12.10-300.fc34.x86_64) 34 (MATE-Compiz)"
id="fc76db87af524282b0c7e05a9c5d18f4-5.12.10-300.fc34.x86_64"
[root@desk mythcat]# grubby --update-kernel ALL --remove-args selinux
[root@desk mythcat]# grubby --info="/boot/vmlinuz-$(uname -r)"
index=0
kernel="/boot/vmlinuz-5.12.10-300.fc34.x86_64"
args="ro resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet splash
acpi_osi=Linux"
root="/dev/mapper/fedora-root"
initrd="/boot/initramfs-5.12.10-300.fc34.x86_64.img"
title="Fedora (5.12.10-300.fc34.x86_64) 34 (MATE-Compiz)"
id="fc76db87af524282b0c7e05a9c5d18f4-5.12.10-300.fc34.x86_64"
[root@desk mythcat]# grubby --info=ALL | grep -E "^kernel|^index"
index=0
kernel="/boot/vmlinuz-5.12.10-300.fc34.x86_64"
index=1
kernel="/boot/vmlinuz-5.12.8-300.fc34.x86_64"
index=2
kernel="/boot/vmlinuz-0-rescue-fc76db87af524282b0c7e05a9c5d18f4"
[root@desk mythcat]# grubby --set-default-index=1
Saturday, May 8, 2021
Fedora 33 : Simple installation of the TeamViewer utility.
[root@desk mythcat]# dnf clean all
76 files removed
[root@desk mythcat]# dnf -y install wget
[root@desk mythcat]# wget https://download.teamviewer.com/download/linux/teamviewer.x86_64.rpm
--2021-05-08 16:44:17--
https://download.teamviewer.com/download/linux/teamviewer.x86_64.rpm
Resolving download.teamviewer.com (download.teamviewer.com)... 104.16.62.16, 104.16.63.16,
2606:4700::6810:3f10, ...
...
Connecting to dl.teamviewer.com (dl.teamviewer.com)|104.16.62.16|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15280308 (15M) [application/x-redhat-package-manager]
Saving to: ‘teamviewer.x86_64.rpm’
teamviewer.x86_64.rp 100%[=====================>] 14.57M 16.6MB/s in 0.9s
2021-05-08 16:44:19 (16.6 MB/s) - ‘teamviewer.x86_64.rpm’ saved [15280308/15280308]
[root@desk mythcat]# dnf -y install teamviewer.x86_64.rpm
Last metadata expiration check: 0:04:58 ago on Sat 08 May 2021 04:40:17 PM EEST.
Package teamviewer-15.17.6-0.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@desk mythcat]# wget https://download.teamviewer.com/download/linux/signature/TeamViewer2017.asc
...
[root@desk mythcat]# gpg --import TeamViewer2017.asc
...
gpg: imported: 1
Sunday, January 31, 2021
Fedora 33 : Roblox and Wine.
[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.Saturday, January 30, 2021
Fedora 33 : The new Wine 6.0.
[root@desk mythcat]# dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/33/winehq.repo
Adding repo from: https://dl.winehq.org/wine-builds/fedora/33/winehq.repo
[root@desk mythcat]# dnf install wine
WineHQ packages 1.8 MB/s | 1.2 MB 00:00
Dependencies resolved.
================================================================================
Package Arch Version Repo Size
================================================================================
Installing:
wine x86_64 6.0-1.fc33 updates 13 k
Installing dependencies:
SDL2 i686 2.0.14-1.fc33 updates 589 k
cdparanoia-libs i686 10.2-34.fc33 fedora 56 k
gd i686 2.3.0-3.fc33 fedora 142 k
graphene i686 1.10.2-4.fc33 fedora 71 k
gstreamer1-plugins-base i686 1.18.2-1.fc33 updates 2.1 M
...
wine-opencl-6.0-1.fc33.x86_64
wine-pulseaudio-6.0-1.fc33.i686
wine-pulseaudio-6.0-1.fc33.x86_64
wine-small-fonts-6.0-1.fc33.noarch
wine-symbol-fonts-6.0-1.fc33.noarch
wine-system-fonts-6.0-1.fc33.noarch
wine-systemd-6.0-1.fc33.noarch
wine-tahoma-fonts-6.0-1.fc33.noarch
wine-times-new-roman-fonts-6.0-1.fc33.noarch
wine-twain-6.0-1.fc33.i686
wine-twain-6.0-1.fc33.x86_64
wine-webdings-fonts-6.0-1.fc33.noarch
wine-wingdings-fonts-6.0-1.fc33.noarch
Complete!
You can build it from source code:
[mythcat@desk ~]$ cd wine-6.0/
[mythcat@desk wine-6.0]$ ls
aclocal.m4 configure.ac fonts LICENSE.OLD nls server
ANNOUNCE COPYING.LIB include loader po tools
AUTHORS dlls libs MAINTAINERS programs VERSION
configure documentation LICENSE Makefile.in README
Wine uses a virtual C: drive and you need to configure it with this command:
[mythcat@desk ~]$ winecfg
wine: created the configuration directory '/home/mythcat/.wine'
002c:fixme:winediag:LdrInitializeThunk wine-staging 6.0 is a testing version containing experimental patches.
...
This starts a new window where you can set the wine software.[mythcat@desk ~]$ ls -la .wine/drive_c/
total 8
drwxr-xr-x 7 mythcat mythcat 124 Jan 30 11:56 .
drwxr-xr-x 4 mythcat mythcat 117 Jan 30 12:03 ..
drwxr-xr-x 3 mythcat mythcat 23 Jan 30 11:56 ProgramData
drwxr-xr-x 6 mythcat mythcat 97 Jan 30 11:56 'Program Files'
drwxr-xr-x 6 mythcat mythcat 97 Jan 30 11:56 'Program Files (x86)'
drwxr-xr-x 4 mythcat mythcat 35 Jan 30 11:56 users
drwxr-xr-x 18 mythcat mythcat 4096 Jan 30 11:57 windows
-rw-r--r-- 1 mythcat mythcat 9 Jan 30 11:56 .windows-serial
I tested with my favorite old game Dune 2000 from this webpageThursday, December 17, 2020
Fedora 33 : Sigil software.
The complete control over directly editing EPUB syntax in Code View and Table of Contents generator with multi-level heading support and metadata editor.
The user interface translated into many languages and spell checking and many plugins available.
These command will show you how can search and install this software:
[root@desk mythcat]# dnf search Sigil
Last metadata expiration check: 0:54:58 ago on Wed 16 Dec 2020 11:01:54 PM EET.
======================== Name & Summary Matched: Sigil =========================
FlightCrew-sigil-plugin.x86_64 : Sigil FlightCrew epub validator plugin
sigil-doc.noarch : Documentation for Sigil ebook editor
============================= Name Matched: Sigil ==============================
sigil.x86_64 : WYSIWYG ebook editor
[root@desk mythcat]# dnf install sigil.x86_64
Last metadata expiration check: 0:55:32 ago on Wed 16 Dec 2020 11:01:54 PM EET.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
sigil x86_64 0.9.14-7.fc33 fedora 3.5 M
Installing dependencies:
minizip x86_64 2.10.2-1.fc33 updates 112 k
python3-cssselect noarch 0.9.2-16.fc33 fedora 38 k
python3-cssutils noarch 1.0.2-9.fc33 fedora 270 k
python3-regex x86_64 2020.11.13-1.fc33 updates 345 k
zipios++ x86_64 0.1.5.9-25.fc33 fedora 78 k
Installing weak dependencies:
FlightCrew-sigil-plugin x86_64 0.9.1-21.fc33 fedora 336 k
Transaction Summary
================================================================================
Install 7 Packages
Total download size: 4.7 M
Installed size: 20 M
Is this ok [y/N]: y
...
Running scriptlet: sigil-0.9.14-7.fc33.x86_64 7/7
Verifying : minizip-2.10.2-1.fc33.x86_64 1/7
Verifying : python3-regex-2020.11.13-1.fc33.x86_64 2/7
Verifying : FlightCrew-sigil-plugin-0.9.1-21.fc33.x86_64 3/7
Verifying : python3-cssselect-0.9.2-16.fc33.noarch 4/7
Verifying : python3-cssutils-1.0.2-9.fc33.noarch 5/7
Verifying : sigil-0.9.14-7.fc33.x86_64 6/7
Verifying : zipios++-0.1.5.9-25.fc33.x86_64 7/7
Installed:
FlightCrew-sigil-plugin-0.9.1-21.fc33.x86_64
minizip-2.10.2-1.fc33.x86_64
python3-cssselect-0.9.2-16.fc33.noarch
python3-cssutils-1.0.2-9.fc33.noarch
python3-regex-2020.11.13-1.fc33.x86_64
sigil-0.9.14-7.fc33.x86_64
zipios++-0.1.5.9-25.fc33.x86_64
Complete!
Thursday, October 22, 2020
Fedora 32 : Can be better? part 016.
[mythcat@desk Downloads]$ chmod a+x UnityHub.AppImage
[mythcat@desk Downloads]$ ./UnityHub.AppImage
r: 0
License accepted
...
Saturday, October 17, 2020
Fedora 32 : Visual Code and C# on Fedora distro.
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/
vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" >
/etc/yum.repos.d/vscode.repo'
Then use dnf to check and install this editor.#dnf check-update
#dnf install code
Use Extensions button or Ctrl+Shift+X keys to open in the left side area and intall the C# extension from Microsoft by pressing the Install button, see:Created a folder named CSharpProjects and using the linux terminal execute the following command:
[mythcat@desk CSharpProjects]$ dotnet new mvc -au None -o aspnetapp
The template "ASP.NET Core Web App (Model-View-Controller)" was created successfully.
This template contains technologies from parties other than Microsoft,
see https://aka.ms/aspnetcore/3.1-third-party-notices for details.
Processing post-creation actions...
Running 'dotnet restore' on aspnetapp/aspnetapp.csproj...
Restore completed in 112.76 ms for /home/mythcat/CSharpProjects/aspnetapp/aspnetapp.csproj.
Restore succeeded.
[mythcat@desk CSharpProjects]$ cd aspnetapp/
[mythcat@desk aspnetapp]$ code .
This command will open the Visual Code.
At this point, in the aspnetapp folder is an ASP.NET project open in Visual Code.
You can run this project with command:
[mythcat@desk aspnetapp]$ dotnet run
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
No XML encryptor configured. Key {4c284989-9a5d-4ea7-89e2-a383828fd7ab} may be persisted
to storage in unencrypted form.
info: Microsoft.Hosting.Lifetime[0]
Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: /home/mythcat/CSharpProjects/aspnetapp
You can open the https://localhost:5001/ and see the default Welcome page from ASP.NET.
Sunday, September 20, 2020
Fedora 32 : Can be better? part 010.
In this tutorial I will show you how can easy learn with a simple example to have a better Fedora distro with SELinux.
SELinux uses a policy store to keep track of its loaded policy modules and related settings.
You can see my active policy store name is MLS.
[root@desk mythcat]# sestatus | grep Loaded
Loaded policy name: mls
I want to create policy in the most easy way to denny memory.
I can use many way to do that or find it on SELinux.
If you want to deny user domains applications to map a memory region as both executable and writable you can use deny_execmem.
This is dangerous and the executable should be reported in bugzilla and is is enabled by default.
You must turn on the deny_execmem boolean.
setsebool -P deny_execmem 1
Let's use it:
[root@desk mythcat]# setsebool -P deny_execmem 1
[root@desk mythcat]# ausearch -c 'Web Content' --raw | audit2allow -M my-WebContent
******************** IMPORTANT ***********************
To make this policy package active, execute:
semodule -i my-WebContent.pp
[root@desk mythcat]# semodule -X 300 -i my-WebContent.pp
Let's see if this SELinux is currently loaded:
[root@desk mythcat]# semodule -l | grep Web
my-WebContent
Tuesday, September 15, 2020
Fedora 32 : Can be better? part 008.
The main reason is the build new packages and put on the repository.
I think this can be improved with a good tool to solve all dependencies and link all into a good package.
Today I tested the new Python version 3.5.10 released on September 5th, 2020.
I download an unzip the archive and I use these commands to build this python version
[mythcat@desk ~]$ cd Python-3.5.10/
[mythcat@desk Python-3.5.10]$ ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.5... no
checking for python3... python3
checking for --enable-universalsdk... no
...
The next command is make:
[mythcat@desk Python-3.5.10]$ make
gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
-Werror=declaration-after-statement -I. -I./Include -DPy_BUILD_CORE -o Programs/python.o
./Programs/python.c
...
# On Darwin, always use the python version of the script, the shell
# version doesn't use the compiler customizations that are provided
# in python (_osx_support.py).
if test `uname -s` = Darwin; then \
cp python-config.py python-config; \
fi
Then I used make test.
[mythcat@desk Python-3.5.10]$ make test
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers
Python build finished successfully!
...
For the last part I used this command:
[mythcat@desk Python-3.5.10]$ sudo make install
...
The result of this is ...
[mythcat@desk Python-3.5.10]$ ls
aclocal.m4 config.sub Include Mac Modules platform python README
build configure install-sh Makefile Objects Programs Python setup.py
config.guess configure.ac Lib Makefile.pre Parser pybuilddir.txt python-config Tools
config.log Doc libpython3.5m.a Makefile.pre.in PC pyconfig.h python-config.py
config.status Grammar LICENSE Misc PCbuild pyconfig.h.in python-gdb.py
[mythcat@desk Python-3.5.10]$ ./python
Python 3.5.10 (default, Sep 6 2020, 22:32:07)
[GCC 10.2.1 20200723 (Red Hat 10.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
...
Fedora 32 : Can be better? part 009.
dnf install gtk3-devel
The Fedora team come with a group install with many feature.
#dnf -y groupinstall "Development Tools"
I test with these examples:
#include
int main(int argc,
char *argv[])
{
GtkWidget *window;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Hello World");
gtk_widget_show (window);
gtk_main ();
return 0;
}
This create a simple window with Hello World title.
#include
static void on_window_closed(GtkWidget * widget, gpointer data)
{
gtk_main_quit();
}
int main(int argc, char * argv[])
{
GtkWidget * window, * label;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect( window, "destroy", G_CALLBACK(on_window_closed), NULL);
label = gtk_label_new("Hello, World!");
gtk_container_add(GTK_CONTAINER(window), label);
gtk_widget_show(label);
gtk_widget_show(window);
gtk_main();
return 0;
}
This is the same example but you will see a label with te text Hello, World!.The last example is more complex and involves the use of signals attached to the close button and the OK button.
The main window contains three labels with my name and an editbox in which you have to enter my nickname mythcat or something else.
#include
const char *password = "mythcat";
// close the window application
void closeApp(GtkWidget *widget, gpointer data)
{
gtk_main_quit();
}
// show text when you click on button
void button_clicked(GtkWidget *button, gpointer data)
{
const char *password_text = gtk_entry_get_text(GTK_ENTRY((GtkWidget *)data));
if(strcmp(password_text, password) == 0)
printf("Access granted for user: \"%s\"\n",password);
else
printf("Access denied!\n");
}
int main( int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *label1, *label2, *label3;
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *ok_button;
GtkWidget *password_entry;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), "Labels, password with one button and layout");
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
gtk_window_set_default_size(GTK_WINDOW(window), 300, 200);
g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(closeApp), NULL);
label1 = gtk_label_new("Catalin");
label2 = gtk_label_new("George");
label3 = gtk_label_new("Festila");
password_entry = gtk_entry_new();
gtk_entry_set_visibility(GTK_ENTRY(password_entry), FALSE);
ok_button = gtk_button_new_with_label("OK");
g_signal_connect(G_OBJECT(ok_button), "clicked", G_CALLBACK(button_clicked),password_entry);
hbox = gtk_box_new(FALSE, 1);
vbox = gtk_box_new(TRUE, 2);
gtk_box_pack_start(GTK_BOX(vbox), label1, TRUE, FALSE, 5);
gtk_box_pack_start(GTK_BOX(vbox), label2, TRUE, FALSE, 5);
gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, TRUE, 5);
gtk_box_pack_start(GTK_BOX(hbox), label3, FALSE, FALSE, 5);
gtk_box_pack_start(GTK_BOX(vbox), ok_button, FALSE, FALSE, 5);
gtk_box_pack_start(GTK_BOX(hbox), password_entry, TRUE, FALSE, 5);
gtk_container_add(GTK_CONTAINER(window), hbox);
gtk_widget_show_all(window);
gtk_main();
return 0;
}
The result can be seen in the following image:I put the source code for the last example in a test.c file and compiled it like this:
[mythcat@desk ~]$ gcc test.c $(pkg-config --cflags --libs gtk+-3.0) -o test
[mythcat@desk ~]$ ./test
Saturday, September 5, 2020
Fedora 32 : Can be better? part 007.
Let's recap some basic elements specific to SELinux.
Multi Category Security or MCS is a discretionary implementation of the mandatory Multi Level Security
MCS basically tries to use the MLS attributes: Security Levels and Security Compartments.
MCS implemented have one or more extra fields in their Security Context tuple: user_u:role_r:type_t:s0:c0.
You can see this with id -Z.
The MLS Range contains two components, the low (classification and compartments) and high (clearance).
sensitivity label build from the low component: s2 with c1, c2 ...
MCS does have 1024 categories that can be assigned to processes and files.
On an MLS system are two special labels, SystemLow(s0) and SystemHigh (s15:c0.c255).
The upper end of the MCS range is in an MCS environment s0:c0.c1023 is SystemHigh.
By default, everything in an MCS environment has access to SystemLow or s0.
You will able to access files with s0:c122 and s0:c123 categories.
The MLS translation mechanism to give a more literal meaning to the machine-like policy used in the MLS sensitivity and category declaration.
The MLS rule says: "no read up and no write down".
The MLS model is used to enforce confidentiality.
All processes that are forced to operate with Security Level.
The s0 Security Level or SystemLow level is the lower end of the Security Level Range in an MLS environment.
If you do not have the correct configurations then the SELinux setting operation for Enforcing could generate errors in the linux operation after reboot or during Linux operation.
You will need to have the root password and return for new SELinux settings.
Let's solve this issue: put SELinux into Enforce mode but give my user possibility to use command sudo su.
First, you need to see this table:
SELinux user | Description | Used for |
---|---|---|
unconfined_u | SELinux user meant for unrestricted users. Unconfined users have hardly any restrictions in a SELinux context and are meant for systems where only Internet-facing services should run confined (i.e. the targeted SELinux policy store). | All users on a targeted system |
root | The SELinux user meant for the root account | The Linux root account |
sysadm_u | SELinux user with direct system administrative role assigned | Linux accounts that only perform administrative tasks |
staff_u | SELinux user for operators that need to run both non-administrative commands (through the staff_r role) and administrative commands (through the sysadm_r role).
|
Linux accounts used for both end user usage as well as administrative tasks |
user_u | SELinux user for non-privileged accounts | Unprivileged Linux accounts |
system_u | Special SELinux user meant for system services | Not used directly |
[root@desk mythcat]# semanage login --modify --seuser staff_u --range s2:c100 mythcat
[root@desk mythcat]# semanage login --modify --seuser staff_u --range s0-s15:c0.c1023 mythcat
[root@desk mythcat]# semanage login -l
[root@desk mythcat]# setenforce enforcing
[root@desk mythcat]# getenforce
Enforcing
[root@desk mythcat]# semanage login -l
ValueError: Cannot read policy store.
After reboot need some time to load the new changes, first is the last configuration.
[mythcat@desk ~]$ semanage login -l
ValueError: SELinux policy is not managed or store cannot be accessed.
[mythcat@desk ~]$ id -Z
staff_u:staff_r:staff_t:s0-s15:c0.c1023
[mythcat@desk ~]$ sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: mls
Current mode: permissive
Mode from config file: permissive
Policy MLS status: enabled
Policy deny_unknown status: denied
Memory protection checking: actual (secure)
Max kernel policy version: 33
Few seconds later all is good:
[mythcat@desk ~]$ sudo su
[sudo] password for mythcat:
bash: /root/.bashrc: Permission denied
bash-5.0# ls
bash-5.0# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: mls
Current mode: enforcing
Mode from config file: permissive
Policy MLS status: enabled
Policy deny_unknown status: denied
Memory protection checking: actual (secure)
Max kernel policy version: 33
bash-5.0# id -Z
staff_u:staff_r:staff_t:s0-s15:c0.c1023
bash-5.0# exit
exit
[mythcat@desk ~]$ sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: mls
Current mode: enforcing
Mode from config file: permissive
Policy MLS status: enabled
Policy deny_unknown status: denied
Memory protection checking: actual (secure)
Max kernel policy version: 33
Everything is fine for now, this delay is the reason for using the selinux kernel settings.
More information about Multi-Level Security and Multi-Category Security can be found on this webpage.
Sunday, August 23, 2020
Fedora 32 : Install LibreOffice_7.0.0 .
[root@desk mythcat]# dnf -y update
...
[mythcat@desk ~]$ cp Downloads/LibreOffice_7.0.0_Linux_x86-64_rpm.tar.gz ~
[mythcat@desk ~]$ ls LibreOffice*
LibreOffice_7.0.0_Linux_x86-64_rpm.tar.gz
[mythcat@desk ~]$ tar xvf LibreOffice_7.0.0_Linux_x86-64_rpm.tar.gz
LibreOffice_7.0.0.3_Linux_x86-64_rpm/
LibreOffice_7.0.0.3_Linux_x86-64_rpm/RPMS/
...
[mythcat@desk ~]$ cd LibreOffice_7.0.0.3_Linux_x86-64_rpm/
[mythcat@desk LibreOffice_7.0.0.3_Linux_x86-64_rpm]$ cd RPMS/
[mythcat@desk RPMS]$ sudo dnf install *.rpm
[sudo] password for mythcat:
Last metadata expiration check: 2:09:12 ago on Sat 22 Aug 2020 10:33:11 PM EEST.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
libobasis7.0-base x86_64 7.0.0.3-3 @commandline 1.8 M
libobasis7.0-calc x86_64 7.0.0.3-3 @commandline 9.5 M
libobasis7.0-core x86_64 7.0.0.3-3 @commandline 101 M
libobasis7.0-draw x86_64 7.0.0.3-3 @commandline 6.1 k
libobasis7.0-en-US x86_64 7.0.0.3-3 @commandline 88 k
...
Complete!
The last step is to run this software from Fedora 32 distro desktop environment.
Saturday, August 15, 2020
Fedora 32 : Accurate timekeeping with chronyd daemon.
In Linux operating systems, the NTP protocol is implemented by a daemon running in userspace.
For Fedora distro, you can choose between the daemons ntpd and chronyd. Today I will show you how to use the chronyd.
The Fedora documentation can be found on the official website.
Let's install and use this:
[root@desk mythcat]# dnf install chrony
...
[root@desk mythcat]# vim /etc/chrony.conf
With the vim tool now you can add the
In most cases, it's best to use pool.ntp.org to find an NTP server or use servers from your country.
Now, I can start and enable the daemons named chronyd and add it to the firewall.
[root@desk mythcat]# systemctl start chronyd
[root@desk mythcat]# systemctl status chronyd
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor p>
Active: active (running) since Sat 2020-08-15 12:23:08 EEST; 9h ago
Docs: man:chronyd(8)
man:chrony.conf(5)
Main PID: 10071 (chronyd)
Tasks: 1 (limit: 11800)
Memory: 1.0M
CPU: 93ms
CGroup: /system.slice/chronyd.service
└─10071 /usr/sbin/chronyd
Aug 15 12:23:08 desk systemd[1]: Starting NTP client/server...
Aug 15 12:23:08 desk chronyd[10071]: chronyd version 3.5 starting (+CMDMON +NTP>
Aug 15 12:23:08 desk chronyd[10071]: Frequency -13.819 +/- 0.344 ppm read from >
Aug 15 12:23:08 desk chronyd[10071]: Using right/UTC timezone to obtain leap se>
Aug 15 12:23:08 desk systemd[1]: Started NTP client/server.
Aug 15 12:23:13 desk chronyd[10071]: Selected source 78.96.7.25
Aug 15 12:23:13 desk chronyd[10071]: System clock TAI offset set to 37 seconds
[root@desk mythcat]# systemctl enable chronyd
[root@desk mythcat]# firewall-cmd --add-service=ntp --permanent
success
[root@desk mythcat]# firewall-cmd --reload
success
You can use it with chronyc command tool:
[root@desk mythcat]# chronyc sources
210 Number of sources = 4
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^+ blackmamba-g0.eff.ro 3 10 377 692 -1192us[-1273us] +/- 92ms
^+ corporate1.bluepink.ro 2 10 377 200 -1441us[-1441us] +/- 52ms
^+ static-5-2-155-141.rdsne> 2 10 377 468 +1622us[+1540us] +/- 51ms
^* dummy.upcnet.ro 2 10 377 435 -1221us[-1303us] +/- 57ms
[root@desk mythcat]# chronyc tracking
Reference ID : 4E600719 (dummy.upcnet.ro)
Stratum : 3
Ref time (UTC) : Sat Aug 15 19:06:18 2020
System time : 0.000439648 seconds fast of NTP time
Last offset : -0.000081712 seconds
RMS offset : 0.000591977 seconds
Frequency : 13.753 ppm slow
Residual freq : -0.000 ppm
Skew : 0.235 ppm
Root delay : 0.069966756 seconds
Root dispersion : 0.017129980 seconds
Update interval : 1036.2 seconds
Leap status : Normal
[root@desk mythcat]# chronyc activity
200 OK
4 sources online
0 sources offline
0 sources doing burst (return to online)
0 sources doing burst (return to offline)
0 sources with unknown address
Friday, August 7, 2020
Fedora 32 : First example with C# on Fedora distro.
[mythcat@desk ~]$ sudo dnf copr enable @dotnet-sig/dotnet
[sudo] password for mythcat:
Enabling a Copr repository. Please note that this repository is not part
of the main distribution, and quality may vary.
The Fedora Project does not exercise any power over the contents of
this repository beyond the rules outlined in the Copr FAQ at
,
and packages are not held to any quality or security level.
Please do not file bug reports about these packages in Fedora
Bugzilla. In case of problems, contact the owner of this repository.
Do you really want to enable copr.fedorainfracloud.org/@dotnet-sig/dotnet? [y/N]: y
Repository successfully enabled.
Install the .NET Core package:
[mythcat@desk ~]$ sudo dnf install dotnet
Copr repo for dotnet owned by @dotnet-sig 42 kB/s | 59 kB 00:01
Dependencies resolved.
=================================================================================
Package Arch Version Repository Size
=================================================================================
Installing:
dotnet x86_64 3.1.106-1.fc32 updates 11 k
Installing dependencies:
aspnetcore-runtime-3.1 x86_64 3.1.6-1.fc32 updates 6.2 M
aspnetcore-targeting-pack-3.1 x86_64 3.1.6-1.fc32 updates 945 k
dotnet-apphost-pack-3.1 x86_64 3.1.6-1.fc32 updates 70 k
dotnet-host x86_64 3.1.6-1.fc32 updates 104 k
dotnet-hostfxr-3.1 x86_64 3.1.6-1.fc32 updates 164 k
dotnet-runtime-3.1 x86_64 3.1.6-1.fc32 updates 27 M
dotnet-sdk-3.1 x86_64 3.1.106-1.fc32 updates 41 M
dotnet-targeting-pack-3.1 x86_64 3.1.6-1.fc32 updates 1.8 M
dotnet-templates-3.1 x86_64 3.1.106-1.fc32 updates 1.8 M
netstandard-targeting-pack-2.1 x86_64 3.1.106-1.fc32 updates 1.3 M
Transaction Summary
=================================================================================
Install 11 Packages
Total download size: 79 M
Installed size: 298 M
Is this ok [y/N]:
...
Use this tutorial to install Visual Studio Code.
Press Ctr-P keys to install the C# extension by OmniSharp.
ext install ms-dotnettools.csharp
The last step is to create a application HelloWorld:
[mythcat@desk ~]$ dotnet new console -o HelloWorld
Welcome to .NET Core 3.1!
---------------------
SDK Version: 3.1.106
----------------
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Find out what's new: https://aka.ms/dotnet-whats-new
Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
Write your first app: https://aka.ms/first-net-core-app
--------------------------------------------------------------------------------------
Getting ready...
The template "Console Application" was created successfully.
Processing post-creation actions...
Running 'dotnet restore' on HelloWorld/HelloWorld.csproj...
Restore completed in 119.48 ms for /home/mythcat/HelloWorld/HelloWorld.csproj.
Restore succeeded.
You can run it with dotnet run command:
[mythcat@desk ~]$ cd HelloWorld/
[mythcat@desk HelloWorld]$ ls
HelloWorld.csproj obj Program.cs
[mythcat@desk HelloWorld]$ dotnet run Program.cs
Hello World!
Sunday, August 2, 2020
Fedora 32 : Play games with Steam service.
Is very easy to install and play a game with Fedora 32 Linux distro, just follow these commands:
[mythcat@desk ~]$ sudo dnf update --refresh
[sudo] password for mythcat:
Fedora 32 openh264 (From Cisco) - x86_64 1.1 kB/s | 986 B 00:00
Fedora Modular 32 - x86_64 39 kB/s | 22 kB 00:00
Fedora Modular 32 - x86_64 - Updates 26 kB/s | 22 kB 00:00
Fedora 32 - x86_64 - Updates 10 kB/s | 9.8 kB 00:00
Fedora 32 - x86_64 20 kB/s | 23 kB 00:01
google-chrome 7.6 kB/s | 1.3 kB 00:00
MEGAsync 4.7 kB/s | 1.5 kB 00:00
MongoDB Repository 4.4 kB/s | 2.5 kB 00:00
RPM Fusion for Fedora 32 - Free - Updates 21 kB/s | 9.1 kB 00:00
RPM Fusion for Fedora 32 - Free 25 kB/s | 10 kB 00:00
RPM Fusion for Fedora 32 - Nonfree - Updates 20 kB/s | 9.3 kB 00:00
RPM Fusion for Fedora 32 - Nonfree 18 kB/s | 10 kB 00:00
Visual Studio Code 6.6 kB/s | 3.0 kB 00:00
Dependencies resolved.
Nothing to do.
Complete!
[mythcat@desk ~]$ sudo dnf install steam -y
Last metadata expiration check: 0:00:09 ago on Sun 02 Aug 2020 04:59:49 PM EEST.
Package steam-1.0.0.64-1.fc32.i686 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[mythcat@desk ~]$ steam
Running Steam on fedora 32 64-bit
STEAM_RUNTIME is enabled automatically
Pins potentially out-of-date, rebuilding...
...
Now you can pick a game from store steam and play it.
Sunday, February 16, 2020
Fedora 31 : Can be better? part 006.
SELinux is preventing su from open access on the file /var/log/lastlog.
***** Plugin catchall (100. confidence) suggests **************************
If you believe that su should be allowed open access on the lastlog file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'su' --raw | audit2allow -M my-su
# semodule -X 300 -i my-su.pp
I try to fix it but I got this error:
[root@desk mythcat]# ausearch -c 'su' --raw | audit2allow -M my-su
compilation failed:
my-su.te:36:ERROR 'syntax error' at token 'mlsconstrain' on line 36:
mlsconstrain file { write create setattr relabelfrom append unlink link rename mounton } ((l1 eq l2 -Fail-)
or (t1 == mlsfilewritetoclr -Fail-) and (h1 dom l2 -Fail-) and (l1 domby l2) or (t2 ==
mlsfilewriteinrange -Fail-)
and (l1 dom l2 -Fail-) an
# mlsconstrain file { read getattr execute } ((l1 dom l2 -Fail-) or (t1 ==
mlsfilereadtoclr -Fail-)
and (h1 dom l2 -Fail-) or (t1 == mlsfileread -Fail-) or (t2 == mlstrustedobject -Fail-) ); Constraint DENIED
/usr/bin/checkmodule: error(s) encountered while parsing configuration
[root@desk mythcat]# ausearch -c 'su' --raw | audit2allow -M my-su
compilation failed:
my-su.te:36:ERROR 'syntax error' at token 'mlsconstrain' on line 36:
mlsconstrain file { write create setattr relabelfrom append unlink link rename mounton } ((l1 eq l2 -Fail-)
or (t1 == mlsfilewritetoclr -Fail-) and (h1 dom l2 -Fail-) and (l1 domby l2) or (t2 ==
mlsfilewriteinrange -Fail-)
and (l1 dom l2 -Fail-) an
# mlsconstrain file { read getattr execute } ((l1 dom l2 -Fail-) or (t1 ==
mlsfilereadtoclr -Fail-)
and (h1 dom l2 -Fail-) or (t1 == mlsfileread -Fail-) or (t2 == mlstrustedobject -Fail-) ); Constraint DENIED
/usr/bin/checkmodule: error(s) encountered while parsing configuration...
Sunday, February 2, 2020
Fedora 31 : Can be better? part 005.
This time the adventure turned to the Selinux system switching to SELinux MLS.
Let's test the SELinux Fedora 31 from default targeted to mls.
First let's see the users:
[root@desk mythcat]# semanage user -l
Labeling MLS/ MLS/
SELinux User Prefix MCS Level MCS Range SELinux Roles
guest_u user s0 s0 guest_r
root user s0 s0-s0:c0.c1023 staff_r sysadm_r system_r unconfined_r
staff_u user s0 s0-s0:c0.c1023 staff_r sysadm_r system_r unconfined_r
sysadm_u user s0 s0-s0:c0.c1023 sysadm_r
system_u user s0 s0-s0:c0.c1023 system_r unconfined_r
unconfined_u user s0 s0-s0:c0.c1023 system_r unconfined_r
user_u user s0 s0 user_r
xguest_u user s0 s0 xguest_r
To use the MLS you need to change this file:
[root@desk mythcat]# vim /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
The changes are:
#SELINUX=enforcing
SELINUX=permissive
...
#SELINUXTYPE=targeted
SELINUXTYPE=mls
Is need to install these packages:
[root@desk mythcat]# dnf search mls | grep selinux
Last metadata expiration check: 2:45:09 ago on Sun 02 Feb 2020 01:28:54 PM EET.
selinux-policy-mls.noarch : SELinux mls base policy
[root@desk mythcat]# dnf install selinux-policy-mls.noarch
...
Installed:
mcstrans-2.9-2.fc31.x86_64
policycoreutils-newrole-2.9-5.fc31.x86_64
selinux-policy-mls-3.14.4-45.fc31.noarch
Complete!
These commands will relabel and start the MLS.
[mythcat@desk ~]$ setenforce 0
[mythcat@desk ~]$ getenforce
Permissive
...
[root@desk mythcat]# touch /.autorelabel
[root@desk mythcat]# reboot
If you have problems on boot the add selinux=0 on boot kernel.After I boot and relabel all files I got errors about Gtk-Messages.
I remove my old Cinnamon with this command:
[root@desk mythcat]# dnf groupremove -y "Cinnnamon"
I list all my group with dnf tool:
[root@desk mythcat]# dnf grouplist -v
I install the MATE environment:
dnf groupinstall -y "MATE Desktop" --allowerasing
After that the only way to start the environement is this command:
[mythcat@desk ~]$ sudo systemctl restart lightdm.service
Another issue comes from SELinux Alert Browser, where I get multiple alerts and these need to fix manually.First, these alerts are more than 250.
After I fix some of these now I see only 50.
I think this problem with changing the SELinux type can be improved.
Fedora 31 : Using the dmesg command on Linux operating system.
[mythcat@desk ~]$ dmesg
[ 0.000000] microcode: microcode updated early to revision 0x21, date = 2019-02-13
...
Show the latest message that fits on screen:
[mythcat@desk ~]$ dmesg | less
...
Use it to see infoermation about motherboard:
[mythcat@desk ~]$ dmesg | grep -i memory
...
[mythcat@desk ~]$ dmesg | grep -i dma
...
[mythcat@desk ~]$ dmesg | grep -i usb
...
[mythcat@desk ~]$ dmesg | grep -i tty
...
Same reult with a single command using multiple grep option:
[mythcat@desk ~]$ dmesg | grep -E "memory|dma|usb|tty"
This display logs related to error and warning:
[root@desk mythcat]# dmesg --level=err,warn
The dmesg comes with supported log facilities:- kern - kernel messages;
- user - random user-level messages;
- mail - mail system;
- daemon - system daemons;
- auth - security/authorization messages;
- syslog - messages generated internally by syslogd;
- lpr - line printer subsystem;
- news - network news subsystem;
[mythcat@desk ~]$ dmesg --facility=daemon
Use root user to clear dmesg logs after the reading them:
[root@desk mythcat]# dmesg -C
If you want then you can show the outpout into the colored messages:
# dmesg -L