Fedora Development Problems

ar - create, modify, and extract from archives
ranlib - generate index to archive
nm - list symbols from object files

$ ar -r libmine.a mine.o yours.o
$ ranlib libmine.a
or
$ ar -s -r libmine.a mine.o yours.o

32-bit/64-bit Problem

ranlib /home/andreas/src/software/lib/libCompany.xa
g++ -L/home/andreas/src/software/lib -m32 -lpthread -lrt  -ldl -shared -o /home/andreas/src/software/lib/libCompany.so -Wl,-whole-archive /home/andreas/src/software/lib/libCompany.xa -Wl,-no-whole-archive
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib64/libpthread.so when searching for -lpthread
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: skipping incompatible /usr/lib64/librt.so when searching for -lrt
/usr/bin/ld: cannot find -lrt
/usr/bin/ld: skipping incompatible /usr/lib64/libdl.so when searching for -ldl
/usr/bin/ld: cannot find -ldl
/usr/bin/ld: skipping incompatible /usr/lib64/libm.so when searching for -lm
/usr/bin/ld: cannot find -lm
/usr/bin/ld: skipping incompatible /usr/lib64/libc.so when searching for -lc
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [/home/andreas/src/software/lib/libCompany.so] Error 1
make: *** [/home/andreas/src/software/common/ipc] Error 2
-Wl,option
Pass option as an option to the linker. If option contains commas,
it is split into multiple options at the commas. You can use thi
syntax to pass an argument to the option.
For example, -Wl,-Map,output.map passes -Map output.map to the linker.
When using the GNU linker, you can also get the same effect
with `-Wl,-Map=output.map'.

--whole-archive
For each archive mentioned on the command line after the
`--whole-archive' option, include every object file in the archive
in the link, rather than searching the archive for the required
object files. This is normally used to turn an archive file into
a shared library, forcing every object to be included in the
resulting shared library. This option may be used more than once.
ranlib /home/andreas/src/software/lib/libCompany.xa
g++ -L/home/andreas/src/software/lib -L/home/andreas/src/software/lib -m32 -lpthread -lrt  -ldl -shared -o /home/andreas/src/software/lib/libCompany.so -Wl,-whole-archive /home/andreas/src/software/lib/libCompany.xa -Wl,-no-whole-archive
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(Ipc.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcEndpoint.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcSock.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcBaseTransport.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcFifoTransport.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcMsgQTransport.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcUdpTransport.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcRelUdpTransport.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcTcpTransport.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcTransportInfo.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcStatus.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcTimer.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcMonotonicTime.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcHeader.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcLog.xo)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/andreas/src/software/lib/libCompany.xa(IpcGuard.xo)' is incompatible with i386 output

Android Development

  • LogCat
  • android-ndk
  • NDK
  • AVD
  • Dalvik VM
  • arm-linux-androideabi-addr2line

Building Your First App

KVM

$ sudo apt-get install cpu-checker
[...]
The following NEW packages will be installed:
  cpu-checker msr-tools
[...]

$ sudo /usr/sbin/kvm-ok
INFO: /dev/kvm does not exist
HINT:   sudo modprobe kvm_intel
INFO: Your CPU supports KVM extensions
INFO: KVM (vmx) is disabled by your BIOS
HINT: Enter your BIOS setup and enable Virtualization Technology (VT),
      and then hard poweroff/poweron your system
KVM acceleration can NOT be used

=== BIOS: Enable Virtualization Technology (VT) ===

$ sudo /usr/sbin/kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

KVM, Kernel-based Virtual Machine
kvm
KVM – Introduction

/dev/kvm is not found on Ubuntu 14.04
KVM is not installed on this machine (/dev/kvm is missing)

Training

Developers Training – Getting Started
Android Graphics
Android UI Internal : UI Composition with SurfaceFlinger

Crash Report

How to use addr2line in Android
How to get Crash Point in Java code

Install

Build and Run Your App
Android Debug Bridge (adb)
Apk location in New Android Studio

C:\msys64\home\bachman0\BA18_loma_3_Android_Application\app\build\outputs\apk\debug
C:\Users\bachman0\AppData\Local\Android\Sdk\platform-tools

/c/msys64/home/bachman0/BA18_loma_3_Android_Application/app/build/outputs/apk/debug
/c/Users/bachman0/AppData/Local/Android/Sdk/platform-tools

