Introducing OCTV – ownCloud + ARM + old TV

CRT TVDo you remember my post about how Raspberry Pi revived my old TV? This is partially continuation of that post but also something new. Lets start with recap of what I did almost a year ago. I connected my Raspberry Pi to old CRT TV, installed video player and hacked together few CGI scripts to manage it. I got my old useless TV to do something useful again. Over the time, I made few modifications, introduced caching and added support for mpv to support not only Raspberry, but also better computers, like CubieBoard.

Now for the other part of the story. I was using CubieBoard as my home server for pretty long time, actually since the preordered one arrived. Unfortunately it aged a little and I upgraded my home network switch to gigabit one and this was one important part of infrastructure that didn’t supported it yet. At the same time my relatives could use some simple home server on slow local network. So I decided to pass on my CubieBoard and get myself a new board. As my father was also eyeing for my Raspberry I decided to replace both my ARM boards with only one. And as I needed it fast, I went for BananaPi because

  • they had it in local store in stock (no waiting)
  • it has composite video output I need for my old TV till I get a new one
  • it’s Allwiner and thus quite well supported
  • it has gigabit network card

Since I was doing major changes, I also wanted to improve my scripts a little. As I considered file browsing capabilities of my scripts the biggest weakness (well together with caching that was trying to address part of the problem of the browsing capabilities and broke from time to time), I decided to do some bigger change. Since I knew opensource web app that has great file browsing capabilities, I decided to take advantage of it and rewrote my scripts to became ownCloud app. An so I did. It is simple and clumsy, but it does something. It can play movies and you can control the player from the WebUI. If you don’t care about security too much. And do few important security holes into your system.

Few non-obvious tricks for BananaPi. If you want accelerated video and composite video output, you have to use old sunxi 3.4 kernel (which doesn’t build with gcc 5). Apart from that you have to give quite some memory to graphics card. I used following on kernel command line:

sunxi_g2d_mem_reserve=32 sunxi_ve_mem_reserve=128 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=32

And to make it work, you need libvdpau-sunxi to get accelerated drivers and you probably also want xf86-video-fbturbo to have non-video Xorg faster as well. I made packages out of those and you can currently find them in my personal repository (together with kernel package) but don’t worry, I’ll be pushing them somewhere more official over the time (xf86-video-turbo should be in Factory already).

Everything ended well, in the end I switched from Raspberry Pi to something more powerful what can still bring my old CRT TV into 21st century. But I’m back at square one(with hopefully better technology to start with) and need to re-add features I got used to and learn a little bit more about ownCloud internals to be better/more efficient ownCloud developer :-)

PS: Pull requests are welcome as I don’t know much about ownCloud or CSS or JavaScript or whatever it is I’m doing :-)


OBS Screensaver

screensaverSome of you might know that I was and in part still am a Gentoo user as well. I always found something reassuring in watching terminal with compilation going on. It is a nice sight. Compiler crunching all those sources and preparing something new for you. On some conference I even saw Gentoo guys showing a recording of Gentoo installation – a lot of compilation in there. I really liked it and I thought that it would make a nice screensaver.

So how can I have such a nice experience in binary distribution like openSUSE? All the packages are built by OBS and I get only binaries. No obvious way how to heat up my apartment with my computer. But I can still get the nice almost warm feeling of packages being compiled! Solution is pretty easy, I just configured xscreensaver to use my script and show me what OBS is working on! The outcome is, I have a screensaver that shows in the cool way compilation output of what OBS is working on right now. I still can smell fresh packages being baked, but without heating up my CPU.

How to do it? Quite simple. You need the following simple script:

  1. #!/bin/bash
  3. mkdir -p ~/.obs-saver
  4. cd ~/.obs-saver
  6. while true; do
  7. URL="$(curl --connect-timeout 2 'https://build.opensuse.org/monitor/old' 2> /dev/null | \
  8. sed -n 's|.*/package/live_build_log/\([^"]*\)/\([^/]*\)/\([^/]*\)/\([^/]*\)".*|https://build.opensuse.org/build/\1/\3/\4/\2/_log|p' | \
  9. sed -n "`expr 5 + \( ${RANDOM} \* 10 / 32767 \)` p")"
  10. if [ "$URL" ]; then
  11. curl --connect-timeout 2 "$URL" 2> /dev/null | tee "`date +%s`"
  12. LAST_BL="`ls -1 | tail -n 1`"
  13. if [ "`wc -l "$LAST_BL" | sed 's|\ .*||'`" -lt 5 ]; then
  14. rm "$LAST_BL"
  15. cat "`ls -1 | sort -R | tail -n 1`" 2> /dev/null
  16. else
  17. rm -f "`ls -1 | head -n -10`"
  18. fi
  19. else
  20. cat "`ls -1 | sort -R | tail -n 1`" 2> /dev/null
  21. fi
  22. done

