Pages

Monday, June 18, 2018

Fedora 28 : Godot game engine.

Today I tested the new version of Godot game engine - version 3.0.3 .
You can download it from official webpage.
I used the 64 bit version.
After download and unzip you can run the binary file in your user terminal.
The Godot game engine start with a GUI.
Into the right area of screen into Scene tab two objects: Spatial and Camera.
You need to select or add a WoldEnvironment node.
Take a look to the Inspector and use with New Environment .
Run this with the play icon.
If is all right you can see something like this:

Create e new folder into your project and name it Export.
Copy the mscorelib.dll into this folder.
Go to main menu and select Project - Export and you will see this GUI for export your game.
Press Add button to select Linux/X11 output:
Select Linux and press Export Project button.
Go to Export folder and run from your linux terminal your game.
This game engine working well with Fedora 28 and the export running without errors.

Friday, June 15, 2018

Fedora 28 : ARM programming and testing .

This is a simple tutorial about ARM programming and QEMU:
The test.c program is this :
volatile unsigned int * const UART0DR = (unsigned int *)0x101f1000;
 
void print_uart0(const char *s) {
 while(*s != '\0') { /* Loop until end of string */
 *UART0DR = (unsigned int)(*s); /* Transmit char */
 s++; /* Next char */
 }
}
 
void c_entry() {
 print_uart0("Hello world!\n");
}

Using volatile keyword is necessary to instruct the compiler that the memory pointed.
The unsigned int type enforces 32-bits read and write access.
The QEMU model like in a real system on chip the Transmit FIFO Full flag must be checked in the UARTFR register before writing on the UARTDR register.
Create the startup.s assembler file:
.global _Reset
_Reset:
 LDR sp, =stack_top
 BL c_entry
 B .
Create the script linker named test.ld:
ENTRY(_Reset)
SECTIONS
{
 . = 0x10000;
 .startup . : { startup.o(.text) }
 .text : { *(.text) }
 .data : { *(.data) }
 .bss : { *(.bss COMMON) }
 . = ALIGN(8);
 . = . + 0x1000; /* 4kB of stack memory */
 stack_top = .;
}
Next step is the install of arm-none-eabi x86_64 tools :
[root@desk arm-source]# dnf install arm-none-eabi-gcc-cs-c++.x86_64 
Last metadata expiration check: 1:54:04 ago on Fri 15 Jun 2018 06:55:54 PM EEST.
Package arm-none-eabi-gcc-cs-c++-1:7.1.0-5.fc27.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[root@desk arm-source]# dnf install arm-none-eabi-gdb.x86_64 
Last metadata expiration check: 1:54:48 ago on Fri 15 Jun 2018 06:55:54 PM EEST.
Package arm-none-eabi-gdb-7.6.2-4.fc24.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[mythcat@desk arm-source]$ ll
total 12
-rw-rw-r--. 1 mythcat mythcat  60 Jun 15 20:28 startup.s
-rw-rw-r--. 1 mythcat mythcat 288 Jun 15 20:26 test.c
-rw-rw-r--. 1 mythcat mythcat 223 Jun 15 20:29 test.ld
Let's test this with qemu virtual tool ( use Ctr+A and X keys to stop qemu) :
[mythcat@desk arm-source]$ qemu-system-arm -M versatilepb -m 64M -nographic -kernel test.bin
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
Hello world!
QEMU: Terminated

Friday, June 1, 2018

Fedora 28 : Using python to create old GUI.

The asciimatics python module provides a widgets sub-package that allows you to create interactive text user interfaces.
This python module lets you create full-screen text UIs and interactive forms to ASCII animations. The python module was created to working with any platform and python version 2 and 3.
It is licensed under the Apache Software Foundation License 2.0, see this license here.
Let see the installation process using the Fedora 28 and python version 3.6:
[root@desk mythcat]# dnf install python3
Last metadata expiration check: 2:39:44 ago on Fri 01 Jun 2018 12:51:55 PM EEST.
Package python3-3.6.5-1.fc28.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
You need also to install the asciimatics python module using the pip tool:
[mythcat@desk ~]$ pip3.6 install --user asciimatics
Collecting asciimatics
  Using cached https://files.pythonhosted.org/packages/.../asciimatics-1.9.0-py2.py3-none-any.whl
Requirement already satisfied: future in /usr/local/lib/python3.6/site-packages (from asciimatics)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.6/site-packages (from asciimatics)
Requirement already satisfied: Pillow>=2.7.0 in /usr/lib64/python3.6/site-packages (from asciimatics)
Requirement already satisfied: pyfiglet>=0.7.2 in /usr/local/lib/python3.6/site-packages (from asciimatics)
Installing collected packages: asciimatics
Successfully installed asciimatics-1.9.0
I tested some sample from the author GitHub account and is working good.
Some samples require some extra python module and you will need to install them.

