TVHeadend with Transcode Support in Ubuntu 14.04

Unfortunately the packages from the repository no longer support transcoding recently. You have to build your own package.

sudo apt-get install build-essential pkg-config libssl-dev git libavahi-client-dev libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libswscale-dev libavcodec-extra-53 liburiparser1 liburiparser-dev debhelper libcurl4-gnutls-dev a52dec

AUTOBUILD_CONFIGURE_EXTRA=--enable-libffmpeg_static ./ -t trusty-i386


AUTOBUILD_CONFIGURE_EXTRA=--enable-libffmpeg_static ./ -t trusty-amd64

Finally, the transcode setting is no longer in the general tab. Rather, you can now enable transcoding by selecting special profiles you can set up under Coniguration, Stream, Stream Profiles. Unfortunately, most the Android apps don't support this at the moment. You may want to try to checkout the version before committ c4089cc7a378abc2d8912d86d6440aab6230967a.

HTSP Plugin for Ubuntu 14.04

After trying to find a package for a long time I ended up compiling it myself. This is a link to my library file: (AMD64). You can check with ldd If there are missing libraries, it won't work for you.

OpenVPN on Android only supports 4096 bits private key

If you run into the error
"OpenVPN core error : PolarSSL: error parsing config private key : PK - Bad input parameters to function."
with OpenVPN on Android you'll have to change your private key. It has to be supported by PolarSSL / ARM mbed. In my case, reducing the private key size to 2048 bits solved the issue.

Panbox missed an important library: no unix-java in java.library.path

The solution is simple. You need to install the libraries listed in the readme.txt file.

E.g. for Ubuntu or Debian:
sudo apt-get install dbus-java-bin python-appindicator python-nautilus libbluetooth-dev python-notify python-gtk2 python-dbus

Using GMail with IMAP Clients - especially when using the priority inbox

If you wish to use Gmail via IMAP, it's important to keep in mind some specialties in how Gmail handles IMAP. This is especially important if you use the priority inbox to filter important emails for you.

What you would do in Gmail | What you do in the mail client
  • Archive email | Delete the email (but do not move it into the trash folder)
  • Mark the email not important | Move the email from impotant to all mails or the inbox
  • Add a label | Copy the email to the folder
  • Remove a label | Delete an email from a folder (but do not move it to the trash folder)
  • Delete an email | Move it to the trash folder (you may also delete it from the current folder).

If you want to search your emails via IMAP, you will usually want to search inside the folder all mails. Note that unless you use special extensions the search in my tests only works for exact matches in the subject line. It does not find anything else, e.g. email addresses or content.

I hope that helps!

Network Manager not working: Disabled by Hardware Key

If Network Manager claims that Wifi is disabled by a hardware key, take these steps:
  1. Check if hardware keys disable the wifi (duh!) - this may include key combinations such as Fn-F2.
  2. Check rfkill list if some devices are blocked and unblock them with sudo rfkill unblock all
  3. If you have one blocked device, this may block all other devices due to a bug in Network Manager. Hence removing the modules of all other devices may be necessary to enable a device which is actually already unblocked. (e.g. sudo rmmod rf2800pci and sudo rmmod ideapad_laptop).
Worked for me - let me know how this works for you.

Successfully Connecting your Bluetooth Headset with PulseAudio and A2DP to Linux

After lots of trying to connect the bluetooth headset via bluetooth and pulseaudio to Linux, the following procedure has proved pretty successful for me most of the time:

  1. Pair Headset normally via blueman.
  2. Connect to the headset (aka telephony) service (not A2DP)
  3. killall -9 pulseaudio (it often hangs for me)
  4. start playing something
  5. open pavucontrol
  6. switch the playing output to the bluetooth device
  7. you now hear crappy sound
  8. now while the sound is playing, connect A2DP, either via blueman.
  9. pulseaudio should automatically switch to high quality playback now. otherwise: Go to the last tab in pavucontrol and set the profile to A2DP.

Enjoy! And let us know if this worked for you! ;)

Kernel Compile Service for Testing Patches and Bisecting

You know the situation, when you report a bug in the kernel and then ideally you're asked to test a patch? This means you have to compile your own kernel to test it and that means a lot of time: setting up a build environment, compiling, testing, compiling again, .... Depending on your skill and machine this may take a lot of effort.

