Controlling The Raspberry Pi With The TV Remote Via CEC

I always wondered what those Play/Stop/FF/Rewind buttons on my TV remote were for. Maybe you could couple a DVD or Blu-Ray player from the same manufacturer through some obscure and proprietary protocol. Turns out I was wrong about that, and actually there's a standard called CEC which allows to simultaneously control several devices connected through HDMI such as TV, AVRs and Blu-Ray players. Manufacturers use fancy names for it, such as Anynet+, Bravia Link, Viera Link and Simplink. And the good news is that it works with XBMC on the Raspberry Pi!! At least on Raspbmc it just works automagically.

I can now control XBMC with just the TV remote. No more keyboard and mouse :-D. I can even turn the TV and the Raspi on and off together!

CEC support on the Raspberry Pi is such a great feature for a perfect HTPC setup, but it's relatively unknown and underpublicized AFAIK.

Here's a live action usage example.

My New Raspberry Pi

Last week I finally received my Raspberry Pi model B, and replaced my old HTPC with it. All I can say is I love it! Raspbmc has been able to play every video I've thrown at it without a glitch, including 1080p H.264 .mkvs and SD DivX/Xvid .avis. And the CPU temperature keeps well below 60℃!

The only issue so far are the sticky keys on the Microsoft Wireless Keyboard 2000, which makes typing really difficult. UPDATE: keyboard/mouse replaced by TV remote with HDMI CEC.

My Frugal Smartphone

Remember the good ol' days when we used mobile phones to actually talk to people, and batteries seemed to last forever? Well, those days are not over my friend. You just need to get used to using your brand new multi-core multi-band multi-GHz multi-GB smartphone as an old dumbphone. Like I did last week.

Just light texting and talking. The bare minimum. No 3G. No 4G. No 5G. No WiFi. No Bluetooth. No GPS. No NFC (who uses that anyway :-p). And of course, no gaming!!

What you get? 6 and a half days of glorious battery life (on my Samsung Galaxy Nexus with CM 10.1 nightly). Almost a whole week with only one charge!

I'm proud of my frugal smartphone :-D

Updated UbuntuOne RPMs for Fedora 18

Is the UbuntuOne client broken for you on F18? Suffer no more! I've just updated all sources to the latest stable version, 4.1.2. But more importantly, I've included this tiny little patch which fixes this big bug related to libc 2.17. The RPMs are currently available at the fedora-ubuntuone-testing repo for a couple of days, and then will be moved to the "stable" fedora-ubuntuone repo.

Thanks to Jan Teichmann for reporting the bug. And kudos to the UbuntuOne team for supporting Linux distributions other than Ubuntu!

DIY NOOK Simple Touch with GlowLight

Tired of bedtime debates when you want to read your Nook and your significant other wants to sleep? Not willing to pay extra for the NOOK Simple Touch™ with GlowLight™? Or maybe living outside the US? Here's a solution!

B&N Nook Simple Touch + USB OTG cable + USB LED lamp= DIY Nook Simple Touch with GlowLight! :D
Just need:

  • rooted B&N Nook Simple Touch
  • USB OTG cable
  • USB LED lamp

And follow (any/some/all/a mix of) these instructions:

Enjoy! And no more complaints at bed, hopefully...

Upgrading Parallels Plesk 9.3 to 9.5 with PHP 5.4 On CentOS 5

Last weekend we planned to update Parallels Plesk Panel from version 9.3 to 9.5 on one of our CentOS 5 servers, but the installer failed telling we shoud remove php54u-cli (from the IUS repo). Why? Fortunately we found out why taking a look at /tmp/autoinstaller3.log. Turns out the updated packages depend on php-cli, which is PHP 5.1.6 on CentOS 5, which is ugly and old and outdated, and we wanted to keep PHP 5.4.

The Plesk installer wanted us to downgrade PHP 5.4 to 5.1! No way, man...

So we gave the installer what it wanted: php-cli. But an empty RPM.

$ sudo yum install rpmdevtools rpm-build
$ rpmdev-setuptree

We need to create a spec file with an empty %files section.

Contents of ~/rpmbuild/SPECS/php-cli.spec:

Name:           php-cli
Version:        5.4.4
Release:        1%{?dist}
Summary:        Dummy package for PSA compatibility
Group:          Applications/Internet
License:        GPL
Requires:       /usr/bin/php-cgi

Dummy package for PSA compatibility


* Sun Jul 01 2012 Raqlink 
- Initial version of the package

Remember: never run rpmbuild as root!

$ rpmbuild -bb ~/rpmbuild/SPECS/php-cli.spec
Processing files: php-cli-5.4.4-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}
Wrote: ~/rpmbuild/RPMS/x86_64/php-cli-5.4.4-1.x86_64.rpm
$ sudo rpm -ihv ~/rpmbuild/RPMS/x86_64/php-cli-5.4.4-1.x86_64.rpm

And that's it. No more complaints from the Plesk installer :-D

Updated UbuntuOne RPMS for Fedora 17