Wednesday, May 30, 2018

Fedora 28 : The Lynis and system security .

Lynis is a lightweight and easy open source auditing tool to evaluate current system security.
The official webpage can be found here.
I tested the version 263 and now the Fedora development team test the 264 version.
This tool will show you a detailed report of each and every aspect of system :
  • Boot and services
  • Kernel
  • Memory and processes
  • Users, groups, and authentication
  • File systems
  • Home directories
  • File permissions
  • Software: Malware
  • Security frameworks
  • Logging and files
  • SSH support
# dnf install lynis 
# lynis audit system  >> lynix_out.txt
The result is a text file ( 27 Kb sized for my system ) with all infos about your current system security.

Saturday, May 26, 2018

Fedora 28 : Can you fix your Fedora !?

Fedora Packages have a different installation and development process thanks to testing and development teams.
Note: The common user may have networking problems and these will still lead to further errors.
A common error that should be more documented and constrained is:
Error: Failed to synchronize cache for repo 'updates'.

If you did not have intruders in the computer or provider changes to modify this process, then here are some elements that help you understand how it works.
The process of cleanup of temporary files kept for repositories and update / upgrade is still a testing and development process.
This includes any such data left behind from disabled or removed repositories as well as for different distribution release versions.
  • dnf clean dbcache : this removes cache files generated from the repository metadata and forces DNF to regenerate the cache files the next time it is run.
  • dnf clean expire-cache : this marks the repository metadata expired and will re-validate the cache for each repo the next time it is used.
  • dnf clean metadata : just removes repository metadata files which is uses to determine the remote availability of packages and will make to download all the metadata the next time it is run.
  • dnf clean packages :  removes any cached packages from the system.
  • dnf clean all : does all of the above.
You can mix these commands so you can get the desired effect with the shell tool dnf , see this example:
dnf update --refresh
This will make a update but with this feature: --refresh will set metadata as expired before running the command.

Friday, May 25, 2018

Fedora 28 : Video about development and fix packages.

The fedora 28 distribution is an advanced Linux distribution that includes tools and is supported by the fedora community.
The clear and essential reason for the right development is the learning area.
Here's a great video tutorial about developing fedora packets and that's very useful.

I do not know what it is with this group name the Factory 2.0 devel group , but they are very useful information.

Friday, May 11, 2018

Fedora 28 : The LibreCAD application.

LibreCAD - originally CADuntu is a free Open Source CAD application and today I tested with my Fedora 28.
The content for this application is available under Creative Commons Attribution Share Alike. LibreCAD is a free and open-source and can be downloaded from official webpage.
Let's see the install process of this tool:
[root@desk mythcat]# dnf install librecad.x86_64
Last metadata expiration check: 3:00:39 ago on Fri 11 May 2018 07:51:19 PM EEST.
Dependencies resolved.
================================================================================
 Package                  Arch          Version             Repository     Size
================================================================================
Installing:
 librecad                 x86_64        2.1.0-7.fc28        fedora        2.3 M
Installing dependencies:
 libdxfrw                 x86_64        0.6.3-8.fc28        fedora        438 k
 librecad-fonts           noarch        2.1.0-7.fc28        fedora         11 M
 librecad-langs           noarch        2.1.0-7.fc28        fedora        603 k
 librecad-parts           noarch        2.1.0-7.fc28        fedora        903 k
 librecad-patterns        noarch        2.1.0-7.fc28        fedora        217 k
 shapelib                 x86_64        1.4.1-2.fc28        fedora         80 k

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

