Alexandre Rosenfeld's blog

A hacker and it's journey.

Move to Ubuntu — November 2, 2010

Move to Ubuntu

A recent post in Planet Gnome about moving away from Arch into Ubuntu got me thinking, because I just did the same thing a few weeks ago, when Ubuntu 10.10 was released. But I didn’t really liked the reasons I did so.

First, I love Arch Linux. It’s simplicity and speed are amazing. It’s clearly focused on power users, which is great for me. It’s package manager (Pacman) is very fast and powerful, while still easy to use. I love how I can search and query packages both installed and from the cache with concise commands that usually do what you want at the first time. Compared to Ubuntu’s apt-cache and apt-get, which I usually have to read the man page to remember a few commands and to Fedora’s yum, which I’m never comfortable with, Pacman is always the winner. If that was not enough, you can create useful packages in under 10 minutes. Better yet if you can find a pre-made PKGBUILD in AUR, which contains thousands of recipes to build packages. The binary packages are usually enough for a desktop, but sometimes you do need to dig into Yaourt, which automatically downloads and compiles recipes. It is time-consuming sometimes, but comparing to finding a PPA with a decent enough version of a package that you can’t find in Ubuntu, it’s not much different.

That leads to the first reason I switched away from Arch, is that Ubuntu usually has recent enough versions when it’s released. But six months afterwards, I really want to try new versions of packages. If I can find a good and well-maintained PPA, then it’s ok. If I can’t, there are a thousand other things I would like to do then to create my own packages for new upstream releases. So, this time of the year, a few weeks after Ubuntu was released, I can actually enjoy it for a while (actually, Rhythmbox is just out with a new version, which I will probably never get on this version of Ubuntu).

The second reason and one that is a hot topic right now, but this is mostly a user perspective, I got locked into the Gnome modifications that Ubuntu did. Honestly, I like the modifications, I like the Indicator applet, I’m using the Indicator Applet Menu (despite a few bugs) and I love the Notify OSD. And I miss those on Arch. I tried building some components of Ayatana Project in Arch, but didn’t had much luck (understandable actually). The Arch way is to use as much as upstream as possible without modifications, which is usually very good. You can find a few bugs which are corrected already on other distros, but you get releases faster and you get to see how upstream really is. And that is a big issue for Ubuntu, because no matter how much they talk about not forking Gnome, it’s just not upstream anymore. If I would move to Fedora or OpenSuse from Arch, I would get a very close experience. Not because they don’t improve Gnome or add their own modifications, but because all their modifications are upstream. So even on Arch, I can enjoy all the great investment these guys made to Gnome. But now I can’t use Ubuntu’s investment outside Ubuntu (I could actually if I spend enough time porting it, but it’s just not worth).

And now, I’m locked in to Ubuntu, I’m locked to the Ubuntu OS to use Ubuntu Software, which are both actually very high quality, but I’d prefer a different OS. Some other OS vendors work the same tactics to get more users and I definitely don’t want to use their software, no matter how great they are. Of course Ubuntu is miles away from these vendors, but it’s going through a similar and very dangerous path. Again, this is only a user perspective and a user that Ubuntu is not focused in (and I’m glad they have a very strong focus on other users). I just wished Ubuntu would give a bit more back to a community it takes so much from.

glib-mkenums — August 11, 2010

glib-mkenums

I’m posting this here both to help someone else looking for this and to check if I got everything right.

I needed to use enums in a GObject property. So I needed a enum type for my property param spec. I thought I could hard-code it somehow, but after some long time pondering (actually knocking my head into the wall) I decided to integrate glib-mkenums into autoconf so that it could generate the types for me automatically when running make from my C sources. Unfortunately for me, Google wasn’t being friendly when searching for information on glib-mkenums.

I found somewhere, some program that used glib-mkenums in a simple way (sorry, I forgot where I fount it), close to what I had in mind, so I decided to adapt it to my needs. What I had to do was to add two more files, automatically generated (in this case named dmap-enums.c and dmap-enums.h) adding some commands to Makefile.am (linked to Gitorious because WordPress removes all formatting). Hopefully that is the right way to do it, at least it is working for me.

DACP in Rhythmbox: Week 11 — August 6, 2010

DACP in Rhythmbox: Week 11

I just went from week 2 to week 11 in the GSoC progress in my blog 😉 Well, there is not much to tell in a blog if there is not a picture to show (and showing off the iPhone remote working with Rhythmbox should not be any different than iTunes if I’m doing my job correctly).

