Installing mediabrowser in a jail root

I have been playing around with media browser lately. Media browser is a streaming server, like plex. For me it has the advantage that I can host the website and security at home. That way I can easily stream over https and control user authentication myself. For security reasons I installed it in a jail root using schroot on my debian box. This is how I did it.

Continue reading “Installing mediabrowser in a jail root”

Recursively merge multi part movie files

So I had some split movies that I wanted to merge together. Since I didn’t want to search for every problematic file and manually fix it, I decided to write a script.

The script takes a top directory as argument and then goes through all sub directories looking for mp4 or avi files that have -part1 in the name. It then uses ffmpeg to convert those multi part files to a single movie file. If the doDelete variable is set, it will clean up the original multi part files. You might want to test the script on a couple of movies before enabling this.

DISCLAIMER: this script worked perfectly on my movie library, however if it eats your movies for breakfast or causes the world to explode, it is your responsibility. You ran it, didn’t you?

And for those who didn’t see it: it is Perl, so you will need Perl (and ffmpeg).


# Location of the Movies, all directories underneath
# will be scanned
my $baseDirectory = "/path/to/the/root/of/your/movies";

my $numberOfUpdates = 0;
my $doDelete = 0;

handle_dir($baseDirectory, '.avi|.mp4');

print "\nUpdated $numberOfUpdates files\n";

exit 0;

Continue reading “Recursively merge multi part movie files”

Restrict phpmyadmin access to local ip

At home I am running Debian Jessie to provide some web applications to the internet. Everything is setup to run with ssl only. But even with encryption there are some services I just don’t want to expose to the world. One of them is phpmyadmin. I only need the application occasionally, but for those occasions it is really practical.

I tried an awful lot of ways to restrict the application to the local subnet only. I tried .htaccess files, that just got ignored. I tried things like “Deny All” in my <Directory> statement, but nothing seemed to work. I finally stumbled upon this post to the Fedora forums which holds the truth for my environment.

Edit the file: /etc/phpmyadmin/apache.conf and add the following lines (in bold):
<Directory /usr/share/phpmyadmin>
    Options FollowSymLinks
    DirectoryIndex index.php

    <IfModule mod_authz_core.c>
        # Apache 2.4
            Require ip
            Require ip

If you are on another private subnet, just update the bit to match your specific subnet. In the unlikely event that you don’t have mod_authz_core enabled, you can enable it on the console with:

# a2enmod authz_core

Great green attitude unitymedia!

We have a Unitymedia ECHOSTAR HDC-601 DVR which has worked well for the last 4 years.

Echostar HDC 601

We have set the system to shut down after four hours of inactivity to save some energy and do a little for the environment. However since two nights the machine suddenly hangs and doesn’t shut down anymore. The display freezes, the system doesn’t respond, but the power light is still on, so it will still consume 100% power.

I called Unitymedia’s technical support today to see if we can fix the system, or maybe change the box. They told me to go into the menu and change the settings to prevent the machine from going in standby. Hey, I know that keeping the machine on, will prevent problems with standby, but it will also raise my energy bill.

The support guy told me there is nothing more he could do. Since there is nothing really broken in the machine.Way to go Unitymedia!

Installing XBMC – perfect startup on Linux

I have been playing with XBMC for a couple of years now and it has been an awesome experience.  I use it to play all my content (music, movies and series) to most of the rooms in my house. Since it has been part of my life for such a long time, I spent an awful amount of time tuning the boot process, so XBMC will start both quickly and beautifully. In this post I will describe what choices I have made, what I customized to make XBMC boot within 10 seconds (including BIOS start) and completely controlling the output on the screen. Continue reading “Installing XBMC – perfect startup on Linux”

Don’t worry, we only spy on terrorists (worry, because everyone we don’t like is a “terrorist”)

Bruce Schneier has a great essay about the fact that NSA spying apologists say that dragnet surveillance is limited to cases of terrorism: but “terrorism” is now synonymous with “whatever it is people we want to spy on are doing.”

Back in 2002, the Patriot Act greatly broadened the definition of terrorism to include all sorts of “normal” violent acts as well as non-violent protests. The term “terrorist” is surprisingly broad; since the terrorist attacks of 9/11, it has been applied to people you wouldn’t normally consider terrorists.

The most egregious example of this are the three anti-nuclear pacifists, including an 82-year-old nun, who cut through a chain-link fence at the Oak Ridge nuclear-weapons-production facility in 2012. While they were originally arrested on a misdemeanor trespassing charge, the government kept increasing their charges as the facility’s security lapses became more embarrassing. Now the protestors have been convicted of violent crimes of terrorism — and remain in jail.

Meanwhile, a Tennessee government official claimed that complaining about water quality could be considered an act of terrorism. To the government’s credit, he was subsequently demoted for those remarks.

Mission Creep: When Everything is Terrorism (via Boing Boing)