Pages

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