Android round three

so the phone decided to erase and reinstall itself after it could not decrypt its flash storage.
While awesome from a security point if view I would really have liked to know what exactly caused this.

but then again, the amount of tinkering possible with this phone (Android 5.0.2 + cyanogenmod) is stunning and keeps amazing me.

conclusion: Not suitable for business (immature/confusing) but wonderful and confusing and time-consuming (just like every Linux distribution ever)

Android round two

I got myself a onePlus one Android Phablet and while totally in love I must say I will go back to iPhone because:
– Ads. Seriously.. I HATE ads. I will pay you to make ads disappear
– CalDAV/CardDAV support by Apple since iOS 7
– integration of owncloud now, too
– bugs, irregularities, crashes.
– lack of integration of apps into the system

so the only thing left is the tinkering – which is lovely. Cyanogenmod is wonderful!

but I want to get things done and not be busy all day adjusting and tweaking and it’s been three weeks now and I am still not at a level where I can say “this is good”

raspberry pi ftp server (vsftpd)

assuming raspbian
– apt-get install vsftpd
By default vsftpd is configured for anonymous access with read-only permissions. We’re going to change things so that it requires you to authenticate with a local user. Let’s open the configuration file.

sudo nano /etc/vsftpd.conf

We want to change or uncomment the following values.


After that restart the vsftpd service. Now we need to create a couple folders in your local user’s home folder. The ftp folder will be the root when you connect. The way vsftpd works, the root is not allowed to have write permissions on it, so we’ll create a sub-folder inside the root called files which our local user will be allowed to write to. This is where you’d upload/download files from with an FTP client.

mkdir /home/andreas/ftp
mkdir /home/andreas/ftp/files
chmod a-w /home/andreas/ftp

Now you should be able to connect to your from any FTP client and start uploading/downloading files.

centOS 7 install log

after my last server install I realized a lot of things were improvised and broken, also there were no new binaries for owncloud on Ubuntu 12.02 and no disk encryption and no systemd and so on and as I want to learn something I wanted to match it with my new love for Fedora so it became a Centos7 server.

basic vmware install using vSphere I found the first bug: using full disk encryption I cannot boot anymore

reason is a known bug

At the GRUB boot menu, press e to edit the boot config and remove rhgb.
then disable it permanently by removing rhgb in /etc/default/grub and execute grub2-mkconfig -o /boot/grub2/grub.cfg to update your boot grub.cfg.

next thing was I could not enter the passphrase using the vSphere console as characters were autorepeated.

Solution via VMware

  1. Power off the virtual machine.
  2. Add a line, similar to this, at the end of your virtual machine’s configuration (.vmx) file:
    keyboard.typematicMinDelay = “2000000”
    The delay is specified in micro-seconds, so the line in the example above increases the repeat time to 2 seconds. This should ensure that you never get auto-repeat unless you intend it.
  3. Power on the virtual machine.

that out of the way I could boot up CentOS and update it and install vmware tools

yum install net-tools perl
mount /dev/cdrom /mnt/cdrom
cd /tmp
tar zxf /mnt/cdrom/VMwareTools-5.0.0-<xxxx>.tar.gz
umount /dev/cdrom
cd vmware-tools-distrib

Now, let’s get started.
First get EPEL started (Extra Packages for Enterprise Linux)
yum install epel-release

enable UTF-8 support
edit /etc/environment and add this:

also use ‘localectl’ to show and set a different locale
like this:
localectl set-locale LANG=en_US.utf8

colorize bash:
add this to .bash_profile
export LS_OPTS='--color=auto'
export GREP_OPTIONS='--color=auto'
export TERM=xterm-color
#export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
export CLICOLOR=1

install Mosh
yum install mosh htop
then allow UDP for ports 60001-60010
sudo iptables -I INPUT 1 -p udp --dport 60001:60010 -j ACCEPT
so in systemd this will be:
– create /etc/firewalld/services/mosh.xml
< ?xml version="1.0" encoding="utf-8"?>
<description>Mosh ( is a free replacement for SSH that allows roaming and supports intermittent connectivity.</description>
<port protocol="udp" port="60001"></port>
<port protocol="udp" port="60002"></port>
<port protocol="udp" port="60003"></port>
<port protocol="udp" port="60004"></port>
<port protocol="udp" port="60005"></port>
<port protocol="udp" port="60006"></port>
<port protocol="udp" port="60007"></port>
<port protocol="udp" port="60008"></port>
<port protocol="udp" port="60009"></port>

– firewall-cmd –add-service=mosh –permanent
– firewall-cmd –reload
Note: In Fedora21+ this is already present (the xml file for mosh)
this will open 10 ports but that should be more than enough for me.
and start mosh as a server using “mosh-server” – defaults should work fine!
I am not even sure this is needed.. as long as mosh is installed on the server it should connect via SSH and start mosh and hand over the connection!

yum install htop

yum install fail2ban
then make a copy of /etc/fail2ban/jail.conf and save it as jail.local
there set at least this:
enabled = true

enable and start service
systemctl enable fail2ban
systemctl start fail2ban

check journalctl for selinux related issues but this should be fixed now
journalctl -lfu fail2ban

install basic developer tools (build-essentials)
yum groupinstall 'Development Tools'

iPhone under Linux

inspired by this site:

yum -y install kernel-headers
yum -y install kernel-devel
yum groupinstall “Development Tools”
yum groupinstall “Development Libraries”

yum install gcc rhythmbox libgpod ifuse gvfs-afc libtool libusb libusb-devel libplist

yum install libimobiledevice

Now reboot without iDevice connected!

it should now be a massive USB device
Shotwell should see the pictures
Rhythmbox should sync and manage music

raspberry pi magic

Raspberry Pi is magic!

So far it does:
– MPD server (using my media center as SMB share) connected to my speakers (the audio is not that great)
– DNS resolver (
– home automation server (using fhem)
– Airport style music receiver (shairport)
DLNA renderer (for plex?)
– I even used it as a status screen but I didn’t like the giant screen in my home –

but I want more!
Continue reading