Flashplugin für Opera unter Arch Linux

Auf meinem Desktop läuft seit einigen Monaten Arch Linux und seit kurzem als Standardbrowser Opera. Leider muss ich mich seitdem auch wieder mit dem unsäglichen Flash Plugin herumschlagen – in Chrome kommt das ja automatisch mit und wird mit Chrome aktualisiert.

Für Opera muss ich noch zwei Pakete nachinstallieren:

pacaur -S freshplayerplugin-git chromium-pepper-flash

Pacaur ist ein Hilfprogramm, mit dem sich direkt Pakete aus dem Arch User Repository herunterladen und installieren lassen. Damit sollte man immer vorsichtig sein, da im Prinzip anderer Leute Skripte direkt und u.U. mit Root-Rechten auf dem eigenen Rechner ausgeführt werden. Allerdings kann man mit Pacaur sehr einfach in die Skripte gucken und prüfen, was dort gemacht wird.

Egal, zurück zum Flash-Plugin. Nachdem der Befehl von oben erfolgreich ausgeführt ist, muss Opera noch einmal neugestartet werden. Anschliessend sollte das Plugin unter about:plugins im Browser gelistet werden. Aktuell ist bei mir die Version 23.0.0.185 installiert.

Vielen Dank an linuxundich für die Starthilfe!

Simple indicator for rslsync and XFCE

Update I added another script which will run rslsync when the taskbar icon is clicked.

I’m running rslsync on all my computers and I’m constantly checking if it was started to not loose any chances to sync up my documents. But this gets boring quick, so I decided that I want a simple red/green indicator on my XFCE taskbar.

Luckily there is a simple plugin called xfce4-genmon-plugin which can be used to execute a shell script. The output of the script can be customized to display text, icons and tooltips. So I created a simple script to display a red icon when my sync process is not running and a green icon when the process is running. Here it is:

#!/bin/bash
SCRIPT=$HOME/bin/run-sync.sh
declare -i running
running=$(pidof rslsync)
if [ $running -ne 0 ]; then
	echo "<img>/usr/share/icons/Vivacious-Colors-Dark/status/24/stock_dialog-info.png</img><tool>Sync is running with PID $running</tool>"
else
	echo "<img>/usr/share/icons/Vivacious-Colors-Dark/status/24/stock_dialog-error.png</img><tool>Sync is not running</tool><click>$SCRIPT</click>"
fi

The script checks if the PID of a process called rslsync is something other than zero. I also use 2 icons from my current icon set, Vibrancy Colors Dark. In case I forget what this icon is about, I also add a simple tooltip which includes the process ID.

Update I added the tag <click>...</click> to the check script which references another script:

#!/bin/bash
SYNC_HOME=$HOME/bin/btsync
SYNC_CONFIG=$SYNC_HOME/btsync.config
if [ "$(pidof rslsync)" != "0" ]; then
	$SYNC_HOME/rslsync --config "$SYNC_CONFIG"
else
	echo Sync already running.
fi

This second script will start rslsync if it is not already running. So if the taskbar icon is red, I can just click it and my sync process wil be started. Now I can just check the taskbar when I start my computer and be sure that everything is syncing as it should.

Docker image for Wallabag v2

Sometimes I want to save articles that I want to read for later, because I don’t have the time to read right now. There are a couple of free online services that you can use, like Instapaper or Pocket. The services all work the same:

  • you give them a link to a webpage you want to read later
  • they scrape the page and store the text
  • when you got time, you open the service in your browser or a mobile app and read the article
  • you can save, delete, star the article

But with my ongoing quest to avoid services and host my own versions of them, I began using my own installation of Wallabag a couple weeks ago. Of course I decided to run it in a Docker container. Wallabag provides an official docker image you can use to get started. It works fine, although I had an issue when trying to run it behind a reverse proxy. But I worked around that and Wallabag in general works good enough that I don’t feel the urge to switch back to Instapaper every time I use it. The android app could use some love, but – again – it works good enough that I don’t want to hang myself everytime I use it.

Then I had a couple of issues with the docker container on my server. I tried to restart a couple of my container and while checking the process list of the server I noticed a defunct process pointing to the s6 and nginx services in the Wallabag container. This lead to a full server reboot, because I couldn’t kill the process and I couldn’t get rid of the container.

Because I don’t like rebooting my server just because I have a stray container running, I build my own docker image for Wallbag based on php:apache image and without any kind of additional supervisor. I run a couple other containers based on this image and I never had any issues with them, so I hope there won’t be any stray processes on my server anymore.

To use my image, just run the following command on your command line:

docker run --rm -p 8080:80 -v ./data:/var/www/wallabag/data moritanosuke/wallabag-docker

After the container is up, you can access your Wallabag at http://localhost:8080. All data will be stored in the directory data, so you should be able to stop/start the container and all your stored articles should still be there. Please note that I use the option --rm, so the container will be removed as soon as it is stopped.

Personally I like to run my containers via docker-compose. Here’s an example for your docker-compose.yml:

version: '2'

services:
  wallabag:
    image: moritanosuke/wallabag-docker
    ports:
    - 8080:80
    volumes:
    - ./data:/var/www/wallabag/data
    environment:
    - SYMFONY_ENV=prod

Now you can just run docker-compose up and you should be able to access your Wallabag at http://localhost:8080 again.

My docker image is slightly bigger, 260MB for an apache image instead of 150MB for the official image based on Alpine Linux – but I take that if I don’t have to reboot my server every couple of weeks.

If you want to try Wallabag, please give my image a shot and report any issues so I can improve it.