Mosh problem in CentOS 7

• linux • Comments

While setting up a new server, I encountered a problem with mosh. If you don’t know mosh, it’s an extension to SSH which (among other features) enables instant reconnections after an internet shortage. This is especially useful if you’re frequently connecting via mobile network and constantly lose your mobile Internet connection.

However, the problem I encountered was a simple one: Mosh didn’t work. Despite opening (and testing) the needed UDP ports in IPtables the server didn’t spawn properly. After a bit of debugging I found the error while running the mosh server in verbose mode:

[[email protected] ~]$ mosh-server new -v

MOSH CONNECT 60002 kEK45q7SdtGfP00Op+9Nmw

mosh-server (mosh 1.2.5) [build mosh 1.2.5]
Copyright 2012 Keith Winstein <[email protected]>
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

[mosh-server detached, pid = 17023]
[[email protected] ~]$ forkpty: Operation not permitted

The “forkpty: Operation not permitted” message is the problem indicator. I have yet to find why this happens, but the solution is simple. Just add the user on the server you want to use mosh with to the tty group, e.g. usermod:

usermod -aG tty my_mosh_user

Afterwards you should have no more issues moshing into the server.

Compile newer Python version on Ubuntu

• Linux, Python, and Ubuntu • Comments

Most of my “second use” platforms, like Test VMs or laptops I rarely use, are running on Ubuntu LTS versions. This enables me using those devices for a long duration without investing too much maintenanc time to keeping them up to date. The downside however is slightly aged software. In this special case, I needed Python >= 2.7.9 for its improved TLS handling, but Ubuntu 14.04 (Trusty Tahr) only delivers 2.7.6. I’d rather not upgrade the systems Python implementation, as it could possibly break some system scripts. So I wanted to have another Python installation beside my systems Python. Here’s how to do it.

  # 1. Install dependencies

  sudo apt-get install build-essential checkinstall \

    libreadline-gplv2-dev libncursesw5-dev libssl-dev \

    libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
  # 2. Get Python (you should probably check the MD5sum, but I ignore that step here)

  curl https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz | tar xzvf -
  # 3. ./configure as you like it

  cd Python-2.7.10 && ./configure --with-ensurepip=yes --enable-ipv6
  # 4. make an "install besides an install"

  sudo make altinstall
  # 5. If you compiled Python with pip, do an upgrade

  sudo /usr/local/bin/pip2.7 install --upgrade pip

This will place this new Python installation into the directory tree of /usr/local/.

Internal: Blog errors fixed

• blog • Comments

For the few readers who have subscribed to my blog via RSS: I’m deeply sorry if you got the last 10 posts of me delivered over and over again. The last days I was in the progress of fixing errors which were introduced when converting from Wordpress to Jekyll and resulted in over 9000!!! (Okay, only ~6000) 404 errors. It were mostly errors made by myself. Wrong substitutions, typos, wrong assumptions were only three of many. I now cleaned up everything I could find, so I really hope you won’t get annoyed anymore.

No errors!

You can’t imagine how satisfying this LinkChecker report feels to me. :-)

Linux: Select all files in a folder

• Linux • Comments

I wrote a very similar post nearly three years ago (in German) and still need this daily. As I’m currently writing a lot of Dockerfiles, I realised my post wasn’t completely accurate. Although I redacted it, it’s a good opportunity to port the original post to the english language.


Select all files in a directory, including hidden ones or files beginning with crude symbols. But exclude . and .. as those will most likely lead to an exit code > 0.

Lets assume we want to chown all files in the directory /var/www/html:

[email protected]:/var/www/html# ls -la
total 60
-rw-r--r--.  1 root     root         2 Nov 30 09:25 --test
-rw-r--r--.  1 root     root         2 Nov 30 09:25 -test
drwxr-xr-x.  5 www-data www-data  4096 Nov 30 09:25 .
drwxr-xr-x.  3 root     root      4096 Nov 20 08:35 ..
-rw-r--r--.  1 root     root         0 Nov 30 09:24 ..a
-rw-r--r--.  1 root     root         0 Nov 30 09:24 ..aa
-rw-r--r--.  1 root     root         0 Nov 30 09:24 ..aaa
-rw-r--r--.  1 root     root         0 Nov 30 09:24 .a
-rw-r--r--.  1 root     root         0 Nov 30 09:24 .aa
-rw-r--r--.  1 root     root         0 Nov 30 09:24 .aaa
-rw-rw-r--.  1 root     root      1509 Aug 23 13:57 .htaccess.dist
-rw-rw-r--.  1 root     root       306 Aug 23 13:57 README
-rw-rw-r--.  1 root     root        23 Aug 23 13:57 VERSION
drwxrwxr-x.  2 root     root      4096 Nov 30 09:23 conf
drwxrwxr-x. 12 root     root      4096 Aug 23 13:57 data
-rw-rw-r--.  1 root     root     19372 Aug 23 13:57 feed.php
drwxrwxr-x.  3 root     root      4096 Nov 30 09:22 lib

Notice how we got a lot of strange filenames here, including files beginning with dashes or double dots.

Ubuntu: Full Youtube HTML5 Player support for Firefox

• linux and firefox • Comments

Problem: Firefox on Ubuntu doesn’t support the whole spectrum of HTML5 features Youtube provides.

Youtube HTML5 unsupported Features


Switching the following about:config Settings to true: