Saturday, August 31, 2013

On Debian 7 ffmpeg is not installed any more as it comes with its successor avconv.
Therefore it is enough to write a small bash for loop which takes any *.wma file of the folder and starts the conversion. The output file will then have the file extension replaced to mp3. Done!
The result looks like this:

for f in *.wma; do avconv -i "$f" -ab 192k "${f%.wma}.mp3"; done

However, you can replace the two occurrences of *.wma with any other music file format you want to convert from (eg: *.flac, *.aac, *.wav,...). Keep in mind that you need to have the right gstreamer plugin installed to encode and decode the desired formats.

Monday, July 29, 2013

It seems that since the upgrade to Android 4.3 the OpenVPN Installer App is not working for me any more. I get some error saying /system cannot be mounted writeable (rw).
However, it is still possible toinstall the openvpn binary per hand... and it is not as complicated as it seems! This guide only works on rooted devices and is written for Linux users, however the lower part should also work on Windows and Mac.

At first you need to get the Android Debug Bridge binary and install it on your computer (I just put it into $HOME/bin).
Then download the latest OpenVPN Installer APK - we need to extract the openvpn binary from this package:

Now use adb to push the binary to your phone/tablet's "sdcard" (external storage):

adb push openvpn /sdcard/

The next two commands will open a shell and give us root access on your Android device. Everything you type afterwards happens directly on your device, so be careful!

adb shellsu

Now we need to mount /system as writeable to be able to make changes. Next we copy the binary to its final location and delete it on the sdcard (unfortunately moving is not possible). After we changed the file-permissions so that the binary can be executed, we need to mount /system as read-only again:

Sunday, July 14, 2013

To be able to build Rainy on Debian Wheezy (and probably also on Ubuntu), you need to do several preparations, because building now depends on NuGet (http://nuget.codeplex.com).
At first you need to install mono-complete, as this tool has many dependencies:

$ sudo apt-get install mono-complete

Then download the nuget command-line utility: http://nuget.codeplex.com/releases
Further create a file/script called "nuget" so that nuget.exe is called with our desired options:

Wednesday, February 27, 2013

As Ubuntu One is shutting down their note-sync service based on the Snowy server, I needed to come up with a solution for this problem. My main thought was: Why should I trust anyone on this again, if it is so easy to build your own "cloud" for syncing notes?Rainy is still in early development, but already does an awesome job on syncing notes between Tomboy and Tomdoid. Special thanks to Timo Dörr for this! Further, the Raspberry Pi (a credit-card sized computer) is the ideal platform for this purpose as it only "eats" 2 Watts per hour and can be easily run 24/7.How do I build my own note-sync-server?To create a minimal Debian system on a SD Card for the Raspberry Pi, just follow the steps here: http://blog.kmp.or.at/2012/05/build-your-own-raspberry-pi-image/In summary you need to:1. Install these dependencies on your computer:

2. Adopt the script (Optional! Just search for the lines and put your things in there!):x) Change the debian mirror url: deb_mirror="http://http.debian.my/debian"x) Add the network interface wlan0 for wifi access and use a static IP address of your choice:

3. Run script: sudo ./build_rpi_sd_card.sh /dev/sdX
4. Put the SD Card into your Raspberry Pi and plug it in. It should automatically connect to your wifi (or lan)! After you logged in (either directly or over ssh root@192.168.0.4), you will see a typical Linux shell. At first we will have to install the dependencies and necessary packages for our mono based Rainy server:

If you want to sync from outside your home, you have to redirect the 8080 port of your router to the IP address of the Pi. Further, you have to use the public IP of your router in the sync URL. In case you get a dynamic public IP, you will have to use http://www.noip.com/ or a similar service.

I hope, you know what to do! If not, please don't hesitate and ask your questions in the comments!

Friday, January 25, 2013

As I heard about the new Age of Empires II extension "Forgotten Empires" created not by Microsoft, but by an awesome community, I needed to play this game again! I don't like Wine that much as I once got a bunch of viruses having it just installed, therefore I decided to install Windows XP in a virtual machine.
I chose GNOME Boxes as it uses kvm. It was really fast and easy to install, I just needed my Windows-Installer-CD as an *.iso file.

However, I could not find any option to insert another *.iso image file to be mounted in the guest system. The user interface just does not provide to change the CD disc image - so we have to change the kvm options in another way. Open your terminal and type:

$ virsh edit Windows\ XP\ Pro.iso

(If you installed something else than Windows XP you might have to look in the folder .local/share/gnome-boxes/images/ how your machine is called.)
In this file search for the lines saying something like the following and exchange your iso-filename (+path):
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/home/tux/AoE.iso' startupPolicy='optional'/>

(If you need help using vim, check this out.)
Save it, reboot your Windows and enjoy having your disc image in the CD drive of the guest!

Friday, January 18, 2013

Recently I needed to start several long running jobs at my working machine from home using SSH. Unfortunately closing the SSH connection stops all the tasks started in this session.

Therefore we need a tool to start some tasks which will be kept running upon logout: SCREEN
There are tons of tutorials and howtos out there and a man page exists too.
However, here the most important commands and shortcuts:
Start it with typing

$ screen

then start your job, then press Ctr + A, Ctr + D to detach the job and close the program without killing the running task. Running