I realized these last weeks that I had completely mis-planned my project, because I had no idea what I was getting into. I thought DACP would be quite easy to implement and I would focus on other things (making a client library for instance). But I discovered it is a much more complex protocol then I thought, mostly because of DAAP.

What I discovered is that DACP is just an extension for DAAP, and being an Apple protocol, it’s closed and has been reverse-engineered and re-implemented several times in the open source world. The problem is that DACP uses several features in DAAP that were not implemented in libdmapsharing, simply because there is no real standard on DAAP. It took some time for me to learn DAAP enough to find out what was missing in libdmapsharing for DACP to work.

So I spent most of the time fixing, tweaking and implementing stuff on DAAP in libdmapsharing. Which was pretty cool, I improved a lot of my C skills, learned GObject (and quite frankly, liked it a lot) and learned a lot about DAAP and libdmapharing.

By the way, thanks for all the people who have reverse-engineered DACP and the pairing process, you have greatly simplified my life. It’s truly great to work in the open-source world.

Cryptkeeper in your Indicator Applet — June 24, 2010

Cryptkeeper in your Indicator Applet

I like the Indicator Applet and I like Cryptkeeper, so I decided to create an indicator for Cryptkeeper:

For anyone who doesn’t know, Cryptkeeper is a very useful application that allows you to mount/unmount an encrypted folder with just one click. It’s one of the most useful applications running on my startup. But up until now it had a quite ugly icon:

Can you spot the difference?

This is actually a plot to make people to like it and finish it. The patch adds support for showing and letting you mount/unmount folders, but it doesn’t let you delete folders or view information, as it did. Also, when adding a new folder, it doesn’t show up on the list if you don’t restart Cryptkeeper. But the patch does what I wanted it to (I rarely create or delete an encrypted folder), so I probably won’t change it further.

So, the patch is here. Have fun 😉

DACP in Rhythmbox: Week 2 — June 7, 2010

DACP in Rhythmbox: Week 2

Last week there was the inclusion of libdmapsharing in Rhythmbox (by the way, for all of you alpha testing Ubuntu, DAAP isn’t working in Rhythmbox because they haven’t included libdmapsharing in Ubuntu yet). So now I’m just a git pull and git merge away from following Rhythmbox master, which makes my job much easier.

Last week didn’t see much work from me, I was mostly fixing some bugs and some bad decisions. But I noticed I never showed screenshots of my work here. Because I love screenshots, here they are.

First you open your Remote application in iPhone, iPod Touch or Android device (note that on Android there is no passcode):

Then in Rhythmbox, you type the passcode shown in your Remote. This allows Rhythmbox to pair with your Remote:

Then Rhythmbox magically appears at your Remote list of libraries:

“DACP on Rhythmbox” will become your library’s name over time. And of course, this doesn’t fully work yet, because Rhythmbox segfaults when the iPhone tries to connect. Well, what did you expected for about two weeks of work? I was pretty excited already when I saw my iPhone on the list of devices in Rhythmbox (by the way, I think I will create a new group called Remotes, I just didn’t find out how yet).

Stay tuned for more later.

GSoC 2010: DACP Support in Rhythmbox — May 20, 2010

GSoC 2010: DACP Support in Rhythmbox

Community bonding is almost over so I thought I could share some details about my Google Summer of Code project.

As the title says, I will implement DACP support for Rhythmbox. You probably never heard of DACP but you’ve probably seen it in action. It’s the protocol that is used by the Remote application in iPhone and iPod Touch.

I’ll be implementing the server side in Rhythmbox, so you’ll be able to control Rhythmbox with your iPhone, iPod Touch or even your Android.

I’ll actually be implementing this inside libdmapsharing, a DMAP (DAAP & DPAP) library that was once extracted from Rhythmbox sources, improved and will be integrated again into Rhythmbox as a library, once my mentor’s patch is accepted. So hopefully, more applications will be able to support DACP, DAAP and DPAP by using libdmapsharing.

Breadcrumb in Gtk — February 17, 2010

Breadcrumb in Gtk

Anyone knows how to implement (or anywhere it’s implemented) a breadcrumb / pathbar like the one in Nautilus in PyGtk? I just don’t know how to hide buttons that doent fit the window.

By the way, anyone has seen this:

That pathbar is gorgeous. It doesn’t look as good in action tough.

I’ve been using the smaller Nautilus with the Elementary theme and it is just beautiful (the picture is from Elementary Remake, the original theme with that pathbar).