Pages

Monday, March 8, 2021

Fedora 33 : Unity FPS Microgame.

Today I tested the FPS Microgame from learning area of Unity 3D with Fedora linux distro.
The project works great even my hardware is old.
This is an screenshot of the running process of the project.

Sunday, March 7, 2021

Fedora 33 : Electron based terminal named Hyper.

Hyper is an Electron-based terminal built on HTML/CSS/JS.
About Electron is an open-source software framework developed and maintained by GitHub.
The original Hyper renderer was based on the DOM, and now Hyper 3 use Electron from V1 to V3 and is tested with V4.
You can install multiple plugins and themes to make your work easier.
The install process is easy, just download the RPM package and use the DNF tool to install it:
[root@desk mythcat]# dnf install Downloads/hyper-3.0.2.x86_64.rpm 
Last metadata expiration check: 0:14:49 ago on Sun 07 Mar 2021 11:22:49 AM EET.
Dependencies resolved.
================================================================================
 Package        Architecture    Version             Repository             Size
================================================================================
Installing:
 hyper          x86_64          3.0.2-3440          @commandline           37 M

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

Total size: 37 M
Installed size: 141 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : hyper-3.0.2-3440.x86_64                                1/1 
  Running scriptlet: hyper-3.0.2-3440.x86_64                                1/1 
  Verifying        : hyper-3.0.2-3440.x86_64                                1/1 

Installed:
  hyper-3.0.2-3440.x86_64                                                       

Complete!
The Hyper terminal is installed on the LXDE main menu on the Other submenu.
You can find more information on the official webpage.
The next image is a screenshot from my Fedora 33 distro with Hyper terminal.

Sunday, February 28, 2021

Fedora 33 : Unity Platformer Microgame 2D.

This Microgame Template is a classic 2D platform game that you can mod and make your own. Check out the Creative Mods to tweak the project and add your own levels, while learning the basics of Unity. Viewing from the Learn tab in the Unity Hub? Click Download Project > Open Project to automatically open it in Unity. Viewing from the Unity Learn website? Simply go to the Learn tab in the Unity Hub and search for this Microgame, or manually import it via the Asset Store link below.
I download the Unity Editor and Unity Hub AppImage.
I run the UnityHub.AppImage and I set the path of Unity Editor into settings area.
I login with my Unity account and on learning area in UnityHub application I download the Platformer Microgame.
I select to follow the tutorial on Unity I.D.E. environment.
You can see in the next screenshot how this works:

Saturday, February 27, 2021

Fedora 33 : Local 5.9.9 by flywheel for WordPress sites.

Build WordPress sites faster than ever before Local is built for speed and simplicity. We’ve spent years designing Local to make building, testing and deploying WordPress sites a breeze.
Basically this is a standalone local development application.
You can add locally all you need for your WordPress website:
  • SSH & WP-CLI;
  • simple root SSH access to individual sites;
  • mailcatcher;
  • view, test, and debug mail sending;
  • log files;
  • PHP, NGINX, and MySQL logs available;
I download the rpm package from the official website and I install it with the DNF tool.
[root@desk Downloads]# dnf install local-5.9.9-linux.rpm 
...
Installed:
  local-5.9.9-20210215.1.x86_64  ncurses-compat-libs-6.2-3.20200222.fc33.x86_64
  nss-tools-3.60.1-1.fc33.x86_64

Complete! 
Now you can start from the LXDE main menu environment.
You can use addons available for Local, see this webpage.
You can see in the next video tutorial from the official youtube how this works.

Friday, February 26, 2021

Fedora 33 : Bash script for GitHub to fix bad commit branch.

One mistake is to have changed in the [master] branch instead of [mymain]. This can be fixed with this bash script:
# check the branch that you committed to by accident, in this case, is master
git checkout master

# reset the branch back one commit
git reset --soft HEAD^

# use stash to record the current state of the working directory
git stash

# checkout the branch it should be in, in this case, is mymain
git checkout mymain

# apply the stash
git stash apply

# commit the changes 
git commit -am "main commit"

# then push the changes to our main branch
git push origin mymain

# checkout the original branch, in this case, is master
git checkout master

# the last step is to force push the commit deletion to the original branch.
git push --force origin master
Hope this help's !!

Saturday, February 13, 2021

Fedora 33 : Can be better? part 017.

Today I will show you how Fedora distro Linux can be better in terms of the LXDE environment.
Fedora team come with Fedora LXDE on Spins, see this intro:
LXDE, the "Lightweight X11 Desktop Environment", is an extremely fast, performant, and energy-saving desktop environment. It maintained by an international community of developers and comes with a beautiful interface, multi-language support, standard keyboard shortcuts, and additional features like tabbed file browsing.
Fedora does not have a defined environment because multiple work environments can be set.
Today, I will show you how to use the LXDE environment with Fedora can be improved.
I often use a simple environment in Linux because:
  • I have older hardware
  • their simplicity allows me to make my personal settings to be more efficient;
Here are some examples of how we can improve the LXDE environment:

Using the ObConf tool

ObConf now easily installs new themes that use the .obt Openbox theme archive format for distribution.
[root@desk mythcat]# dnf search obconf
...
obconf.x86_64 : A graphical configuration editor for the Openbox window manager
[root@desk mythcat]# dnf install obconf.x86_64
Last metadata expiration check: 0:25:25 ago on Sat 13 Feb 2021 11:49:09 AM EET.
Package obconf-2.0.4-17.20150213git63ec47.fc33.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Windows open on the center screen.

You need to add this source code to the end of the file named lxde-rc.xml.
<application type="normal">
<position>
 <x>center</x>
 <y>center</y>
</position>
</application>
Depending on the keyboard and configuration you can set key combinations for different functions such as the Fn key.
The Fn key is the wakeup key when the machine is suspended.
If anyone wants to map it to other functions, then that's okay.
Let's see one example with the lxde-rc.xml file.
<keybindkey="XF86AudioRaiseVolume">
<actionname="Execute">
<command>amixersetMaster5%+unmute</command></action>
</keybind>
<keybindkey="XF86AudioLowerVolume">
<actionname="Execute">
<command>amixersetMaster5%-unmute</command></action>
</keybind>
<keybindkey="XF86MonBrightnessDown">
<actionname="Execute">
<command>xbacklight-20</command>
<startupnotify><enabled>yes</enabled><name>Decreasescreenbrightness</name></startupnotify></action>
</keybind>
<keybindkey="XF86MonBrightnessUp">
<actionname="Execute">
<command>xbacklight+20</command>
<startupnotify><enabled>yes</enabled><name>Increasescreenbrightness</name></startupnotify></action>
</keybind>
You can now run this command for the changes to take effect each time you edit the lxde-rc.xml file:
[mythcat@desk ~]$ openbox --reconfigure

Settings for users and languages.

[mythcat@desk ~]$ lxappearance 
[root@desk mythcat]# lxdm-config 
[root@desk mythcat]# setxkbmap -layout "us,ro" -option "grp:alt_shift_toggle".
In conclusion, there are enough settings that can be included by both the LXDE development team and Fedora team in a simpler way to configure the LXDE environment.
I would like to have in the LXDE environment from Fedora, the Fedora widget, the Fedora theme, Fedora Color.
The Fedora development team could effortlessly include its own utility to manage these settings for LXDE or other work environments.

Thursday, February 11, 2021

Fedora 33 : Meson build system.

Meson is a build system that is designed to be as user-friendly as possible without sacrificing performance. The main tool for this is a custom language that the user uses to describe the structure of his build. The main design goals of this language has been simplicity, clarity and conciseness. Much inspiration was drawn from the Python programming language, which is considered very readable, even to people who have not programmed in Python before., see the official webpage.
Let's test with an simple example on Fedora 33 distro.
First step, install this tool with DNF tool.
[root@desk mythcat]# dnf search meson
Last metadata expiration check: 2:20:41 ago on Thu 11 Feb 2021 08:39:26 PM EET.
============================== Name Exactly Matched: meson ==============================
meson.noarch : High productivity build system
[root@desk mythcat]# dnf install meson.noarch 
...
Installed:
  meson-0.55.3-1.fc33.noarch               ninja-build-1.10.2-1.fc33.x86_64              

Complete!
The next step is to create a C file with a simple example and one with the build file:
[mythcat@desk ~]$ mkdir CProjects
[mythcat@desk ~]$ cd CProjects/
[mythcat@desk CProjects]$ vi main.c
[mythcat@desk CProjects]$ vi meson.build
The C example file named main.c has this source code:
#include 

//
// main is where all program execution starts
//
int main(int argc, char **argv) {
  printf("Hello there.\n");
  return 0;
} 
The build file named meson.build comes with this content:
project('tutorial', 'c')
executable('demo', 'main.c') 
Use the meson with setup builddir and compile to build executable and run it.
[mythcat@desk CProjects]$ meson setup builddir
The Meson build system
Version: 0.56.2
Source dir: /home/mythcat/CProjects
Build dir: /home/mythcat/CProjects/builddir
Build type: native build
Project name: tutorial
Project version: undefined
C compiler for the host machine: cc (gcc 10.2.1 "cc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)")
C linker for the host machine: cc ld.bfd 2.35-18
Host machine cpu family: x86_64
Host machine cpu: x86_64
Build targets in project: 1

Found ninja-1.10.2 at /bin/ninja
[mythcat@desk CProjects]$ cd builddir/
[mythcat@desk builddir]$ ls
build.ninja  compile_commands.json  meson-info	meson-logs  meson-private
[mythcat@desk builddir]$ meson compile
Found runner: ['/bin/ninja']
ninja: Entering directory `.'
[2/2] Linking target demo
[mythcat@desk builddir]$ ls
build.ninja  compile_commands.json  demo  demo.p  meson-info  meson-logs  meson-private
[mythcat@desk builddir]$ ./demo
Hello there.
You can see this run well.