Total download size: 15 M
Installed size: 109 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): libdxfrw-0.6.3-8.fc28.x86_64.rpm         658 kB/s | 438 kB     00:00    
(2/7): librecad-langs-2.1.0-7.fc28.noarch.rpm   1.4 MB/s | 603 kB     00:00    
(3/7): librecad-2.1.0-7.fc28.x86_64.rpm         1.5 MB/s | 2.3 MB     00:01    
(4/7): librecad-parts-2.1.0-7.fc28.noarch.rpm   1.6 MB/s | 903 kB     00:00    
(5/7): shapelib-1.4.1-2.fc28.x86_64.rpm         1.3 MB/s |  80 kB     00:00    
(6/7): librecad-patterns-2.1.0-7.fc28.noarch.rp 1.3 MB/s | 217 kB     00:00    
(7/7): librecad-fonts-2.1.0-7.fc28.noarch.rpm   3.0 MB/s |  11 MB     00:03    
--------------------------------------------------------------------------------
Total                                           3.5 MB/s |  15 MB     00:04     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : shapelib-1.4.1-2.fc28.x86_64                           1/7 
  Running scriptlet: shapelib-1.4.1-2.fc28.x86_64                           1/7 
  Installing       : librecad-patterns-2.1.0-7.fc28.noarch                  2/7 
  Installing       : librecad-parts-2.1.0-7.fc28.noarch                     3/7 
  Installing       : librecad-langs-2.1.0-7.fc28.noarch                     4/7 
  Installing       : librecad-fonts-2.1.0-7.fc28.noarch                     5/7 
  Installing       : libdxfrw-0.6.3-8.fc28.x86_64                           6/7 
  Running scriptlet: libdxfrw-0.6.3-8.fc28.x86_64                           6/7 
  Installing       : librecad-2.1.0-7.fc28.x86_64                           7/7 
  Running scriptlet: librecad-2.1.0-7.fc28.x86_64                           7/7 
  Verifying        : librecad-2.1.0-7.fc28.x86_64                           1/7 
  Verifying        : libdxfrw-0.6.3-8.fc28.x86_64                           2/7 
  Verifying        : librecad-fonts-2.1.0-7.fc28.noarch                     3/7 
  Verifying        : librecad-langs-2.1.0-7.fc28.noarch                     4/7 
  Verifying        : librecad-parts-2.1.0-7.fc28.noarch                     5/7 
  Verifying        : librecad-patterns-2.1.0-7.fc28.noarch                  6/7 
  Verifying        : shapelib-1.4.1-2.fc28.x86_64                           7/7 

Installed:
  librecad.x86_64 2.1.0-7.fc28          libdxfrw.x86_64 0.6.3-8.fc28            
  librecad-fonts.noarch 2.1.0-7.fc28    librecad-langs.noarch 2.1.0-7.fc28      
  librecad-parts.noarch 2.1.0-7.fc28    librecad-patterns.noarch 2.1.0-7.fc28   
  shapelib.x86_64 1.4.1-2.fc28         

Complete!
I start the application from command shell and this is the output I got.
[mythcat@desk ~]$ librecad 
RS_DEBUG::setLevel(3)
RS_DEBUG: Critical
RS_DEBUG: Errors
RS_DEBUG: Warnings
libpng warning: iCCP: known incorrect sRGB profile
The application works great I don't know from where come the errors.
You can used to test your skills into the area of
The official manual can be found here.
This is a screenshot from my Fedora 28 distro:

Fedora 28 : The Spin tool for 2D animation.

The spine is a 2D skeletal animation tool for your video games.
This tool comes with features to building great looking animations.
Spine exports animation data in its own, documented JSON and binary formats.
You can export animated GIFs, PNG or JPEG image sequences and AVI or QuickTime video.
I install the trial version into my Fedora 28 distro easy.
First, you need to download it and unarchive from the official website.
The next step will start with this command:
[mythcat@desk ~]$ cd SpineTrial/
[mythcat@desk SpineTrial]$ dir
examples  launcher  license.txt  runtimes  scripts  SpineTrial.sh
[mythcat@desk SpineTrial]$ sh SpineTrial.sh 
Spine Launcher 3.6.49 Trial
Linux amd64 4.16.6-302.fc28.x86_64
Java 1.7.0_80 Esoteric Software
64-bit Server VM
Downloading: Spine 3.7.16-beta Trial
Update complete.
Spine 3.7.16-beta Trial
Intel Open Source Technology Center
Mesa DRI Intel(R) Ivybridge Desktop 
3.0 Mesa 18.0.2
Resetting hotkeys (new version).
Using customized hotkeys.
Started.
May 10, 2018 6:54:08 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock System prefs. Unix error code 0.
May 10, 2018 6:54:08 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: 
Couldn't get file lock.
May 10, 2018 6:54:38 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock System prefs. Unix error code 0.
May 10, 2018 6:54:38 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: 
Couldn't get file lock
You can some warnings but the tool works great.
More about graphics and Linux design you can find articles on my website.
Look at these screenshots with Spine tool:

Monday, April 23, 2018

Fedora 28 : The OpenShot video editor.