Save it as obs-saver in your ~/bin and make sure it is executable. Then if you are using xscreensaver, select “Phosphor” screen saver and in settings -> advanced, use following command line:

phosphor -root -scale 3 -ticks 5 -delay 2000 -program ~/bin/obs-saver

Now if you are connected to the internet and you will wait for screensaver to kick in, it will randomly select one of the latest packages being build on OBS and it will start showing you it’s build log :-) I hope you will enjoy it as much as I do! Feeling of stuff being compiled without actually wasting that much of electricity is great 😉


Introducing ZXDB

Lately I have been playing a lot with some cool technologies. I had a lot of fun, so I want to share some of it and at least point you to the interesting pieces of technology to check out. And it also inspired me to my new project which I would like to introduce with this blog post.

ZeroMQ & friends

Lets start with ZeroMQ. It is lightweight messaging library with really nice API. And the tools around it? CZMQ brings even nicer API and there is also zproto which let’s you generate protocol handling code and even state machines easily. You just describe it and zproto will generate all the code for you. I know that you might think that code generation is evil. And quite some time it is. But this one is not :-) Generated code is nice, readable and it really helps with productivity. You don’t have to write copy&paste code and drown yourself in writing stuff that was written thousand times before already. You can concentrate on the logic of your application – the only important part – and disregard all those irrelevant boring processing functions. So ZeroMQ in combination with zproto is one of the interesting stuff I’ve been playing with lately. And I would recommend you to do so as well :-)


Other interesting opensource project I’ve been playing with is TNTNET, TNTDB and CXXTools. It’s actually three different libraries, but they are under one umbrella. They also have a really nice API, this time C++ compared to C one in ZeroMQ.

TNTNET is a way how to write web applications in C++. And as most of the we b applications need database, TNTDB is database abstraction layer that let’s you write applications that can easily be deployed against SQLite or MySQL or even PostgreSQL without any modifications to the code. And CXXTools is just a collection of handy utilities that doesn’t fit in neither, but can be used and are used by both.


Now let’s introduce my new project – ZXDB. It combines both. As I was writing some web application (in C++), I found it quite boring dealing with database and doing all those selects, keeping data somewhere, doing updates and stuff. As it is boring and copy&paste and boring, I thought about the abstracting it a little bit and I wrote initial gsl (templating system zproto uses) template, that will generate all the boring code for me.

Now I’m able to easily add or remove properties, I don’t have to deal with database directly as I have a nice class based abstraction on top if and this generated abstraction is using TNTDB to be database independent. I was quite excited when I started playing with this. So much that now I’m even generating unit tests for those generated classes :-)

It is far from perfect and it is missing plenty of features, but it already does something, so it is time to ship it (it compiles at least for me :-) ). I put it on GitHub alongside with some instruction. If you are interested, go take a look. And if you will get interested even more, patches are welcome 😉


Challenges in 2015

Champagne Showers by Merlin2525You might have noticed that I decided to run for the openSUSE Board. And as we shortly have a new year and everybody is evaluating the past and the future, I will do the similar, mainly focusing on few of the challenges that I see laying in front of the openSUSE Board in 2015.

SUSE/openSUSE relation

I heard it being mentioned several times over and over. SUSE and openSUSE are two different things. But at the same time, they are pretty close. Close enough to be confusing. We have similar yet slightly distinct branding. Similar yet slightly distinct name and we have a clear overlap in terms of contributors. For people inside the project, it is easy to distinguish the entities. For people outside, not so much.

There was a nice talk by Zvezdana and Kent on openSUSE Conference about our branding. Part of the talk and one thing that people notice about openSUSE and SUSE is our logo. SUSE keeps updating it and it’s getting different over the time. On the other hand openSUSE logo stays the same. One open question from the talk was how to fix it. Either start diverging with our branding or get closer together. I know this is mainly question for the artwork team, but as will affect all of us, there should be broad discussion and as it involves logo and trademark, there need to be SUSE and board involved.

