# Ich glotz TV

Well, actually I've essentially stopped watching linear TV about 20 years ago. My Loewe CRT TV set I'd bought in 1994 didn't take kindly to that and twice suffered from dried-up electrolyte capacitors. “You have to switch on the TV at least sometimes”, said the electronics guy who repaired the set. When it happened the third time, I didn't bother anymore, but lived without dedicated TV set for the next 5 years. My first flat-screen TV purchased in 2010 suffered the same fate when it all of a sudden developed dead pixel rows, resulting in a rapidly increasing number of black lines across the display.

It was not until 2018 when I finally gave in and bought a new TV set with the explicit purpose to enjoy the FIFA World Cup held this year. You all know that from a German perspective, this word cup was as much of a disaster as the following one in 2022. Regardless, the 65" QLED panel with three-sided ambilight is perfect for enjoying the occasional movie from my NAS or Amazon Prime Video.

This panel creates a high level of immersion due to its sheer size and the light surrounding it, providing a near cinematic experience for movies in FullHD and 4K resolution. For anything else the immersion may be a bit overwhelming, particularly if one is not willing to fully focus on the action displayed. For me, that's often the case when watching a football match, or a documentary on publicly broadcasted TV, and I would prefer to be able to watch the TV channel on my notebook with one eye while doing other stuff in the background.