How to install apps outside of Google Play
How to Install APK Files on Android
How to install APK from PC?

Windows Group Policy

https://support.microsoft.com/de-ch/kb/182569
https://social.technet.microsoft.com/forums/windowsserver/en-US/cd9e1fc2-e209-49f4-ae4a-78222969c6b2/some-settings-are-managed-by-your-system-Administrator
http://www.askvg.com/how-to-change-windows-update-settings-when-managed-or-disabled-by-system-administrator/

http://blogs.technet.com/b/chenley/archive/2011/03/10/how-to-turn-off-ie-esc.aspx
https://community.hpcloud.com/article/how-disable-internet-explorer-enhanced-security-configuration-your-windows-instance
https://4sysops.com/archives/four-ways-to-disable-internet-explorer-enhanced-security-configuration-ie-esc/

xrdp in Fedora 20

Install

$ yum install xrdp
$ systemctl enable xrdp.service
$ systemctl start xrdp.service
$ systemctl enable xrdp-sesman.service
$ systemctl start xrdp-sesman.service

Firewall

Enable remote desktop on fedora 20 kde

$ netstat -4anp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name      
tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      9266/xrdp-sesman
tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      9265/xrdp

$ firewall-cmd --zone=public --add-port=3389/tcp --permanent
$ firewall-cmd --zone=public --add-port=3350/tcp --permanent

xfce

Fedora, xrdp, and xfce

$ vi /etc/sysconfig/desktop
PREFERRED=startxfce4

False positive?
How to configure XRDP to start cinnamon as default desktop session

xrdp_mm_process_login_response: login failed

Start xrdp in shell

$ /usr/sbin/xrdp --nodaemon
local keymap file for 0x0807 found and dosen't match built in keymap, using local keymap file

$ /usr/sbin/xrdp-sesman --nodaemon
[20150811-17:09:02] [CORE ] starting sesman with pid 9266
[20150811-17:09:02] [INFO ] listening...
[20150811-17:10:53] [INFO ] scp thread on sck 7 started successfully
pam_authenticate failed: Authentication failure

$ cp /home/andreas/Downloads/km-0807.ini /etc/xrdp

Restart both!

[20150811-17:23:10] [INFO ] listening...
[20150811-17:23:22] [INFO ] scp thread on sck 7 started successfully
[20150811-17:23:22] [INFO ] ++ created session (access granted): username andreas, ip 172.21.5.106:58875 - socket: 7
[20150811-17:23:22] [INFO ] starting Xvnc session...

$ /usr/sbin/xrdp --nodaemon

$ /usr/sbin/xrdp-sesman --nodaemon
Xvnc TigerVNC 1.3.0 - built Mar 19 2014 17:10:53
Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11404000, The X.Org Foundation

Could also be possible:
xrdp_mm_process_login_response: login failed

False positive?
xrdp in fedora 20 not working properly with active directory users

Exchangeable Image File Format (EXIF)

Exchangeable Image File Format
Geotagging (Fotografie)
Grund­la­gen-​Ar­ti­kel: Geo­tag­ging und Geo-​Ima­ging
Google Maps: So nutzen Sie direkt GPS-Koordinaten
Description of Exif file format

Comparison of metadata editors

Blogs

How to add GPS (geolocation) tags to photos
How To Read & Write GPS
How To Add Or Edit GPS With ExifTool
What is a good Java library to write GPS metadata on JPEGs (in EXIF)?
ImageIO – get image type and exif data
Android write EXIF GPS Latitude and Longitude onto JPEG failed
How to save GPS coordinates in exif data on Android?
Reading EXIF data from an Image

Metadata Extractor

metadata-extractor
github: metadata-extractor

GpsPrune

GpsPrune

JHead

JHead – Exif Jpeg header manipulation tool

JHeader

JHeader Java EXIF/JFIF Header Library

MAT

MAT: Metadata Anonymisation Toolkit

ExifTool

Wikipedia: ExifTool
ExifTool by Phil Harvey
ExifTool FAQ
EXIF Tags
GPS Tags