It seems to be this could be so much easier and faster. The quick&dirty fix: e.g. the Ubuntu kernel ppa could provide a package with the already compiled sources so that you only have to compile that part which changed - if that would even work. The better fix: you could request a compiled image with a certain patch applied. That would not take too many resources - after all the compiled tree would already be there. And it would make things enourmously easier for debugging. It would not need to be available to the general public, but an "access key" could be distributed to someone who reported a bug in the bugzilla once a patch is ready for testing.

And what would help even more, would be if a git bisect could be done in the same way. If you had a powerful compilation server and you bisect via a web interface, download a kernel image, test it, and then tell the interface if the error occurred or not. Of course that would take much more power. But that's exactly why it would be great to have.

And overall, all this would improve the kernel debugging a lot and reduce the effort for developers and users with debugging.

Running New Software on an Old System

I have a netbook which still runs a very old system. It's ancient and no longer supported (just like Windows XP). But it's the last version which supports the proprietary Intel Graphics drivers (poulsbo) with video acceleration in Linux. Now the problem is using this in any environment would be extremely dangerous, because it's full of years of serious security issues. And the software really is very ancient.

Luckily, there is help, called schroot. Using a simple script, you can replace any command with a command out of the chroot. With this simple script, the application will behave just as if it was installed in your current environment - except for access to directories.

schroot -c precise -- /usr/bin/google-chrome-stable ${@}

Of course you could just the same method to simple make your system a bit more secure for a few programs. You can use schroot and debootstrap to setup a secure environment.

New Favorite Root Server Hoster: On demand virtual machine for 5 $/month or .7 ¢/hour

I've been thinking about root server hosters recently and a friend pointed me towards Digital Ocean. And besides their good pricing and choice in OSes I really like that you can pay by the hour. That means you can use a server for a few hours, shut it down again, create a snapshot, and "detroy" it. You keep the state of your machine and you can return to this state easily at any time.

A server with 512 MB RAM, 20 GB SSD and 1 TB transfer costs you 5 $ per month. But you can also use a server just for an hour for just one cent or precisely $ 0.007. This is very cheap yet comfortable for remotely testing things. And you get a fully set up Ubuntu or other server in just under a minute. Just remember to shut it down, snapshot and destory the server when you're finished if you want to pause the billing. And they have servers in Amsterdam / EU.

Of course, you could also use this to create your own private cloud service. Try it out!

Note: I get a provision for referrals if you click the link. But I wrote about it because I like it, not for the money. I may have written more than I would have otherwise, though. ;)

Two Factor Authentication for SSH with Ubuntu

Here is a great very quick Ubuntu two factor authentication setup guide, which I'ved tested to work for Ubuntu 12.04 and 14.04. It sets up two factor authentication for SSH login. You can still login via public key instead, which may be even safer. But it's a good way to prevent bad effects from someone just stealing your password.

Here's a link to the companion authenticator apps for different mobile platforms (Android, iPhone, ...).

Make sure you keep logged in with one session when setting it for remote machines! If you make a mistake you won't be able to log in at all until you correct it.

Two Factor Authentication for SSH with Ubuntu

Here is a great very quick Ubuntu two factor authentication setup guide, which I'ved tested to work for Ubuntu 12.04 and 14.04. It sets up two factor authentication for SSH login. You can still login via public key instead, which may be even safer. But it's a good way to prevent bad effects from someone just stealing your password.

Here's a link to the companion authenticator apps for different mobile platforms (Android, iPhone, ...).

Make sure you keep logged in with one session when setting it for remote machines! If you make a mistake you won't be able to log in at all until you correct it.

Freetz and Knockd: Most Ports don't work

One important thing to note when using knockd with freetz is that only forwarded ports are possible. Only they arrive at the dsl interface. But of course you can add forwarding rules. "dsl" is the correct interface for dsl users.

Very Short Knock Client Bash Script

All clients I saw were a bit too elaborate. So I wrote this one which only needs four lines and could do with less:

target=$1; shift
echo knock $target with knock $*
for i in $*; do
echo > /dev/udp/$target/$i;

Fixing "Valid eCryptfs headers not found in file header region or xattr region, inode"

This is a manual process, once step. You need to remove the file. Then it can be recreated.

e. g. Valid eCryptfs headers not found in file header region or xattr region, inode 123344

You will need to inode number in bold. Then use this command to find out which file it corresponds to:

find ~/ -inum 123344

I'm assuming here that the ecryptfs is mounted in your home directory, as e.g. in Ubuntu.

Then this gives me some filename, e.g.

To check it's really the problem try to read the file:
cat /home/user/.kde/share/config/session/konsole_10101dd02011.

