Providing XDG Runtime Directories

Introduction

The intended audience for this document are application programmers and providers of init-systems for managing features of installations of the GNU/Linux operating system and POSIX-compliant operating systems in general, who are concerned with per-user temporary file management based on the XDG Base Directory Specification, [XDG].

Many applications that follow XDG guidelines and specifications expect a directory with a location specified by environment variable XDG_RUNTIME_DIR. This directory – in the following called „rundir“ – stores files that serve purposes of process communication and synchronization; it is comparable to the directory /run, but on a per-user basis, with ownership and permissions set up so that every user of a system can have such a directory, protected from access by other users.

The existence of such a directory, requirements to this directory, management of the directory’s lifecycle and its denomination by the content of a user’s XDG_RUNTIME_DIR environment variable are mandated by [XDG].

Weiterlesen … »

Ad-Blocking with BIND9 and NGINX

In my intranet, where hosts are in a subnet 192.168.2.0/24 and domain names in a domain mydomain, I use BIND9 as DNS, running on host intradns.mydomain , and NGINX as a webserver running on intraweb.mydomain.

I would like to rewrite all subdomains of certain public domains (spammers and trackers) using my intranet DNS to a webserver that answers every request with a 1 x 1 transparent Pixel GIF.

Note: A user has to be fully aware that the result is not the internet according to public DNS anymore but a modified view of it.

Weiterlesen … »

I18n of Bourne Shell Scripts Using „gettext.sh“

This article shows how to make a Bourne Shell script translatable by means of the „gettext“ toolchain and how it then operates with natural language strings translated into the user’s language.

Weiterlesen … »

„jack-autostart“ – Setup and Start Scripts for jackd

„jack-autostart“ is essentially a start script (I use it for my XFCE sessions) that

  • starts „jackd“ with appropriate command line parameters and
  • configures as many applications as possible to route playback to the JACK service.
    • For this purpose, redirect all ALSA playback to JACK, and
    • set JACK as default audiosink/-source for GStreamer.
jack-autostart Architecture Overview

jack-autostart Architecture Overview

Weiterlesen … »

Wanderung nach Haag am 26.7.2015

Hier ein paar Bilder von meiner Wanderung nach Haag:

Haag, 26.7.2015
Wanderung in das in einer Rodungsinsel im "kleinen Odenwald" gelegene Dorf Haag.

Adding Custom Format Buttons To tinyMCE in WordPress 4

Introduction

In my technical articles I sometimes use inline fragments typed in a monospace font to highlight code or filenames that appear within floating paragraph text. Back in the days I did this with the <tt> element, nowadays I use <span class="tt"> and a CSS style like

.tt { font-family: monospace; }

I wanted to extend the tinyMCE in WordPress with a toggle button that behaves like the Bold or Italic buttons and surrounds selected text with such a <span class="tt"> element or, when pressed while an already surrounded text is selected, removes that surrounding again. Also, when the cursor is inside such an element, the button should switch to an „active“ state that indicates that the character format can be deselected.

Weiterlesen … »

DTP With Free Software?

In case anyone is wondering how to produce documents with

  • complex structure,
  • multiple pages and
  • professional quality

using free software, the answer is of course: with LaTeX. Consider the alternatives: Office (Libre, Open, the KDE stuff) are a nuisance when it comes to properly customized sectioning, and for larger documents or 100% precise positioning they turn into an outright PITA. Scribus is too limited to really overcome the Office competition. Inkscape addresses a different problem.

Weiterlesen … »

PHP HTTPS Streams: Explicitly Using A CA For Verification

When I tried setting my Owncloud Calendar’s ICS export URL (which uses HTTPS) as a calendar import URL in Dolibarr (currently installed are Owncloud 8.0 and Dolibarr from the version 3.6.2-3 Debian package), Dolibarr gave me these errors (taken from the error.log of the webserver, with some additional formatting):

PHP Warning:
   file(): SSL operation failed with code 1.
   OpenSSL Error messages:\nerror:14090086:SSL routines:
      SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
   in /usr/share/dolibarr/htdocs/comm/action/class/ical.class.php on line 60
PHP Warning:
   file(): Failed to enable crypto
   in /usr/share/dolibarr/htdocs/comm/action/class/ical.class.php on line 60

This makes sense, since my Owncloud’s HTTPS uses a certificate that is signed by my self-signed CA. PHP, as by version 5.6, requires HTTPS certificates to verify for streaming access by default, which is a good thing.

To solve this, I had to make the CA of the Owncloud web certificate known to Dolibarr.

Weiterlesen … »