$ ./exiftool.exe \
-GPSAltitude=0 -GPSAltitudeRef="-" \
-GPSLatitude="51.515744" -GPSLatitudeRef=N \
-GPSLongitude="0.188979" -GPSLongitudeRef=W \
-GPSProcessingMethod="NETWORK" \
-GPSDateStamp="2015:07:27" -GPSTimeStamp="07:52:14" \
IMG_1234.jpg

ExifToolGUI

Latest ExiftoolGUI version 5.16
ExifToolGUI for Windows v5.xx

Exiv2

Example 2: addmoddel.cpp
Exiv2 utility sample output
How correctly write GPS data

XnView

XnView

TigerVNC with CentOS

VNC (Virtual Network Computing)
How to install VNC server on CentOS 6

# yum install vnc-server
or
# yum install tigervnc-server
$ su -
# useradd larry
# useradd moe
# useradd curly
# passwd larry
# passwd moe
# passwd curly
VNCSERVERS="1:larry 2:moe 3:curly"
VNCSERVERARGS[1]="-geometry 640x480"
VNCSERVERARGS[2]="-geometry 640x480"
VNCSERVERARGS[3]="-geometry 800x600"

Recovery from a logout (Not implemented for CentOS 6)

If you logout of your desktop manager, it is gone!

$ ps aux | grep andreas
andreas    446  0.0  0.0  20040   636 ?        S    May06   0:00 dbus-launch --sh-syntax --exit-with-session
andreas    447  0.0  0.0  36544  1684 ?        Ssl  May06   0:07 /bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
andreas    560  0.0  0.2 581832 84144 ?        Ssl  May06  10:20 /usr/libexec/gnome-settings-daemon
andreas    564  0.0  0.0 293540  7976 ?        Ss   May06   0:00 seahorse-daemon
andreas    568  0.0  0.0 137216  2072 ?        S    May06   0:00 /usr/libexec/gvfsd
andreas    595  0.0  0.0 255504  6740 ?        S    May06   0:00 /usr/libexec/gdu-notification-daemon
andreas    597  0.0  0.0 485748 11608 ?        Sl   May06   0:15 gpk-update-icon
andreas    599  0.0  0.0 363212  3760 ?        Ssl  May06   0:00 /usr/bin/pulseaudio --start --log-target=syslog
andreas    601  0.0  0.0 235732  5344 ?        S    May06   0:02 abrt-applet
andreas    605  0.0  0.0 364236  7724 ?        S    May06   0:10 /usr/libexec/evolution/2.32/evolution-alarm-notify
andreas    608  0.0  0.0 276476  8148 ?        S    May06   0:03 bluetooth-applet
andreas    617  0.0  0.0 470144 11232 ?        S    May06   0:00 gnome-volume-control-applet
andreas    619  0.0  0.0 146232  3124 ?        S    May06   0:00 /usr/libexec/gvfs-gdu-volume-monitor
andreas    620  0.0  0.0  30164  5216 ?        S    May06   0:00 /usr/sbin/restorecond -u
andreas    622  0.0  0.0 299516 11792 ?        Sl   May06   0:11 /usr/libexec/polkit-gnome-authentication-agent-1
andreas    629  0.0  0.0 324324 19408 ?        S    May06   0:01 python /usr/share/system-config-printer/applet.py
andreas    636  0.0  0.0 115100  3964 ?        S    May06   0:00 /usr/libexec/im-settings-daemon
andreas    648  0.0  0.0 148232  3152 ?        S    May06   0:00 /usr/libexec/gvfsd-trash --spawner :1.8 /org/gtk/gvfs/exec_spaw/0
andreas    687  0.0  0.0 264788  6504 ?        Ss   May06   1:57 gnome-screensaver
andreas    707  0.0  0.0 232444  2064 ?        Sl   May06   4:20 /usr/libexec/gvfs-afc-volume-monitor
andreas    711  0.0  0.0 150896  2192 ?        S    May06   0:00 /usr/libexec/gvfs-gphoto2-volume-monitor
andreas    807  0.0  0.0  95228  2628 ?        S    May06   0:00 /usr/libexec/pulse/gconf-helper
andreas    822  0.0  0.0  40900  2252 ?        S    May06   0:00 /usr/libexec/gconf-im-settings-daemon
andreas    839  0.0  0.0 135096  1800 ?        S    May06   0:00 /usr/libexec/gvfsd-metadata
andreas    841  0.0  0.0 141484  2336 ?        S    May06   0:00 /usr/libexec/gvfsd-burn --spawner :1.8 /org/gtk/gvfs/exec_spaw/1
andreas  16254  0.2  0.0 633208 24604 ?        Sl   17:30   0:04 nautilus
andreas  16260  0.0  0.0 451640 13056 ?        Sl   17:30   0:00 metacity
root     16426  0.8  0.0 102460  4316 ?        Ss   17:56   0:00 sshd: andreas [priv]
andreas  16430  0.1  0.0 102460  2000 ?        S    17:56   0:00 sshd: andreas@pts/8
andreas  16431  0.2  0.0 108340  1796 pts/8    Ss   17:56   0:00 -bash
andreas  16461  0.0  0.0 110240  1160 pts/8    R+   17:56   0:00 ps aux
andreas  16462  0.0  0.0 103256   852 pts/8    S+   17:56   0:00 grep andreas
andreas  51516  0.0  0.0 133476  5540 ?        S    Jul22   0:14 /usr/libexec/gconfd-2
andreas  65244  0.0  0.1 126628 50508 ?        S    May06   1:17 /usr/bin/Xvnc :21 -desktop srv-fpga:21 (andreas) -auth /home/andreas/.Xauthority -geometry 1280x1024 -rfbwait 30000 -rfbauth /home/andreas/.vnc/passwd -rfbport 5921 -fp catalogue:/etc/X11/fontpath.d -pn
#!/usr/bin/env bash