Apart from the logo/branding, there is also a technical aspect of the relation. We all say that openSUSE is the technical upstream of SLE. Things are being developed and tested in openSUSE and then adopted by SLE. But sometimes it is vice versa, as SUSE needs to develop some feature for SLE or one of it’s service packs and push it there. And as SLE and openSUSE schedules are unrelated, sometimes they can’t push it in openSUSE first. Even after the release openSUSE and SLE starts diverging and come together once in five years or so when it is a time to release a new SLE. It’s kinda shame, that we can’t help each other more often. It would be great to get SLE and openSUSE closer together in mutually beneficial way. But this is not going to be an easy nor fast discussion, again involving quite some teams/people. And I believe the Board should act as mediator/initiator in this discussion as well.

openSUSE Release

While talking about the release, we still have officially 8 months release cycle (or more precisely whenever coolo says so release cycle). It would be nice to have some decision that since we release two last releases after 12 months, maybe we are switching to one year release cycle. Or decide to stick with eight months. Or go for something completely different. But again, the point is, this is the hard discussion to have, but I beleive we have to start it and have a clear outcome of it, so people can kinda count on it. There is not much for board to do in this apart from calming heated discussion, but maybe it would make a sense to delay start of this discussion after the SLE openSUSE relation discussion (which probably needs to have board involved) and take the results of it into account. I personally think it definitely makes sense to at least align SLE and openSUSE schedules a little bit…


Last year we had a great conference in Dubrovnik. It was an awesome place, quite some interesting discussions as every year, but unfortunately not that many people. I liked it and hats off to the organizers, but we need to figure out what went wrong and why not so many people showed up in person. I hope for the best in Hague and that this years conference will see again plenty of people, but although the last conference was great, loosing people attending our most important event – openSUSE Conference – was also kinda disturbing… So we will see what happens in the Hague.

The rest

I’m sure there will be other challenges as well. In fact, even I would like more stuff to happen in the current year. But for those things, I don’t need a board, I can do or at least start them myself. Those few that I just mentioned are only those that I see as important, in need of some involvement from the board and being not yet entirely solved from the last year. Hopefully all of them will be solved in next year and we will have different problems, like how to find even the most subtle bugs as all other ones are solved and how to change the world for the better and whether is there still anything left to improve after everything we did in 2015 :-)


Running for The Board

Hi everybody, openSUSE elections are just around the corner and I decided to step forward and run for the seat in The Board. For those who don’t know me and would like to know why consider me as an option, here is my platform.

Who am I?

I’m about 30 years old, live in Prague and I love openSUSE (and Gentoo 😉 ). SUSE 6.3 was my first Linux distribution, I went through som more and I actively joined the openSUSE community more than six years ago. I was for five years working for SUSE as openSUSE Boosters and package maintainer. I was also part of the Prague openSUSE Conference organization team. Nowadays I work for company called Eaton (in open source team), but I still love openSUSE, have plenty of friends in both SUSE and openSUSE, poke some packages from time to time and I’m spreading open source in general and openSUSE in particular wherever I go (we have few openSUSE servers at work now, yay).

What I see as a role of board and what I would like to achieve there?

I see the role of board as a supporter and caretaker. Board is here to do the boring stuff and to enable everybody else to make amazing things within the project. To encourage people to do new things, to smoother rough edges, remove obstacles, listen to the people and try to bring them together. Also if needed, defend the project from possible threats, but I don’t see any at the horizon currently :-)

What would I like to achieve? Wold domination? Probably not as I don’t think that the board is here to choose direction. But if you have a cunning and ethical plan how to do that, I think board should do everything possible to support you. But on more serious note, openSUSE as a distribution had a challenging year, went through some changes lately and I believe that thanks to the current board we managed to go through it quite well. But I alsi think there are more challenges in front of  us and I would like help to make our future path as smooth as possible.

Why vote for me?

Why vote for me especially if I don’t promise pink ponies and conquering the world? Well, I promise that I will do my best to support you and help project to move in whatever direction it wants. Even if it means pink ponies and conquering the world 😉 I always listen to the others and I’m trying to resolve everything peacefully. I’m almost always smiling and it’s hard to piss me off. So almost no matter what I’ll keep calm, patient and will try to resolve challenges peacefully and to satisfy all interested parties.

Older posts «