Pages

Tuesday, August 25, 2020

Fedora 32 : Change display manager.

The display manager is a graphical login manager which starts a session, simply asks username and password to login desktop.
On Fedora, you can choose for example GDM (Gnome Display Manager), SDDM (Simple Desktop Display Manager), LXDM (LXDE Display Manager), LightDM, KDM (KDE Display Manager), XDM (X Display Manager).
I like the old gdm display manager, is good and works great.
If you want to change it then use these commands:
[root@desk mythcat]# dnf install gdm
...
Complete!
[root@desk mythcat]# systemctl disable lightdm 
[root@desk mythcat]# systemctl enable gdm
Failed to enable unit: File /etc/systemd/system/display-manager.service already exists and is a symlink to /usr/lib/systemd/system/sddm.service.
[root@desk mythcat]# systemctl disable sddm.service 
Removed /etc/systemd/system/display-manager.service.
[root@desk mythcat]# systemctl enable gdm
Created symlink /etc/systemd/system/display-manager.service → /usr/lib/systemd/system/gdm.service.
[root@desk mythcat]# reboot
If you have problems with gdm display manager then you can read about settings here.
The configuration file can be found in this file:
[root@desk mythcat]# cat /etc/gdm/custom.conf 
# GDM configuration storage

[daemon]
# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=false
AutomaticLogin=mythcat
AutomaticLoginEnable=False
[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
#Enable=true 

Sunday, August 23, 2020

Fedora 32 : Install LibreOffice_7.0.0 .

The latest releases of LibreOffice is version 7.0.0 and is available for Fedora 32 distro from here. To install it you need to use these commands:
[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.

Tuesday, August 18, 2020

Fedora 32 : Repair the starting LightDM display manager.

LightDM is a cross-desktop display manager with these features:
  • Cross-desktop - supports different desktop technologies.
  • Supports different display technologies (X, Mir, Wayland ...).
  • Lightweight - low memory usage and high performance.
  • Supports guest sessions.
  • Supports remote login (incoming - XDMCP, VNC, outgoing - XDMCP, pluggable).
  • Comprehensive test suite. 
  • Low code complexity.
To start it you need to use these commands:
[mythcat@desk ~]$ sudo systemctl get-default
[sudo] password for mythcat: 
multi-user.target
[mythcat@desk ~]$ sudo systemctl set-default graphical.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/graphical.target.
Restart your Fedora distro and use it.

Saturday, August 15, 2020

Fedora 32 : Accurate timekeeping with chronyd daemon.

Accurate timekeeping is important in networking because accurate time stamps in packets and logs are required.
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.

Let's enable the COPR repository for dotnet:
[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.

Steam is a video game digital distribution service by Valve. It was launched as a standalone software client in September 2003 as a way for Valve to provide automatic updates for their games, and expanded to include games from third-party publishers., see Wikipedia.
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.

Tuesday, July 28, 2020

Fedora 32 : Play Minecraft with TLauncher.

Today I will show you how you can install java and use TLauncher to play Minecraft game on Fedora 32.
You need to have version Java 9 or 10 in order to use this software.
First, download the archive from the official website.
Create a folder name and unzip it into this folder and use these commands:
[mythcat@desk TLauncher]$ ls
README-EN.txt  README-RUS.txt  TLauncher-2.72.jar
[mythcat@desk TLauncer]$ sudo su 
[root@desk TLauncher]# dnf list java* | grep openjdk-devel
java-latest-openjdk-devel.x86_64                  1:14.0.1.7-2.rolling.fc32        @updates
java-1.8.0-openjdk-devel.x86_64                   1:1.8.0.262.b10-1.fc32           updates 
java-1.8.0-openjdk-devel-slowdebug.i686           1:1.8.0.262.b10-1.fc32           updates 
java-1.8.0-openjdk-devel-slowdebug.x86_64         1:1.8.0.262.b10-1.fc32           updates 
java-11-openjdk-devel.i686                        1:11.0.8.10-2.fc32               updates 
java-11-openjdk-devel.x86_64                      1:11.0.8.10-2.fc32               updates 
java-11-openjdk-devel-slowdebug.x86_64            1:11.0.8.10-2.fc32               updates 
java-latest-openjdk-devel.i686                    1:14.0.1.7-2.rolling.fc32        updates 
java-latest-openjdk-devel-slowdebug.x86_64        1:14.0.1.7-2.rolling.fc32        updates 
[root@desk TLauncher]# dnf install java-11-openjdk.x86_64
Last metadata expiration check: 0:09:17 ago on Tue 28 Jul 2020 09:33:24 PM EEST.
Dependencies resolved.
=====================================================================================================================
 Package                              Architecture       Version                           Repository           Size
=====================================================================================================================
Installing:
 java-11-openjdk                      x86_64             1:11.0.8.10-2.fc32                updates             251 k
Installing dependencies:
 java-11-openjdk-headless             x86_64             1:11.0.8.10-2.fc32                updates              38 M
 ttmkfdir                             x86_64             3.0.9-58.fc32                     fedora               58 k
 xorg-x11-fonts-Type1                 noarch             7.5-24.fc32                       fedora              500 k

Transaction Summary
=====================================================================================================================
Install  4 Packages

Total download size: 39 M
Installed size: 173 M
Is this ok [y/N]: y
...
[root@desk TLauncher]# sudo alternatives --config java

There are 4 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           /opt/jdk1.8.0_232/bin/java
   2           /opt/jdk1.8.0_201/bin/java
*+ 3           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-1.fc32.x86_64/jre/bin/java)
   4           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.8.10-2.fc32.x86_64/bin/java)

Enter to keep the current selection[+], or type selection number: 4
[root@desk TLauncher]# export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.8.10-2.fc32.x86_64/
[root@desk TLauncher]# echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-11.0.8.10-2.fc32.x86
[root@desk TLauncher]# java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment 18.9 (build 11.0.8+10)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.8+10, mixed mode, sharing)
Now you can start the program:
[mythcat@desk TLauncher]$ sudo java -jar TLauncher-2.72.jar

-------------------------------------------------------------------
run double running protection
[Downloader2] Loaded configuration: normal
[Downloader2] Files in queue 15
[Downloader2] Starting download 15 files...
...
The last command will run the software and you will able to play the game.

Saturday, July 11, 2020

Fedora 32 : Upgrade from Fedora 31 to the new Fedora 32.

Today I managed to upgrade to Fedora 32.
After some time I started the system and used the tutorial from here.
I also used the following Linux commands:
#sudo dnf distro-sync --allowerasing
#dnf reinstall xorg-\* mesa\* libglvnd\*
In the following image, you can see the new upgrade works very well with my Cinnamon desktop environment.

Tuesday, February 25, 2020

Fedora 31 : Install Unity 3D on Fedora Linux.

If you want to install the Unity 3D software on Fedora 31 Linux distro then you can read my tutorial from this webpage.
To run Unity software you need to have one good hardware.
This install require to upload the license file even you use a free or pro license.

Tuesday, February 18, 2020

Fedora 31 : The Fyne UI toolkit for Go programming language.

Today I will show you how to use a UI toolkit with the Go programming. language. The development team comes with this toolkit at the GitHub official webpage.
Fyne is an easy to use UI toolkit and app API written in Go. It is designed to build applications that run on desktop and mobile devices with a single codebase...
[mythcat@desk ~]$ sudo dnf install golang
[sudo] password for mythcat:
...
Installed:
  golang-1.13.6-1.fc31.x86_64            golang-bin-1.13.6-1.fc31.x86_64       
  golang-src-1.13.6-1.fc31.noarch        mercurial-4.9-2.fc31.x86_64           

Complete! 
First is need to install these packages with DNF tool:
[root@desk mythcat]# dnf install libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel 
mesa-libGL-devel libXi-devel
Last metadata expiration check: 0:04:28 ago on Sun 16 Feb 2020 12:25:04 PM EET.
Package libX11-devel-1.6.9-2.fc31.x86_64 is already installed.
Package mesa-libGL-devel-19.2.8-1.fc31.x86_64 is already installed.
Package libXi-devel-1.7.10-2.fc31.x86_64 is already installed.
Dependencies resolved.
...

Installed:
  libXcursor-devel-1.1.15-6.fc31.x86_64           libXinerama-devel-1.1.4-4.fc31.x86_64           
  libXrandr-devel-1.5.2-2.fc31.x86_64             libXrender-devel-0.9.10-10.fc31.x86_64          

Complete! 
Let's install the fyne toolkit and the demo application:
[mythcat@desk ~]$ go get fyne.io/fyne
[mythcat@desk ~]$ go get fyne.io/fyne/cmd/fyne_demo/
I run the demo with this command and works very well:
[mythcat@desk ~]$ go run /home/mythcat/go/src/fyne.io/fyne/cmd/fyne_demo/main.go  

Sunday, February 16, 2020

Fedora 31 : Can be better? part 006.

I try to use the Selinux MLS with Fedora 31 and I wrote on my last article about Fedora 31 : Can be better? part 005.
After relabeling the files and start the environment I get multiple errors and I ask an answer at fedoraproject lists:
This is an example of the problem of implementing MLS in Fedora and can be remedied because MLS Selinux is old in implementing Selinux.

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...

Tuesday, February 11, 2020

Fedora 31 : Install the drawing GNOME with DNF and flatpak.

You can use the DNF tool:
[root@desk mythcat]# dnf search gnome | grep drawing 
Last metadata expiration check: 1:53:53 ago on Tue 11 Feb 2020 05:28:15 PM EET.
drawing.noarch : Drawing application for the GNOME desktop
[root@desk mythcat]# dnf install drawing.noarch 
Last metadata expiration check: 1:54:28 ago on Tue 11 Feb 2020 05:28:15 PM EET.
Dependencies resolved.
================================================================================
 Package          Architecture    Version                Repository        Size
================================================================================
Installing:
 drawing          noarch          0.4.9-1.fc31           updates          1.0 M

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

Total download size: 1.0 M
Installed size: 1.5 M
Is this ok [y/N]: y
Downloading Packages:
drawing-0.4.9-1.fc31.noarch.rpm                 1.4 MB/s | 1.0 MB     00:00    
--------------------------------------------------------------------------------
Total                                           601 kB/s | 1.0 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : drawing-0.4.9-1.fc31.noarch                            1/1 
  Running scriptlet: drawing-0.4.9-1.fc31.noarch                            1/1 
  Verifying        : drawing-0.4.9-1.fc31.noarch                            1/1 

Installed:
  drawing-0.4.9-1.fc31.noarch                                                   

Complete!
This install use the flatpak tool:
[root@desk mythcat]# dnf install flatpak
Last metadata expiration check: 1:47:49 ago on Tue 11 Feb 2020 05:28:15 PM EET.
Dependencies resolved.
================================================================================
 Package                     Arch        Version             Repository    Size
================================================================================
Installing:
 flatpak                     x86_64      1.4.3-3.fc31        updates      1.1 M
Installing dependencies:
 flatpak-selinux             noarch      1.4.3-3.fc31        updates       24 k
 flatpak-session-helper      x86_64      1.4.3-3.fc31        updates       72 k
Installing weak dependencies:
 p11-kit-server              x86_64      0.23.20-1.fc31      updates      186 k
 xdg-desktop-portal          x86_64      1.4.2-3.fc31        fedora       386 k
 xdg-desktop-portal-gtk      x86_64      1.4.0-1.fc31        fedora       212 k

Transaction Summary
================================================================================
Install  6 Packages

Total download size: 1.9 M
Installed size: 7.7 M
Is this ok [y/N]: y
...
Installed:
  flatpak-1.4.3-3.fc31.x86_64                                                   
  flatpak-selinux-1.4.3-3.fc31.noarch                                           
  flatpak-session-helper-1.4.3-3.fc31.x86_64                                    
  p11-kit-server-0.23.20-1.fc31.x86_64                                          
  xdg-desktop-portal-1.4.2-3.fc31.x86_64                                        
  xdg-desktop-portal-gtk-1.4.0-1.fc31.x86_64                                    

Complete! 
Let's install the flatpakrepo:
[mythcat@desk ~]$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

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.
[mythcat@desk ~]$ flatpak install flathub com.github.maoschanz.drawing

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 matches…
Required runtime for com.github.maoschanz.drawing/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.34)
 found in remote flathub