This is a video editor for linux and many operating systems. I tested with Fedora 28 and works good. The install of this is very simple with dnf tool:
# dnf install openshot.noarch
The development team add many features into this software:
Feature list
Cross-platform video editing software (Linux, Mac, and Windows)
Support for many video, audio, and image formats
Powerful curve-based Key frame animations
Desktop integration (drag and drop support)
Unlimited tracks / layers
Clip resizing, scaling, trimming, snapping, rotation, and cutting
Video transitions with real-time previews
Compositing, image overlays, watermarks
Title templates, title creation, sub-titles
3D animated titles (and effects)
Advanced Timeline (including Drag & drop, scrolling, panning, zooming, and snapping)
Frame accuracy (step through each frame of video)
Time-mapping and speed changes on clips (slow/fast, forward/backward, etc...)
Audio mixing and editing
Digital video effects, including brightness, gamma, hue, greyscale, chroma key (bluescreen / greenscreen) , and many more!
The license for this software is this:
License OpenShot™ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This is a screenshot on my Fedora distro.

Tuesday, April 17, 2018

Fedora 28 : GoLang first example .

This tutorial is about GoLang IDE . About this IDE you can read more here - my intro article about this IDE.
I try to used with the platform-native GUI library for Go named andlabs/ui.
First, after you install the IDE you can check the settings on menu Settings: Using this tool with Fedora 28 is easy.
About the first install of andlabs/ui then this come with this error:
[mythcat@desk ~]$ go get github.com/andlabs/ui
# pkg-config --cflags gtk+-3.0
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gtk+-3.0', required by 'virtual:world', not found
pkg-config: exit status 1
That tell us is need to install some packages from Fedora repo:
# dnf install gtk3-devel
I used this source code to test the andlabs/ui:
package main

import (
   "github.com/andlabs/ui"
)

func main() {
   err := ui.Main(func() {
      input := ui.NewEntry()
      button := ui.NewButton("Greet")
      greeting := ui.NewLabel("")
      box := ui.NewVerticalBox()
      box.Append(ui.NewLabel("Enter your name:"), false)
      box.Append(input, false)
      box.Append(button, false)
      box.Append(greeting, false)
      window := ui.NewWindow("Hello", 200, 100, false)
      window.SetMargined(true)
      window.SetChild(box)
      button.OnClicked(func(*ui.Button) {
         greeting.SetText("Hello, " + input.Text() + "!")
      })
      window.OnClosing(func(*ui.Window) bool {
         ui.Quit()
         return true
      })
      window.Show()
   })
   if err != nil {
      panic(err)
   }
}
First time was run well and after I restart the IDE I got this error:
# gui_test
/usr/lib/golang/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
gcc: error: /home/mythcat/go/src/github.com/andlabs/ui/libui_linux_amd64.a: No such file or directory

The problem come from GoLang IDE settings and andlabs/ui.
I remove and install again the andlabs/ui and now working well.
The result of this source code come with this output:

Saturday, April 14, 2018

Fedora 28 : The VS Code on Fedora.

The Visual Studio Code is an editor for development and includes the features you need for highly productive source code editing.
You can use this editor with many Linux distros.
Today I tested with Fedora 28 distro version.
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
Next step is to install extensions for Python, Golang, PHP, C# and more.

Saturday, April 7, 2018

Fedora 28 : Golang by JetBrains .

This I.D.E. is a commercial and a free 30-day trial.
The price varies :
  • € 199.00 /1st year
  • € 159.00 /2nd year
  • € 119.00 /3rd yr onwards
JetBrains s.r.o. is a software development company whose tools are targeted towards software developers and project managers. 
... 
JetBrains, creator of the leading Java IDE - IntelliJ IDEA - is a cutting-edge software vendor specializing in the creation of intelligent development tools.

The development team come with this infos about the Golang I.D.E. :
GoLand is a new commercial IDE by JetBrains aimed at providing an ergonomic environment for Go development.
... 
The new IDE extends the IntelliJ platform with the coding assistance and tool integrations specific for the Go language.

You can download it from here.
The tree command show install files:
[mythcat@desk bin]$ tree
.
├── format.sh
├── fsnotifier
├── fsnotifier64
├── fsnotifier-arm
├── goland64.vmoptions
├── goland.png
├── goland.sh
├── goland.vmoptions
├── idea.properties
├── inspect.sh
├── libyjpagent-linux64.so
├── libyjpagent-linux.so
├── log.xml
├── printenv.py
└── restart.py

0 directories, 15 files

Some screenshots with this  linux tool:





Sunday, April 1, 2018

Fedora 27 : Fix your distro with systemctl .

