Monday, March 14, 2016

Macports Octave build hangs on El Capitan

While trying to install Octave from Macports on El Capitan, the build hangs during atlas compilation. Existing bug reports don't really provide a solution.

Luckily, Octave wiki provides a solution in 4.3.1 Simple Installation Instructions

  sudo port install atlas +gcc5
  sudo port install arpack -acclerate +atlas
  sudo port install octave

Wednesday, February 10, 2016

Personal streaming music server


I would like to have a private Spotify / Google Music / Apple music like setup. For free. As I already have bought the music once in the past.

Music files would be stored at home, but accessible anywhere. This way I could listen to all my favourite songs on the go. And do this with low end smartphones which have limited storage capacity but flat fee 3G/4G network access.



Raspberry PI to start with.


  • Both the server and the mobile application keep on crashing
  • Depends on Tondo servers to be available. I can only hope their freemium business model is sustainable forever.
  • Implemented in Java
    • Needs to be configured for low ram from defaults

    • You need patience to start it up on a Raspi model B 
  • Auto start for now
    su -c /var/madsonic/standalone/ pi

    Mobile application


    General host/network setup

    • Public IP - attach to a VLAN outside the firewall
    • Dynamic DNS from
    • Set up DNS update in /lib/dhcpcd/dhcpcd-hooks/
    case "$reason" in
    curl -u user:pass ''

    • Set up usbmount to automatically mount USB sticks

     sudo aptitude install usbmount

    • Set up NAT from a privileged port to an user process
    iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 4040 

    Saturday, December 5, 2015

    make-bcache: Device or resource busy

    When setting up bcache, I ended up being halfway there. Bcache could not be set up, because it's not a blank block device.

    sudo make-bcache -C /dev/sda3 -B /dev/sdb1 --wipe-bcacheDevice /dev/sda3 already has a non-bcache superblock, remove it using wipefs and wipefs -a

    Wiping up the partition would not work as bcache is already using it for something

    sudo wipefs -a /dev/sda3
    wipefs: error: /dev/sda3: probing initialization failed: Device or resource busy

    Also detaching the device from bcache won't work, since the bcache0 is not really there yet.

    echo eb99feda-fac7-43dc-b89d-18765e9febb6 > /sys/block/bcache0/bcache/detach
    cd /sys/block/bcache0 bash: cd: /sys/block/bcache0: No such file or directory
    Seems the solution was to stop the bcache instead:

    cd /sys/fs/bcache/eb99feda-fac7-43dc-b89d-18765e9febb6
    sudo sh -c "echo 1 > stop"

    Wednesday, November 18, 2015

    Creating a Debian repository

    I wanted to automate setting up my custom application on multiple Raspberry PI's. It was time to learn how to set up a Debian repository.

    On my personal web server, the steps to create the repository:

    cd /var/www
    mkdir debian
    cp /path/to/my-package_0.0-1_armhf.deb debian/
    dpkg-scanpackages debian /dev/null | gzip -9c >debian/Packages.gz

    On each Raspberry:

    sudo sh -c "echo 'deb debian/' > /etc/apt/sources.list.d/myserver.list"
    aptitude update
    aptitude install my-package

    Helpful, almost complete instructions I found at and

    Sunday, May 3, 2015

    OpenVPN IP packet with unknown IP version=15

    I ran into this error when setting up Viscosity OpenVPN client for my Mac.

       IP packet with unknown IP version=15 seen
    My router at home is running OpenWrt. I knew it has a good OpenVPN setup as I have been successfully connecting using OpenVPN for Android.

    The key to getting the Viscosity to work with OpenWRT was selecting LZO compression: "Not specified" under preferences / options.

    Thursday, April 30, 2015

    Mac OS X lock screen immediately

    The one thing nice about Windows is being able to lock screen quickly when you leave your desk by pressing Windows-L.

    I have been wondering how to do this with my Mac. Now that I finally bothered to actually google for it for a while, this is the best I found so far:

    open /Applications/Utilities/Keychain\
    This adds a lock icon in the menu bar. It's not quite as convenient as Win-L, but does the trick.

    From donmontalvo at

    Sunday, February 15, 2015

    Canon CP910 - Connection Method not supported -9786 on OS X Snow Leopard

    I've been very happy with the Canon Selphy CP910 photo printer. Print quality is excellent and it has been very easy to use. Except with my oldest Mac, which is stuck on Snow Leopard 10.6.8.

    Drivers install fine. Printer is found and installed. But always when trying to print, the dreaded error message comes up:

    Connection Method not supported -9786

    Apple forums have all kinds of voodoo to make it work, none of it helps. The key to success is:
    • In "Add printer" dialog, WAIT, do nothing, for ~10 seconds.
    • Additional, working CP910 appears with the magic word 'cnybmscp'.
    Do not install the "Bonjour" CP910. It's a trap. It will fail you.
    Do install the "cnybmscp" CP910.