Do you want to install it? [Y/n]: Y

com.github.maoschanz.drawing permissions:
    ipc   wayland   x11



        ID                                   Arch   Branch Remote  Download
 1. [✓] org.gnome.Platform                   x86_64 3.34   flathub 304.2 MB / 318.5 MB
 2. [✓] org.gnome.Platform.Locale            x86_64 3.34   flathub  16.8 kB / 322.0 MB
 3. [✓] org.freedesktop.Platform.GL.default  x86_64 19.08  flathub  92.6 MB / 92.6 MB
 4. [✓] org.freedesktop.Platform.VAAPI.Intel x86_64 19.08  flathub   8.7 MB / 8.7 MB
 5. [✗] org.freedesktop.Platform.openh264    x86_64 19.08  flathub 594.2 kB / 593.4 kB
 6. [✓] com.github.maoschanz.drawing         x86_64 stable flathub   1.0 MB / 1.1 MB
 7. [✓] com.github.maoschanz.drawing.Locale  x86_64 stable flathub   1.7 kB / 86.2 kB

Warning: org.freedesktop.Platform.openh264 not installed
Installation complete.
[mythcat@desk ~]$ flatpak install org.freedesktop.Platform/x86_64/19.08

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 matches…
Found similar ref(s) for ‘org.freedesktop.Platform/x86_64/19.08’ in remote ‘flathub’ (system).
Use this remote? [Y/n]: Y


        ID                                Arch   Branch Remote  Download
 1. [✓] org.freedesktop.Platform          x86_64 19.08  flathub  11.5 MB / 238.1 MB
 2. [✓] org.freedesktop.Platform.Locale   x86_64 19.08  flathub  16.7 kB / 318.2 MB
 3. [✓] org.freedesktop.Platform.openh264 x86_64 19.08  flathub 593.6 kB / 593.4 kB

Installation complete. 
Restart the session and run it with this command:
[mythcat@desk ~]$ flatpak run com.github.maoschanz.drawing

Sunday, February 2, 2020

Fedora 31 : Can be better? part 005.

Today we have once again dealt with this topic on the possibilities of improving the Fedora distro.
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.