if [ -z "${USER}" ]; then
    echo "no environment variable USER set"
    exit -1
fi

PID=

pid() {
    PID=$(ps aux | grep ${USER} | grep Xvnc | grep -v grep | awk '{print $2}')
}

start() {
    echo "==> Start vncserver"
    DISPLAY=$(cat /etc/sysconfig/vncservers | grep ${USER} | awk -v display="[0-9]+" -v user=":${USER}" '{ if (match($0, display user)) { print substr($0, RSTART, RLENGTH - length(user)); } }')
    ARGS=$(cat /etc/sysconfig/vncservers | grep "VNCSERVERARGS\[${DISPLAY}\]" | cut -d '"' -f2)
    echo "    display=${DISPLAY}"
    echo "    arguments=${ARGS}"
    vncserver :${DISPLAY} ${ARGS}
}

stop() {
    echo "==> Stop vncserver"
    kill ${PID}
}

pid

case "$1" in
    start)
        if [ -n "${PID}" ]; then
            echo "vncserver (pid=${PID}) is already running"
            exit -2
        fi
        start
        ;;
        
    stop)
        if [ -z "${PID}" ]; then
            echo "vncserver is not running"
            exit -3
        fi
        stop
        ;;
        
    restart)
        if [ -n "${PID}" ]; then
            echo "vncserver (pid=${PID}) is running. Stopping"
            stop
            sleep 3
        else
            echo "vncserver is already stopped"
        fi
        start
        ;;
        
    status)
        if [ -n "${PID}" ]; then
            echo "vncserver (pid=${PID}) is running"
        else
            echo "vncserver is stopped"
        fi
        ;;
        
    *)
        echo "$0 (start|stop|restart|status)"
        ;;
        
esac

Apple Swift 2.0

Swift. Eine neue Sprache, mit der jeder fantastische Apps entwickeln kann.
Swift. A modern programming language that is safe, fast, and interactive.
Swift 5 Released!

Qt Language Bindings (Swift _NOT_ included!)

Swift: Die Rückkehr der Referenz-Zähler
Über Premature Optimization
Why Premature Optimization Is the Root of All Evil
SWIFT – DIE EINE PROGRAMMIERSPRACHE FÜR „ALLES“ ?! – TEIL1
Can I use swift code to create a Desktop Linux App?
Swift Development with Visual Studio Code — On Linux!
Swift unter Ubuntu Linux verwenden

github.com/msorvig/qt-and-swift, Qt and Swift interop research
github.com/Longhanks/qlift, Swift library to use Qt
github.com/Longhanks/swiftmine, Example using Qlift to consume Qt APIs from Swift
github.com/TomasLinhart/SwiftGtk, SwiftGtk is an experimental Gtk+ binding for Swift that tries to make usage of Gtk+ pleasant and “Swifty” as much as possible.