You should get an input output error now. If so, feel free to remove the file:

rm /home/user/.kde/share/config/session/konsole_10101dd02011

Done. HTH!

Self Compiled Kernel Stops Booting in Ubuntu 14.04 [Fixed]

After switching from Ubuntu 12.04 to 14.04 I've noticed my self compiled kernels would not boot well. There was always an error that a device (root / and swap) could not be mounted. Also I could no longer mount removable devices, such as USB sticks.

This is due to changes in the boot process with the new version of Ubuntu. The issue disappears if root is mounted rewrite by default. Hence you should change the root=/dev/... ro to root=/dev/... rw. Actually just booting once like this seems to have fixed my problem permanently, i.e. now I can boot with ro again and I have no issue.
Another possible reason could be a problem during fsck (fix).

Ubuntu now also requires the kernel automounter support version 4. The config entry is CONFIG_AUTOFS4_FS=m. Then everything worked again.

Fix for blank screen or black display after resume with open source radeon drivers in Xorg

The bug was reported in detail here. The fix comes in two ways:

1. For just echo mem > /sys/power/state to work, use the kernel boot parameters nomodeset acpi_sleep=s3_bios,s3_mode
-> You have to test which of the s3_bios or s3_mode settings work for you. You may also use number 1, 2, and 3 in /proc/sys/kernel/acpi_video_flags instead to change the setting at run time.

2. For pm-suspend to work (e.g. *Ubuntu) you need to create a file
/etc/pm/config.d/radeon  which contains  QUIRK_S3_BIOS="true"  QUIRK_S3_MODE="true"
3. To have working mode setting, load the radeon module with modeset=1, by creating a file
"options radeon modeset=1"

Converting OpenCard Files to Anki [manual approach]

It's a bit troublesome, a better solution would probably be to create an XSLT file as an export filter from Impress to CSV. (A good start for this would be the <draw:text-box> tag.) But with a bit of effort this works, too.

1. Open opencards file in impress.
2. Copy all cards into clipboard
3. Paste cards into Openoffice
4. Export file as Text file
5. Open Text file in Text editor
6. Find and replace all ";".
7. Find all question and answer fields and seperate them by ";"
8. Import into Anki.

There also seems to be a way to do this by converting the slides to powerpoint, then using this macro. I'm giving up for now. Any more hints would be appreciated, because I still have tons of cards! :)

Fix for "GLX error: Can not get required symbols" in Xorg log file / No 3D graphics with radeon Open source driver

If you get the error: "(EE) GLX error: Can not get required symbols" when trying to use the open source "radeon" driver, and you have AMD's fglrx installed, I will tell you a very simple and fast fix. Most people will recommend to completely uninstall the fglrx driver, but there is much simpler and faster fix for that.

First, check if this is really the issue:
sudo /usr/lib/fglrx/switchlibglx query

If the command tells you that the AMD driver is currently in use, you have to switch to the "intel" driver in order to use the open source radeon driver. This is also very simple:

sudo /usr/lib/fglrx/switchlibglx intel

Now restart your X Server, or your computer if you wish, and you should be all set! And if you want to use fglrx again, remember to switch back with:
sudo /usr/lib/fglrx/switchlibglx amd

Enjoy! And let me know if this worked for you!

How to configure Darktable with OpenCL for your AMD APU

I was really curious for a piece of working opencl software. Then I found out that a software I love actually also does opencl! The only issue is, it did not work by default on my system with AMD APU, because the assigned graphics memory by my BIOS did not suffice. I can only dedicate a maximum of 512 MB to the GPU part of the APU. But this is probably also the minimum for a good setup.

Setting up the AMD OpenCL SDK is a requirement for this to work! Also you have to enable OpenCL support in the Darktable configuration. Also be aware that this may crash your system as the fglrx driver is not very stable with OpenCL yet. In my experience it likes to crash especially after a suspend to ram.

Anyway, so after all this what you have to do is to edit your darktable config file manually. Make sure to make a backup and then add these lines to .config/darktable/darktablerc:

Issue a "sync" command before starting darktable to be sure you don't lose data with a possible crash! ;)

These numbers work pretty well for me on a system with 512 MB dedicated memory. But they should probably work more or less on any AMD APU. I have bad experience with higher and lower numbers than these. Also I think vaapi/xvba did not work at the same time. You can still enable and disable OpenCL on demand in the GUI settings menu.

Let there be OpenCL! Enjoy!