0x79 - a blog

Work in progress.

Building dexed for Linux with Docker

Dexed is a FM Synth Plugin (https://github.com/asb2m10/dexed) offering a standalone version you can download from their git releases. Executing their pre-compiled binary on my Linux machine I got the following error:

~/Downloads/dexed-0.9.4.lnx % ./Dexed
[1]    29833 illegal hardware instruction (core dumped)  ./Dexed

Building Dexed from source solved the problem :)

This is a quick guide how to build it your self using docker.

Dockerfile

FROM debian:latest

RUN apt-get update
RUN apt-get install -y git freeglut3-dev g++ libasound2-dev libcurl4-openssl-dev build-essential\
                     libfreetype6-dev libjack-jackd2-dev libx11-dev libxcomposite-dev \
                     libxcursor-dev libxinerama-dev libxrandr-dev mesa-common-dev && apt-get clean

RUN git clone https …
more ...

Raspberry Pi: Use volume keys on keyboard with triggerhappy

To use the volume keys on your keyboard on linux or with a raspberry pi in particular, you can use the triggerhappy package, which comes pre-installed with raspbian.

The trigger happy config has to be saved at `/etc/triggerhappy/triggers.d/*.conf. We first specify the key, followed by the corresponding action to take.

KEY_VOLUMEUP    1      /usr/bin/amixer -M set PCM 5%+
KEY_VOLUMEUP    2      /usr/bin/amixer -M set PCM 5%+
KEY_VOLUMEDOWN  1      /usr/bin/amixer -M set PCM 5%-
KEY_VOLUMEDOWN  2      /usr/bin/amixer -M set PCM 5%-
KEY_MIN_INTERESTING  1 /usr/bin/amixer set PCM 1+ toggle

Some …

more ...

Raspberry Pi: No HDMI Signal after boot

If you are having trouble getting a signal on your monitor/TV from a Raspberry Pi no matter the settings in boot/config.txt it might be because of the experimental GL driver.

No matter the settings in /boot/config.txt i always got to a signal during boot, but "no signal" when the desktop was supposed to show up, or the monitor detected the wrong resolution (1080p@30Hz).

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=1
hdmi_mode=4

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT …
more ...

Backup Linux with tar

A simple way to backup your entire linux machine is just to create a tar all files

tar -cvzpf backup.tar.gz --directory=/ --exclude=proc --exclude=sys --exclude=dev --exclude=run --exclude=tmp --exclude=boot .

We set the directory to create the archive from to / and include everything in the archive with the . at the end. Also exclude directories like /dev or /sys, which are machine or OS specific and don't contain any of our files.

Parameters:

  • -c create a new archive
  • -v verbosely list files processed
  • -z gzip files
  • -p preserve-permissions
  • --directory change to directory
  • --exclude file/directory
more ...

Remote-Controll Spotify using REST and DBUS

In a previous article we used DBUS to send control commands to the spotify client.

To remotely control spotify via the web, i wrote a little HTTP server which takes GET requests and "forwards" them via DBUS to the player. The program is written in python (see below) and takes requests on the following paths:

  • /playpause
  • /stop
  • /next
  • /previous

Next step is an android app to call our little webservice :)

import SimpleHTTPServer
import SocketServer
import argparse
import subprocess

parser = argparse.ArgumentParser()
parser.add_argument('--port', type=int, default=9000)
args = parser.parse_args()


class ServerHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
    cmd = "/usr/bin/dbus-send --print-reply …
more ...