Instead of a flull-fledged IPTV application such as hypnotix, I thought that a simple script may be more suitable to my needs. The script I've found on archlinux.de was basically just what I needed. I've merely integrated the download of the current URLs (done by a python script by Axel-Erfurt I've reproduced below), cleaned up a bit, and formatted it for zenity. I've also excluded some redundant channels to keep the list from cluttering.

#!/bin/bash

# Original livetv script by tuxnix and Mis,
# see https://wiki.archlinux.de/title/Live-Tv <https://wiki.archlinux.de/title/Live-Tv>_
# liveiptvstations.py by Axel-Erfurt,
# see https://gist.github.com/Axel-Erfurt/5106f9bbef1fca1d63bb74a849607128 <https://gist.github.com/Axel-Erfurt/5106f9bbef1fca1d63bb74a849607128>_
# Also see https://wiki.ubuntuusers.de/Internet-TV/Stationen/ <https://wiki.ubuntuusers.de/Internet-TV/Stationen/>_

script_path="$(dirname "$0")"
script_name="$(basename "$0")"

# Pull down a current list of IPTV channels
liveiptvstations.py > channellist.txt

# Basic formatting
sed -i -e 'N;s/:\n/ /' -e 's/^/FALSE /' channellist.txt
sed -i -e "s/ARD Alpha/ARD.alpha/" -e "s/ARD ONE/ARD.one/" -e "s/MDR Sachsen/MDR/" -e "s/BR Süd/BR/" -e "s/NDR Hamburg/NDR/" -e "s/RBB Berlin/RBB/" -e "s/SWR BW/SWR/" -e "s/WDR (Deutschland)/WDR/" channellist.txt

# Remove some redundant channels (optional, but beware they need formatting if included)
sed -i -e "/Tagesschau/d" -e "/ARTE.FR/d" -e "/ORF/d" -e "/Brandenburg/d" -e "/Anhalt/d" -e "/Thüringen/d" -e "/Mecklenburg-Vorpommern/d" -e "/Niedersachsen/d" -e "/Schleswig-Holstein/d" -e "/Lokalzeit/d" -e "/weltweit/d" -e "/BR Nord/d" -e "/SWR RP/d" channellist.txt

#create oneliner for zenity
channel_list=$(paste -s -d ' ' channellist.txt) stream_url=$(zenity --list  --text "Live IPTV channels" --radiolist  --column "" --column "Channel" --column "URL" --print-column=3 $channel_list) if(($? == 0)); then
mpv "${stream_url}" exec "${script_path}/\${script_name}"
else
echo "Leaving LiveTV"
fi

#!/usr/bin/python
# -*- coding: utf-8 -*-
import requests
import json

# see https://gist.github.com/Axel-Erfurt/5106f9bbef1fca1d63bb74a849607128

url = "https://raw.githubusercontent.com/mediathekview/MServer/master/dist/live-streams.json"

data = requests.get(url).text

def parse_object_pairs(pairs):
return pairs

decoder = json.JSONDecoder(object_pairs_hook=parse_object_pairs)
obj = decoder.decode(data)

for value in obj[2:]:
print(f'{value[1][2].replace(" Livestream", "")}:\n{value[1][8]}')


# MSTwo

We are in the middle of a scientific discussion, and out of nowhere, a reference to an old and well-known operating system popped up. Our benjamin chimes in, grinning: “MSTwo!”

“MSwhat?” It took a second or two, and then it clicked. She's spanish, you know: “uno, DOS, tres, cuatro,...” And young enough to have never seen MSDOS herself.

Which makes me a relic because I've not only seen it but prepared my master thesis with it. 😑

# latexdiff-vc

Since my first post on version control systems (VCS) and latexdiff, the whole kaboodle has become much easier for the user. Instead of looking for some python scripts to ease the generation of diffs, latexdiff itself offers this functionality. For example,

latexdiff-vc --hg --pdf -r 0 example.tex

will create a diff between the original(-r 0) and current version of example.tex handled by mercurial (--hg), and compile the resulting diff by pdflatex (--pdf).

Even better, latexdiff supports multi-file documents, the use of which is highly advisable for dissertations and books or other long documents. The workflow is simple: as usual, we create the repository and add files to it, but this time all files have to be included:

hg init
hg add master.tex file1.tex ... filei.tex ... filen.tex
hg commit -m "Initial version"

And after editing an arbitrary file:

hg commit -m "Did this or that"
latexdiff-vc --hg --pdf --flatten -r 0 master.tex

Voilà, here's your compiled diff. 😎

As a sidenote: I have seen way too many students trying to compile the active chapter of their dissertation, just to realize that only the master file including their active chapter can be compiled. Hence, they classical sequence: compile – oops, switch tabs, compile, switch tabs, edit, compile – oops, etc. etc. ad nauseum. Except for masochistically inclined witers, there's a simpler and better way.

Indeed, many specialized LaTeX editors (TeXWorks, TeXStudio) and also several of the most prominent general programming editors with a LaTeX extension (Sublime Text with LaTeX Tools, VS Code with LaTeX Workshop, Vim with Vimtex ...) respect the following magic command at the top of the active chapter:

% !TeX root = master.tex

Only Emacs with auctex needs a slightly different syntax:

% -*- TeX-master: "master.tex" -*-

After setting this command, you can just type and compile, and your focus will not be distracted any longer by the compilation cycle sketched above.

# Units

As a physicist, it is very useful to be able to perform calculations quickly, whether it is by pure mental arithmetic or on the back of an envelope. I'm immensely grateful for the training I've received in school that allows me to perform such calculations with relative ease. When I see my students struggling with even the most trivial of these calculations and having to rely on their smartphones to get a result, I get the impression that the education system is dismissing these skills as obsolete in our digital age. A big mistake, if you ask me.

Don't get me wrong: when I need accurate results, I also resort to calculators or calculator apps on Android or Arch. And as an added benefit, some of them handle not only numbers, but also the units. This is really helpful, because converting numerical results from all sorts of obscure units to SI is often necessary when consulting older references, and it's as tedious as it is frustrating - just look at the Wikipedia page of the cgs system.

Apart from Mathematica, I know of three command-line programs (one of which, namely, qalc, is also available with a graphical user interface) for doing calculations with units: the veteran units, the modern qalc, and the new and hip insect. Here's an example of these three tools dealing with the conversion of the surface tension (in N/m) of water to surface energy (in eV/Å²), which for a liquid is one and the same despite the different units.

# Uptime

This blog runs on a very affordable vServer hosted by netcup. For such low-end servers, no uptime guarantees are given by any hoster. Nevertheless, I always get mails whenever the server is down either for maintenance or because its temporarily out of order, and my feeling is that this happens only rarely. But just out of curiosity, I'd like to know what the actual uptime is.

A two page article in c't 26/2021 introduced me to uptime-kuma, which seemed to fit nicely what I was looking for. The only part I didn't like was the statement “Der einfachste und schnellste Weg Uptime-Kuma zu installieren, führt über Docker und Docker-Compose” followed by an installation procedure that I would call anything else then simple and fast. Fortunately, this statement applies only to the distributions favored by the c't. On Arch, the following two commands install and start uptime-kuma as a service:

yay -S uptime-kuma
systemctl enable --now uptime-kuma.service

After configuring the services to monitor and a day of collecting data, their uptime status is displayed on https://localhost/3001 as shown below for the web and IRC servers on pdes-net.org:

# 20th anniversary

I've missed it by a few days, but nevertheless: the first version of Archlinux (Homer) was published 20 years ago. The German computer magazine iX published a well-deserved tribute.

It took some time for me to discover this unique Linux distribution, but when I did in 2009 (a shocking 13 years ago), I was sold. Since more than 8 years, Arch runs all my desktops and notebooks, and only servers are still powered by Debian.

To the next 20 years! And in any case: happy anniversary, happy anniversary, happy anniversary, HAPPY anniversary!

# Too many meetings

The number of meetings I'm requested to attend has increased by roughly a factor of five over the last two decades. Instead of five meetings per week I'm currently having five per day on average. It thus doesn't come as a surprise that I depend on an electronic calendar to organize and get reminded of all these appointments.

On my desktops, I'm using the integrated calendar of evolution since seven years. Over the time, this implementation of a PIM for the Gnome desktop has proven itself to be reliable and stable, in contrast to Kontact, its KDE counterpart I've tried to use before.

In any case, having a calendar on my desktops is not sufficient anymore, as future appointments are typically arranged after Zoom meetings that I usually attend with my notebook. And even that is not enough: I may want to check my appointments on a whim in the middle of the night, where only my smartphone is immediately accessible. In either case, I do not need a full-blown PIM, but just a calendar client synchronizing with both owncloud/nextcloud and zimbra.

On Linux/GTK, I thought that gnome-calendar would be the natural candidate with this functionality. To my surprise it's straightforward to add an owncloud/nextcloud account with the associated calendar, but zimbra is not part of the online account collection of Gnome, nor is a generic CalDAV server. I found that almost impossible to believe, but it's in fact a longstanding bug (eight years!) that has still to be acknowledged and addressed by the developers. Fortunately, there's a simple workaround: after installing evolution and adding the zimbra CalDAV server there, it also shows up in gnome-calendar. Apart from this issue, gnome-calendar delivers exactly what I wanted.

This entire affair is a whole lot easier on Android. Davx5 available on F-Droid provides a convenient backend for any number of CalDAV servers, and any calendar app will serve as frontend. It works just as well as gnome-calendar on my notebook, but without any unexpected obstacles during the configuration of the calendars.

I'm now reminded of outstanding appointments wherever I walk and talk. That's progess! Or is it?

Python major version upgrades such as the one from 3.9 to 3.10 a few weeks ago require rebuilding any virtual environments created earlier. The generic one-liner I gave in an earlier post works in all shells, but as an avid user of the fish shell, I'm of course employing virtualfish for managing my virtual environments. And upgrading them in fish is even easier than with the one-liner above:

vf upgrade --rebuild

Prior to that, one also needs to rebuild the virtualfish for the python version upgrade:

yay --rebuild -S virtualfish

Afterwards, one can see to the update of the content of the virtualenv as documented in my earlier post. Compared to the entire recreation of the virtualenv, this whole procedure is as painless as fast – which makes the whole concept of virtualenvs an eminently practical one.

# Android file transfer

My home and office computers are synchronized via the ownCloud server located at my workplace. This synchronization takes place via an TLS encrypted connection with an A+ Qualys rating. In addition, I encrypt files containing sensitive information prior to their transfer on an individual basis. Since all systems accessing this cloud folder are driven by an operating system (OS) that I trust and largely control (Archlinux), I feel very comfortable regarding the security and privacy of my data. To keep this warm and cozy feeling, I wouldn't give devices with an OS beyond my control (such as Windows, MacOS, Android, iOS) access to this folder.

Now, I fully appreciate that even a hardened desktop Linux would have difficulties to compete with the level of security offered by an up-to-date Android – with “security” being defined here in the conventional context with respect to a potential third-party adversary. But concerning the privacy of my data, and thus mine, the threat of an overly nosy first party is much more palpable. Actually, I shouldn't call it a threat. It's in fact a promise.

How, then, am I supposed to transfer or even better synchronize data from and with the newest member of my gadget zoo? Since I've acquired this gadget as a two-factor authentication for my banks, I cannot simply root it and install LineageOS without any Google services. Therefore, I won't trust the device beyond its specialized purpose and I won't give it access to my cloud folder.

But that's actually not a big deal in this case. Because of its specific function as a two-factor authenticator for my banks and several other services, the phone will remain stationary. Hence, I need to synchronize within my LAN, but not outside of it. When looking for apps that would be suitable for this task, I was initially attracted by those appealing to the nerd in me, such as, for example, croc installed (pkg install croc) and running within termux, or juiceSSH. In the end, these apps turned out to be fun for a limited time, but too tedious for everyday use. I'm very fond of controlling computers with a keyboard, but for using termux efficiently, you'd need the eyes of an eagle, the fingers of an elf and the dexterity of a spider monkey.

For ordinary human beings, syncthing is the tool of choice. It's available on f-droid, easy to set up on all participating systems, and works reliably without manual intervention. In my case, I've simply created a folder (~/androidshare) on my desktop that automatically receives all files from my phone that may be worth to keep, including the backups of the andOTP and keepassDX databases and all photographs of my cats. 😍

# Maxi

I've retired my veteran netbook Mini after 10 years of service and 7 generations of Debian in 2018. The SSD was becoming corrupted, and in view of its low performance and advanced age, I decided that it wouldn't be worth the time and money needed to replace it.

In the meantime, I've been using the Fujitsu Lifebook I acquired in 2011. As a matter of fact, I gradually used this low-end notebook in favor of my desktop until I was basically working exclusively with it. From March 2020, I've used it day in, day out. During this time, it became painfully obvious that the lifebook's performance is no longer adequate for my needs. About a year ago, I've thus started to look for a successor, but considering my recent change in preference, I was looking for a notebook with higher performance and display resolution, as well as a backlit keyboard.

There were several contenders, all armed with processors of the Cezanne series of AMD. But my favorite was the Ideapad 5 Pro 16 because of its comparatively large screen real estate with a WQHD resolution and 16:10 form factor. When it was offered for €899 by Lenovo in a bargain sale, I didn't hesitate to accept the offer.

The Ideapad 5 Pro 16 comes with a gun-metal grey (“storm grey”) metal case with an excellent finish. Despite its slightly larger display diagonal, it is significantly smaller, lighter, and, particularly, thinner than my Lifebook. At the same time, it leaves it light years behind in terms of performance:

Fujitsu Lifebook AH530

Processor

Intel P6200

AMD Ryzen 7 5800H

Lithography (nm)

32

7

Frequency (GHz)

2.13

3.2–4.4

L2/L3 cache (MB)

0.5/3

4/16

2/2

8/16

Weight (kg)

2.5

1.9

Display (inch)

15.6 (1366×768)

16 (2560×1600)

RAM (GB)

4 (DDR3-1066)

16 (DDR4-3200)

Mass storage (GB)

500 (SATA HDD)

1000 (PCIe SSD)

TDP (W)

35

45

Battery life (h)

3

8

iperf (Mbit/s)

40

360

Cinebench R23

336/641

1445/12969

hdparm -t (MB/s)

70

2300

Price (€)

299

899

For comparison, my 9 years old desktop achieves 820/3650 points in the Cinebench R23 single/multi benchmark, and Dell's 17″ high-end notebook XPS 17 in a comparable configuration (processor graphics, 16 GB RAM, 1 TB SSD, 2.2 kg) with an Intel® Core™ i5-11400H for €2098.99 (1920×1200 non-glare) or €2398.99 (3840×2400 glare) scores 1467/9017 points according to c't 21/2021.

There wasn't any question about the Linux distribution I would install on the Ideapad (Arch, of course), but I debated with myself whether I should install a desktop or stay with Openbox as on all my other systems. In view of the medium-high display resolution of 189 ppi, I finally settled for Budgie, a Gnome-based desktop known for its gracious handling of high-dpi displays. And so far I like what I see: the desktop has an unobtrusive, rational, and no-nonsense quality about it.

The Ideapad is officially specified to have an Intel AX200 wifi chip, which works perfectly under Linux. But I had been warned by posts in the interwebs that it may instead be delivered with a Realtek RTL8852AE chipset, which is not yet supported. And that's what happened of course also in my case. I thus installed over a LAN connection (using an USB/ethernet adapter) and installed the driver for the 8852 provided on the AUR right after. The driver works fine except when the notebook goes into hibernation, after which there's no wifi device any more – it simply vanishes. I haven't found a solution for this inconvenience, but hope that the official support of the rtw89 driver by the mainline kernel will solve this issue, and will hopefully materialize with Linux 5.15. Alternatively, I could replace the wifi module as others have done.

Other than that, everything works as intended, and lightning fast.😂 Oh, I've replaced pulseaudio by pipewire-pulse to use my bluetooth headset, which would otherwise be without microphone. And I've installed rofi, which I still prefer as a program launcher over anything a desktop can offer...