I've just uploaded new UbuntuOne packages into the yum repo. They're based on the 3.0 stable branch, which is the current version in Ubuntu 12.04 Precise Pangolin. There are no major visible changes, except that the GUI is now based on QT instead of GTK. This should also hopefully fix the authentication issues that showed up lately, by the way.

Konsole RPMs with Tab Cloning (KDE pre-4.9.0 git snapshot)

UPDATE (2012-06-13): updated konsole 4.9 beta RPMs are now available at kde-redhat's unstable repo.

If you regularly use SSH and Konsole, you may have noticed a missing "feature" after updating to KDE 4.8.0 (released on January 25, 2012): new tabs now always use the default profile instead of "cloning" the profile of the active tab. I mean, in pre-KDE-4.8 Konsole, you could run ssh://user@host:port in Krunner (that's the Alt+F2 menu), or konsole -e ssh -p port user@host, or even kioclient exec ssh://user@host:port and pressing Ctrl+Shift+T would open a new SSH tab. Add public key authentication and/or SSH connection multiplexing, and you got an automagically logged in remote session on each new tab for free!

I really missed this, so I submitted this bug report (with a couple of quick and dirty patches).

Turns out this feature was actually more like a "bug". In fact, the executed command was "remembered" by the current active Konsole profile. That's cool with SSH, but could lead to some nasty side effects, such as re-running a shell script for each new tab. Several bug reports showed this was really confusing and counterintuitive. In fact, this bug report is exactly the opposite of mine!

A proper fix has already been commited for KDE 4.9, which is scheduled for release on August 2012. But that's too much time lost just logging in again and again! (Ok, I could use SSHMenu or Remmina, but I love my konsoles :-D). So I set up a Yum repo with Konsole RPMs based on the excellent packages by the KDE Packaging Project for Fedora/RHEL and a snapshot of sources from Konsole's main git repo.

DISCLAIMER: This Konsole version includes tab cloning... but may also carry countless creepy horrible bugs and kitten-killing diseases!!!

  1. Install the kde-redhat Yum repo
  2. Download and install the .repo file into /etc/yum.repos.d/:

    # wget
    # mv fedora-kde4.9.repo /etc/yum.repos.d/

  3. You may need to enable the testing repos from both kde-redhat and konsole
  4. Install/update the bleeding edge version of Konsole:

    # yum install konsole

  5. Optionally associate a keyboard shortcut with the new "File -> Clone Tab" menu entry
  6. Enjoy all your free time saved from logging in through SSH again and again!

My UbuntuOne Yum Repo for Fedora

UPDATE (2012-11-01): updated and rebuilt packages for Fedora 18!
UPDATE (2012-06-21): updated and rebuilt packages for Fedora 17!

Are you a Fedora user? Have any of your friends or colleagues recently tried to share a bunch of files with you via UbuntuOne? I've been in such a situation and, to my surprise, I could not find any working/updated UbuntuOne RPMs on the web, despite the fact that it's all free and open source software used by more than 1 million people. The web interface is really nice, but a local client that performs transparent file-syncing with the cloud is even better. And what about running the UbuntuOne client for Windows on wine? Come on... really??

But, wait a minute! There must be someone who has already packaged the UbuntuOne client for Fedora! Well, there's this article on making it run on Fedora 11 (that's more than 3 years old!). Then there's this detailed tutorial on compiling it from source on Fedora 16 (the current version of Fedora), but I still wanted nicely packaged RPMs: I don't like having old, unknown, orphan and even conflicting files lying around in my filesystem, and yum makes managing packages much easier. (Edit: I've just found this yum repository at which unfortunately is outdated and compiled for Fedora 13, but could still serve as a good starting point.)

So I set out to build all the necessary packages from scratch and publish them in a public Yum repository. After all it's all based on Python, so how hard could it be?

The biggest hurdle was the lack of some key python libraries not packaged for Fedora which UbuntuOne requires to run, such as configglue, python-defer, lazr.restfulclient, lazr.uri and wadllib. All these packages are hosted on Launchpad and most of them are developed and maintainted by Canonical to power Launchpad, Landscape, and other applications. I guess these libraries are of little use outside Ubuntu, and that explains why they are not packaged for Fedora.

This caused an even worse challenge: Dependency Hell!! Fortunately my girlfriend was kind enough to grant me access to her Ubuntu box, where I could cheat using apt-cache depends and debtree, with which I could generate this nice dependency graph which helped me get an overall picture. It finally turned out to be around 10 new packages/subpackages.

All RPMs were built for Fedora 16 using a Mock chroot and uploaded to my yum repository. I tried hard to follow the Fedora Packaging Guidelines and the Fedora Guidelines for Python Addon Modules. AFAICT these packages comply with the Fedora Licensing Guidelines, and are not listed as Forbidden Items. I see no legal reason not to include them officially in Fedora in the future, so I'm planning to submit them for review.

I'm still struggling with a couple of bugs building the UbuntuOne Control Panel (UbuntuOne client's configuration GUI), but the basic filesharing functionality is working, though it requires some easy command-line tweaking.

So, head on and read the instructions on how to install UbuntuOne on your Fedora box in 4 easy steps. Enjoy!

Bugs, suggestions, insults? maxiberta at gmail dot com

Subscribe to Maxiberta's Blog RSS