Free cookie consent management tool by TermsFeed Policy Generator

/dev/blog/ID10T

Advertisement

Multi monitor wallpapers in Ubuntu

Linux, Ubuntu Comments

Using Linux as your main OS takes some time getting used to when you came from Windows. The way is also plastered with little obstacles and annoyances you can either decide to ignore or solve one after another. One of those small annoyances I recently solved after a couple of years of willful ignorance was an easy way for multi monitor wallpapers on Ubuntu.

I’m using two monitors with different resolutions. DVI-0 uses 1280x1024, DVI-1 uses 1920x1080. Until now, having a nice dual screen wallpaper on my Ubuntu wasn’t possible. It always looked ugly.

Dual monitor wallpaper before

Notice how much black bars I do have here despite the wallpaper having a resolution of 3510x2550, being larger than both of my screens together. The image scaling in Unity is just unsatisfying.

Installing Steam in Ubuntu

Linux, Ubuntu Comments

I had and still have some issues with Steam on Linux. I wanted to use my native system libraries instead of the ones Steam includes. This is a native feature for Steam. Just start Steam with STEAM_RUNTIME=0 set and you’re good to go. At least in theory. Sadly Steam uses a lot of 32-Bit libraries which are not installed on the average 64-Bit Ubuntu. I wrote a small script to solve this problem:

#!/bin/bash
set -x
set -e
set -o pipefail

cd ~/.local/share/Steam/ubuntu12_32/
for INSTALLME in $(LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" \
  ldd $(file *|sed '/ELF/!d;s/:.*//g')| grep 'not found'|sort| \
  uniq|sed 's/^[ \t]*\([a-z0-9.-]*\).*/\1/'|apt-file search -f -| \
  head -1|cut -d ' ' -f1)
do
  ALLINSTALL="${ALLINSTALL} ${INSTALLME}i386"
done
sudo apt-get update
sudo apt-get install ${ALLINSTALL}

Keep in mind that this script doesn’t always chose the best solution, so read the apt-get install message carefully. In my case some libraries were found in the i386 packages of Thunderbird and Firefox leading to an attempted uninstall of the x86_64 Bit versions. In this case you probably need to resolve the dependencies yourself. Additionally, my Steam installation depended on libudev.so.0 which isn’t available on Ubuntu 15.10 (and, as I read on the internet not on 14.04 either). You need to install this manually:

cd /tmp/ && wget http://mirrors.kernel.org/ubuntu/pool/main/u/udev/libudev0_175-0ubuntu9_i386.deb \
&& sudo dpkg -i libudev0_175-0ubuntu9_i386.deb && rm libudev0_175-0ubuntu9_i386.deb

Afterwards I was able to start Steam with STEAM_RUNTIME set to 0. Next stop: Dual monitor problems in several games.

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:

[m3adow@batman ~]$ mosh-server new -v

MOSH CONNECT 60002 kEK45q7SdtGfP00Op+9Nmw

mosh-server (mosh 1.2.5) [build mosh 1.2.5]
Copyright 2012 Keith Winstein <mosh-devel@mit.edu>
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]
[m3adow@batman ~]$ 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, 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. :-)

Advertisement