wtorek, 10 lipca 2018

How to install MATE Desktop Environment in CentOS 7 minimal - full guide

MATE Desktop is Linux GUI based on GNOME 2
Installing MATE on Centos 7 is easy.

First step:
Check internet connection, if you want use DHCP run this:
dhclient

If internet connection is working update pckage:
yum update

Install epel-release:
yum install epel-release

Install kernel-devel:
yum install kernel-devel

Install X Window system:
yum groupinstall "X Window system"

Install MATE Desktop:
yum groupinstall "MATE Desktop"

Now you can run MATE Desktop using:
systemctl isolate graphical.target

Set MATE Desktop Environment as deflaut GUI:
systemctl set-default graphical.target
rm '/etc/systemd/system/default.target'
ln -s '/usr/lib/systemd/system/graphical.target' '/etc/systemd/system/default.target'

If something goes wrong install Development Tools:
yum groupinstall "Development Tools"


Optional is install GNOME Disc Utility:
yum install gnome-disk-utility

Best of the best for using KVM over IP to remote administration.
MATE Desktop homepage:
https://mate-desktop.org/

środa, 4 lipca 2018

Problem with power off computer in Windows 10 - guide to fix it

Problem description:
When power off computer use log out and show start screen but can't power off computer.

Platform:
Windows 10 64-bit

Solutions:
In control panel in "Hardwear and Sound" (polish: Sprzęt i dźwięk) select "Change what the power buttons do" (polish: Zmień działanie przycisków zasilania) and click on: "Change settings that are currently unavailable" (polish: Zmień ustawienia, które są obecnie niedostępne). Uncheck all option. Problem was fixed.

How to build GDAL from source for Visual C++ in Visual Studio

The goal of the project:
Download, compile and add GDAL library for Visual C++ project in Visual Studio IDE.

What is a GDAL?
is a translator library for raster and vector geospatial data formats that is released under an X/MIT style Open Source license by the Open Source Geospatial Foundation. As a library, it presents a single raster abstract data model and single vector abstract data model to the calling application for all supported formats. It also comes with a variety of useful command line utilities for data translation and processing. The NEWS page describes the June 2018 GDAL/OGR 2.3.1 release.

Source: http://www.gdal.org

Step 1:

Visit in GDAL website (http://www.gdal.org) and go to section "Developer Oriented Documentation" after that enter "Building GDAL From Source".
Link: http://trac.osgeo.org/gdal/wiki/BuildHints













Step 2:

Download source package (I recomend lastest stable release).
For windows it is gdal.zip
example: gdal321.zip














Step 3:
Unzip it uzing 7ZIP, WinRAR or another tool for unzip file.














Step 4:
Run power shell (or command line [cmd.exe]):














Step 5:
Run generate_vcxproj.bat script in Power Shell with parametrs.
Instruction and description:
https://trac.osgeo.org/gdal/wiki/GeneratingVisualStudioProject













Step 6:
Run gdal_vsXXXX.vcxproj in visual studio
Where XXXX - version of visual studio
example: gdal_vs2015.vcxproj













Step 7:
Build project in visual studio
Use Build -> Build Solutions
or use CTRL + SHIFT + B














Sucessful compilation:













Step 8:
Create new Visual C++ project in Visual studio.















Select finish.
















Build project for test.
If use x64 processor set project to x64.














Stel 9:
Add GDAL library and other GDAL files to this project.
Select "properties" from project.













In VC++ Directories edit Include Directores:














Add directories:
C:\Users\zoz\Desktop\gdal-2.3.1
C:\Users\zoz\Desktop\gdal-2.3.1\gcore
C:\Users\zoz\Desktop\gdal-2.3.1\apps
C:\Users\zoz\Desktop\gdal-2.3.1\port
C:\Users\zoz\Desktop\gdal-2.3.1\ogr
"zoz" is username.














Add to Library Directories:
$C:\Users\zoz\Desktop\gdal-2.3.1
$C:\Users\zoz\Desktop\gdal-2.3.1\gcore
$C:\Users\zoz\Desktop\gdal-2.3.1\port
$C:\Users\zoz\Desktop\gdal-2.3.1\apps
$C:\Users\zoz\Desktop\gdal-2.3.1\ogr














Add in Linker -> Input -> Additional Dependencies
"C:\Users\zoz\Desktop\gdal-2.3.1\gdal_i.lib"
Click EDIT in this selection




























If add GDAL library is could successful build.
#include














Main site of project:
http://www.gdal.org
GDAL FAQ:
http://trac.osgeo.org/gdal/wiki/FAQ

Used softweare:
Windows 10 64-bit PRO
GDAL version: 2.3.1
Microsoft Visual Studio 2015 version 14.0.25431.01 Update 3
Microsoft .NET Framework 4.7.03056














Video on youtube:
https://youtu.be/Yf8rYOfvZjY