This is a simple tutorial about systemctl tool and how to fix one simple error show by status. The help of this cmmand can be found with:
# man systemctl
Let's see how we can see this errors and how this working. First let's see the status for systemctl command (:
# systemctl status
The output is this:
    ● laptop
    State: degraded
     Jobs: 0 queued
   Failed: 1 units
    Since: Sun 2018-04-01 10:44:37 EEST; 58min ago
   CGroup: /
           ├─user.slice
           │ └─user-1000.slice
           │   ├─user@1000.service
           │   │ └─init.scope
           │   │   ├─929 /usr/lib/systemd/systemd --user
           │   │   └─931 (sd-pam)
           │   └─session-1.scope
           │     ├─ 748 login -- mythcat
           │     ├─ 936 -bash
           │     ├─ 982 sudo su
           │     ├─ 986 su
           │     ├─ 987 bash
           │     └─9879 systemctl status
           ├─init.scope
           │ └─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 24
           └─system.slice
             ├─irqbalance.service
             │ └─655 /usr/sbin/irqbalance --foreground
             ├─lvm2-lvmetad.service
             │ └─578 /usr/sbin/lvmetad -f -t 3600
             ├─firewalld.service
             │ └─698 /usr/bin/python3 -Es /usr/sbin/firewalld --nofork --nopid
 ...
Detect the problem from list all failed units:
# systemctl list-units --state=failed
I find the rngd module is the problem. To fix this issue just use this commands:
# systemctl daemon-reload
# systemctl status rngd 
# systemctl stop rngd
# systemctl disable rngd
# systemctl enable rngd
# systemctl start rngd
The next step is reboot and check again if systemctl come with errors.

Saturday, March 31, 2018

Testing the Fedora SOAS.

These are some of the most beautiful projects I appreciate and that's why I'm writing about them.
First is a Fedora Spin with the abbreviations SOAS from Sugar on a Stick.
This Fedora Spin is lightweight and made to run off of a flash drive, or a live CD.
Originally Red Hat and Pentagram developed SoaS as part of the One Laptop Per Child project.
About One Laptop Per Child project you can read here.
They tell us about this project at official web page:
Sugar on a Stick is a Fedora-based operating system featuring the award-winning Sugar Learning Platform and designed to fit on an ordinary USB thumbdrive ("stick").
Let's see some screenshots:

News: Yahoo hit QupZilla.

Like most, you already know as an XFCE environment installation comes with QupZilla web browser.
The QupZilla web browser is a lightweight multiplatform web browser written in Qt Framework and using its web rendering engine QtWebEngine.
If you using Fedora 28 you can get the Falkon web browser.
The Wikipedia tells us about Falkon browser "(formerly QupZilla[3]) is a free and open-source web browser, intended for general users. Falkon is licensed under GPLv3."
The Falkon browser working well with Yahoo.

About QupZilla web browser.

I used this web browser with Fedora 27 distro and then I tested with new Fedora 28.
Same problem from both distros with the Yahoo mail and the QupZilla web browser.
After authenticating when you access the mail button, a message that redirects us to use other browsers.
Is it okay or bad?
Most users would like to have no such issues.

Thursday, March 29, 2018

Fedora 27 : Tips and tricks with hugo framework .

he most important fact in learning development is knowing the information flow and how to drain it knowing the elements and stages of information processing of the content.
That's why I wrote this article succinctly to show you how simple basics of exemplification can correctly complete and help the user to modify and create content.
I will show you how to follow steps into hugo framework and website development with hugo.
You need to read the basic of hugo terms from documentation if you want to learn all about hugo or take some helpful information.
First use --verbose flag gives extra information that will be helpful when we debug or build your hogo website.
You need to know your hugo version because is the old versions has bad issues, check it with:
$ hugo version
The next command is to see and debug your work:
$ hugo --verbose 
How hugo framework works when you start for the first time with hugo development.
Now, the first place that Hugo will look for rules and files is in the layouts/ directory so it will always find the skin.
If you start with hugo then you can change the default.
This files name skins are the files responsible for the look and feel of your site.
You have two ways to create a skin:
  • create it in the layouts/ directory;
  • create it in a sub-directory of the themes/ directory.
A skin in layouts/ folder can’t be customized without updating the templates and static files that it is built from.
The skin created in themes/ folder , can be and that makes it easier for other people to use it.
In my example tutorial , I add this text to themes/test_themes_001/layouts/index.html.
The result of running hugo server command will rput this text on your browser at 127.0.0.1:13131, see command:
$ hugo server --buildDrafts
The hugo command come with many features like :
  • --buildDrafts this include content marked as draft ( see files with draft:true from .md file);
  • --ignoreCache this ignores the cache directory if you use it;
Using --verbose let you to see your errors.
For example a bad template or configuration can come with this error:
 ...Unable to locate layout for "taxonomyTerm" ...
This show you what term created by you is not on your hugo development area.
I make just few changes to show you how the hugo working. First I create the website named hugo_website_001. I used hugo command to add some pages first_test.md and new.md and a theme named test_theme_001, see:
$ hugo new site hugo_website_001
$ cd hugo_website_001
$ hugo new theme test_theme_001
$ hugo new first_test.md
$ hugo new new.md
$ tree 
.
├── archetypes
│   └── default.md
├── config.toml
├── content
│   ├── first_test.md
│   └── new.md
├── data
├── fpaste_hugo.txt
├── layouts
├── public
│   ├── categories
│   │   └── index.xml
│   ├── css
│   ├── index.html
│   ├── index.xml
│   ├── js
│   ├── sitemap.xml
│   └── tags
│       └── index.xml
├── static
└── themes
    └── test_theme_001
        ├── archetypes
        │   └── default.md
        ├── layouts
        │   ├── 404.html
        │   ├── _default
        │   │   ├── list.html
        │   │   └── single.html
        │   ├── index.html
        │   ├── index.html.save
        │   └── partials
        │       ├── footer.html
        │       └── header.html
        ├── LICENSE.md
        ├── static
        │   ├── css
        │   └── js
        └── theme.toml

19 directories, 20 files
$ 
Let's see files for settings - the toml file type. First is the config.toml file:
baseURL = "http://localhost.com"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "test_theme_001"
contentdir ="content"
publishdir = "public"
The next file is the theme.toml .

# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example

name = "Test_theme_001"
license = "MIT"
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE.md"
description = "first theme with hugo"
homepage = "http://example.com/"
tags = ["tags","categories"]
features = []
min_version = "0.31"

[author]
  name = "catafest"
  homepage = "free-tutorials.org"

# If porting an existing theme
[original]
  name = ""
  homepage = ""
  repo = ""
I will show a minimal example to understand the changes you need to make to run well with hugo framework and the my custom theme.
I show next how this changes into files is show by hugo on browser.
The basic file load is the index.html from themes/test_theme_001/layouts folder with tag h2 and text Some text !, see:

Some text !


{{ partial "header.html" . }}
This file load another file from partials folder and is named header.html with tag p and this text:
This is a custom header
Let's run the hugo server :
hugo server --theme=test_theme_001 --buildDrafts --ignoreCache --disableFastRender
This is result is this:

Fedora 28 - first installation .

Today we tested the new version of Fedora 28 Beta.
I installed this version of the old Fedora 27 and I tried to use different environments (in this order): XFCE, LXDE and LXQT.
I have received some errors from the xorg service since the motherboard has an Intel graphics card.
I used a Hdmi 1 to DVI cable and that made me an area on the home screen without resizing correctly.
First, I'm not very happy with this dnf installation process for these environments.
However, Fedora 28 now works as much as possible.
I did not test and configure the kernel on the hardware machine.
Here's a screenshot with the new Fedora 28:

Saturday, March 24, 2018

Fedora 27 : Testing the hugo web framework .

The development team come with this shot info: The world’s fastest framework for building websites.
I don't know if is the fastest framework but I'm sure is the fastest process to install and make settings using Fedora distro.
First you need to know this framework works with golang programming language.
Let's start testing this framework with the first step install the golang on the system.
$ sudo dnf install golang
$ mkdir -p $HOME/go
$ echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
$ source $HOME/.bashrc
$ go env GOPATH
/home/mythcat/go
Now you will have a go folder into home folder. Let's install the hugo framework.
$ cd  go
$ hugo new site hugo_website_001
$ cd hugo_website_001
$ tree
The result will the this:

The next step is the testing the hugo server with some commands:
$ hugo version
$ hugo --verbose
$ hugo server --verbose
$ hugo server
This will start the server and you can be see it at 127.0.0.1:1313. This is a bind address of the default hugo server and you need to set like any website. The file named config.toml in your site directory contains the global configuration for your Hugo site. This settings will make our website to run well. We can use one theme from a list of themes using git tool, see themes gohugo.io. If you get a theme named theme_001 you need to add it into config.toml file like:
theme = theme_001
The next step is to create some content and we can start with draft files. The draft file named first_test.md can be created with this command into hugo_website_001 folder. This will create the file into content folder.
$ hugo new first_test.md
The draf files can be render just if you use D option:
$ hugo server -D
If you don't have install or set a theme then you cannot see the draft or any content web pages. You can create a new theme (example: test_theme_001) and deal with this theme.
hugo new theme test_theme_001
If you use a theme from hugo then hugo is fastest framework, but if you need to create a new theme then for me is as fast as any framework.

Friday, March 23, 2018

Fedora 27 : The LibreOffice the 6.0.2 and 5.4.6.2 versions.

The LibreOffice suite is a good choice for most linux users.
If you try to download the rpm file from the official website you will get the 6.0.2 version of this suite.
The Fedora 27 come with 5.4.6.2 version for this software.
Every announcement by the Document Foundation with updates contains many bug fixes and improvements and this repairs prevent Libreoffice crashes.
Maybe the new Fedora 28 will come with the last version of the LibreOffice version.

Saturday, March 17, 2018

Fedora 27 : Testing the new Django web framework .

Today I tested the Django web framework version 2.0.3 with python 3 on my Fedora 27 distro.
The main reason is to see if the Django and Fedora working well.
I used the pip to install and activate the virtual environment for python. First you need to create your project into your folder. I make one folder named django_001.
$ mkdir django_001
$ cd django_001
The next step is to create and activate the virtual environment for python language and your project.
$ python3 -m venv django_001_venv
$ source django_001_venv/bin/activate
Into this virtual environment named django_001_venv you will install django web framework.
pip install django
If you have problems with update pip then update this tool. Now start the django project named django_test.
$ django-admin startproject django_test
$ cd django_test
$ python3 manage.py runserver
Open the url http://127.0.0.1:8000/ with your web browser.
The result is this:

If you try to use the admin web with password and user you will see errors.
One of the most common problem for django come from settings, let's see some file from the project:

  • manage.py - this runs project specific tasks (the django-admin is used to execute system wide Django tasks) and is used to execute project specific tasks;
  • __init__.py - this file that allows Python packages to be imported from directories where it's present and it's a generic file used in almost all Python applications;
  • settings.py - the configuration settings for the Django project;
  • urls.py - contains URL patterns for the Django project; 
  • wsgi.py - is WSGI configuration properties for the Django project ( you don't need to setup WSGI to develop Django applications).

The next step is to create first django application.
$ python manage.py startapp django_blog
This make a folder named django_blog into the main django_test folder. Into the main django_test folder you have another django_test folder with settings.py file. Add into settings.py file the django_blog application.
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_blog',
]
Let's fix some issues about admin and the django_blog application.
Into the main django_test folder with manage.py file use this:
$ python3 manage.py migrate
$ python3 manage.py createsuperuser

This fix the django framework and let you to add your superuser using the admin page, see:

The next issue is: create the website ( see the django_blog folder) using the Django web framework.
I don't have a issue for this django_blog but you can follow this tutorial link.

Wednesday, March 14, 2018

Fedora 27 : 'No Space Left on Device' errors .

The No Space Left on Device error is a good issue for a linux user.
The error come one issue that you have no space left on your hard drive.
The purpose of linux user is to detect the problem with the linux operating system.
You can use your root account or sudo user to run some of this linux commands.
This error named No Space Left on Device is just a vague problem and can be the cause of multiple vague errors on Linux systems.
Here are some ways you can solve the problem.

Use du and df commands to see if your disk is full (check into home and root folders area):
# df -h
# df -i /
# du -sh /

Check deleted file reserved by process (PID) with lsof:
# lsof / | grep deleted
Take a look at unlinked files:
# lsof -a +L1 *mountpoint*

Check you have bad filesystem blocks with fsck:
# fsck -vcck /dev/sda2

If you use a virtual machine (VM) then you can get this error in process of emulation of linux operating system for some PID.
It also happened to me with Android Studio software under Fedora 27 - the error is show like: No Space Left on Device.
I do not know why this happens, but I assume it's an emulation task in the memory area.

Monday, March 12, 2018

Fedora and childish ideas .

The marketing, design and promotion of any product is a key element of success.
I have to admit that although I am not an active member of Fedora distribution teams and I am glad to be able to help where it is needed.
Over the last time, I spend my online time with my son playing Roblox ( because he is away from me) and trying to show him what the computer can do for people.
This game allows development with the LUA programming language and object creation for users.
The idea that programs and games are essential factors in our lives.
Also the fact that I have been using Fedora for a long time, I have allowed myself to implement an intention to promote the Fedora distribution.
This is a shirt created with the Fedora logo and can be worn in the Roblox game. He found it here.

Monday, February 26, 2018

Fedora 27 : The LXMusic music player for LXDE.

The LXMusic come with version 0.4.7-4 , update and bugs fixes.
It is a minimalist music player for LXDE with very few features .
This simple XMMS frontend music player named LXMusic has very few features.
I used to playing my list of music files and works great.
The install can be done with dnf tool:
# dnf install lxmusic

Wednesday, February 21, 2018

Fedora 27 : selinux and getfattr attributes.

In this tutorial I show you how to use the getfattr command to get extended attributes of filesystem objects and security selinux.
One attribute is selinux.security for selinux and other like:

  • security.capability - the security.capability files stores Linux capabilities for the related file and is applies to binaries which are provided one or more capabilities via this file.
  • security.ima - for the Integrity Measurement Architecture (IMA), the file security.ima stores a hash or digital signature.
  • security.evm - this is similar to security.ima, the Extended Verification Module (EVM) stores a hash/HMAC or digital signature in this file ( the different with IMA is that it protects the metadata of the file, not the contents).

Now, about selinux.security :
You can use for example the getfattr command to perform specific security selinux tasks:

# getfattr -m security.selinux -d /etc/passwd
getfattr: Removing leading '/' from absolute path
names
# file: etc/passwd 
security.selinux="system_u:object_r:passwd_file_t:s0"
# getfattr -m security.selinux -d /etc/shadow
...
# getfattr -m security.selinux -d /var/www d /var/www
...
Both getfattr and setfattr commands has provided by the POSIX ACL package (Portable Operating Systems Interface).

Thursday, February 15, 2018

Fedora 27 : The strace tool for debug.

Today I test a great tool named strace from here.
This tool will help you with diagnostic, debugging and monitor between processes and the Linux kernel.

For example you can test this tool with ls command:
- to display only a specific system call, use the strace -e option as shown below.
$ strace -e open ls > /dev/null
- the result of this will come with all infos about count time, calls, and errors for each system call.
$ strace -c ls > /dev/null
- save the trace execution to a file:
$ strace -o output.txt ls
- display and save the strace for a given process id:
$ strace -p 1725 -o process_id_trace.txt

You can see more examples on the official webpage.

Tuesday, February 13, 2018

Fedora 27 : Test browsers for inline security.

Open the browser with this page: https://github.com.
Next step is to open the Developer Tools console.
If you use Opera then you can use this keys: Ctr+Shift +C .
If you use Firefox or Chrome browsers use F12 key.
Paste the following code into the console area to create a new inline script and add this java script:
var test = document.createElement('script');
test.innerText = 'alert("hi there");'
document.body.appendChild(test);
For example, this is a good security result on my Opera browser.

The result of this message tell us about the script we tried to execute was stopped by the browser.

Thursday, January 25, 2018

Fedora 27 : About storage management and LVM.

About storage management offering flexibility like a complex task and LVM contributes to this complexity.
If you have seen incorrect usage of LVM many times and users are often neither aware of the possibilities or alternatives for the particular storage stacks.
If you use a VirtualBox software the you can increase the vdi file:
VBoxManage modifyhd fedora.vdi --resize 30960
About LVM
The wikipedia tell us:
In Linux, Logical Volume Manager is a device mapper target that provides logical volume management for the Linux kernel. Most modern Linux distributions are LVM-aware to the point of being able to have their root file systems on a logical volume.

To create a LVM, we need to run through the following steps:
  • Select the physical storage devices for LVM 
  • Create the Volume Group from Physical Volumes 
  • Create Logical Volumes from Volume Group
All linux commands start in this case with lv and pv .
If you want to have a good management of storage then one most common task is :

The resize the PV (Physical Volume) with all free space.

All LVM commands start with lv so try to find all into your terminal by type lv ant then use keys TAB+TAB.
To resize the LVM use this commands:
$sudo su 
# pvs
  PV         VG              Fmt  Attr PSize   PFree
...
# lvdisplay
  --- Logical volume ---
  LV Path                /dev/fedora/root
  LV Name                
...
# lvextend -l+100%FREE /dev/fedora/root 
...
# df -Th
If you use Volume group on LVM then you need to use:
vgextend your_vg /dev/sda...

Wednesday, January 3, 2018

Fedora 27 : Fix your distro with package-cleanup command.

Happy New Year 2018 !
A new beginning for us, fedora distribution users, and I prefer to write about what we all use in Fedora and maybe is less well known by new  readers.
Let's start with the development process of Fedora distro come and all the installed kernels.
Normally reason why you maybe want remove kernels is limited disk space, fix problems and see what is wrong with your Fedora distro.
First issue is about installed kernels, use this command:
#rpm -q kernel
Install this package tool named dnf-utils (is a collection of add-on tool for dnf tool).
#dnf install dnf-utils
Let's start with this command, we see that several packages are seemingly installed more than once:
#package-cleanup --cleandupes
If there’s any remaining trouble with the yum database you can see with this command:
#package-cleanup --problems
To remove installed kernels from old Fedora distros use this command:
#package-cleanup --oldkernels --count=2
... the Fedora 27 use this command:
#package-cleanup --oldkernels 2
To obtain list of orphaned packages currently residing in the system:
#package-cleanup --leaves