Archive for 2005

To Flush Or Not To Flush

Friday, December 2nd, 2005

Ok, I swear this is not me.

Moreover, I wasn’t hacking on epiphany, but reading Slashdot !

deskbar-applet hotness

Sunday, October 2nd, 2005

Deskbar Applet

Recently Nigel Tao posted on desktop-devel the announce of deskbar-applet, which was intended as a browser-like keyword-driven url bar. You type a web address, or an email address, or a file name, or some keyword then the arguments, an it shows a popup with possible choices from there, like “Search google for foo”.

See this screencast to see the original idea.

I offered to help and we moved the code to gnome CVS under the “deskbar-applet” cvs module, see instructions at the end of the post to get and try it.


We then worked to integrate it a bit more in the desktop, so here are some highlights:

Type a filename in your home dir, like ~/Report.pdf or foo/bar.txt, and you can open that file with the associated applications. Also works with directories.

Type an email address or website name, and you can write a new mail, or surf the website with associated apps.

Type some terms and it will search through all available programs (the .desktop files). Try for example “text” and you are presented with gvim and gedit, type music and you get rhythmbox, muine banshee and other apps like that, you can then launch the program

Terms are also matched against mozilla/firefox/epiphany bookmarks, so if you have a bookmark for Entagged Website, typing entagged will offer you to launch the browser to that address.

deskbar-applet will also use your smart bookmarks wisely. type a search term (“steve” for example), you are then presented a list of smart bookmarks to use with the entered term. I have a Gnome Bugs bookmark in epiphany, that i use with bug numbers, i can enter a number in deskbar-applet and select the “Search Gnome Bugs for 10000” entry and be there. Same with google for example. This stuff will soon work with firefox, allowing to use its search engines.

More a gadget: type a gtk bookmark (the ones shown in the file selector) and you can open nautilus in it

And you can also get rid of mini-commander applet, since typing a program name allows you to open it directly


Some things that are left to do:

  • Use galago python bindings (which are coming, according to ChipX86) to autocomplete emails by name and addresses, and also integrate with gaim contacts, allowing to send IM’s by typing the name.
  • Use beagle, when available to do some background querying of typed terms
  • React to filesystem changes through gnome-vfs monitoring to add on-the-fly newly installed programs
  • Support for recent files
  • A sane way to handle caching and presenting a good (not too long) list of matches
  • More in the TODO file in the archive/CVS

We would really appreciate any contribution: ideas or backends, core code, etc.

Also worth mentioning is the fact that the startup isn’t threaded and takes some time because it must index all the interesting files each time. This has to be improved of course.

Try it !

I updated the tarball a couple of hours ago wwith an updated version which fixes lots of small bugs, like missing file existance checks and data sanity, redownload if you got an old version.


Deskbar-applet can be checked out with:

cvs co deskbar-applet


Grab the 0.5 tarball here.


For gentoo users there is an ebuild in BreakMyGentoo.

Building and running

It requires python 2.3 and the 2.12 version of gnome-python and gnome-python-extras. Then:

./configure; make; sudo make install

You can also test it uninstalled by running the ./deskbar/deskbar-applet -w in the source directory, this will create the search bar in a standalone window.

Gedit Python Plugins

Friday, September 9th, 2005

I have been putting together a python plugin system for gedit, so far it seems to work:

Gedit showing the python console

I heavily used the nautilus-python, and epiphany source code to see how this is done, thanks to them !

Notice how the window title has been updated by the command in the console. The clever reader may also recognize the same python console as used in epiphany, simply because i just stole all it’s code, thanks Adam Hooper !

Now for the code, it looks like:

import gedit

# Inheriting from gedit.Plugin is the key here
class MyPlugin(gedit.Plugin):
	def __init__(self):

	def activate(self, window):

	def deactivate(self, window):

	def update_ui(self, window):

The three callbacks are the same used for C plugins, you can do your init/deinit stuff and react to UI changes. The other thing to do is to write a xx.gedit-plugin file to tell gedit that there is a plugin:

[Gedit Plugin]
Name=Python Console
Description=A Python Console inside gedit.
Authors=Raphael Slinckx 
Copyright=Copyright © 2005 Raphael Slinckx

You must specify the langage type, so gedit knows which loader to use, and use Module to give the module name of your plugin, generally the filename without the .py extension, but it can also be a directory containing !

Now, Paolo if you don’t mind, you can come back on IRC 🙂

gShrooms, end of the summer

Wednesday, August 31st, 2005

Some more screenshots:

Rhythmbox source
Colin is streaming music, and jack is his friend.

Jack is receiving the music. The screenshot shows what Jack would see in his own rhythmbox, because he has 4 friends that are currently streaming music, one of them is Colin, he is playing Liquid Scarlet.

Gaim conversation
Here is jack’s conversation window to Colin . Colin has discovered a new album, and tells jack to listen to it, Jack then see the Listen button appearing in the conversation, and also see what colin is playing and is invited to listen to it.

Clicking the button makes rhythmbox play the buddy’s stream automatically (and launches rhythmbox if it wasn’t)

Gaim plugin
Colin has nothing particular to do, he has just to activate the plugin in Gaim, and set the preferences according to his internet connection.

And finally, something i’m proud of, a IRS tax TShirt, that was worth the whole summer:
Me, and the IRS

And a little update for the pastebin script, it now supports http proxies, removes twisted dependency, and allows to select line ranges with the -l x,y switch. Thanks to Gustavo “gjc” 🙂

The wonders of pastebin

Wednesday, August 31st, 2005

These last days, i’ ve been using pastebin intensively, for things like diffs reviews, code snippets to discuss, etc.

And i got sick of the web interface.

So i took a couple of hours to write this nice python script which allows to upload seamlessly any content to, and maybe it will be useful for other people than me, so i publish it here.

Very simple to use here is the usage():

$ pastebin [OPTIONS] [FILE]

Print the URL of the input file

If FILE is omitted content is read from standard input
        -h, --help                      Print this help notice.
        -r, --raw                       Retreive raw text URL (default=off).
        -d, --description       The description of the content (default=empty).
        -m, --message           Same as description
        -n, --name                      Your name (default=your unix username).
        -t, --type                      The type of the content (default="raw")

        Type can be one of:
        raw, asterisk, c, cpp, php, perl, java, vb, csharp,
        ruby, python, pascal, mirc, pli, xml, sql, scheme,
        ascript, ada, apache, nasm, asp, bash, css, delphi, html, js,
        lisp, lua, asm, objc, vbnet

        If type is not specified, an attempt to auto-detect type is made,
        based on file data/extension. Detection is more reliable when giving FILE
        argument than piping directly. This needs modules gnomevfs and gtksourceview

        If you have module gtk, the pastebin url will be placed in your clipboard,
        you can then paste it with ctrl-v as usual.

That means you can cat important-patch.diff|pastebin -m 'look!' then Ctrl-v in xchat or wherever the output URL.

Introducing gShrooms

Thursday, August 25th, 2005

I have put a page for the Braves who want to try out gShrooms.

You will need a jhbuild environement, rhythmbox and dependencies built, some stuff mentioned in the page, time, and nerves.

I appreciate any report of failure/success on IRC or per mail..

Thos who are wondering about the name think about Shared Music Rooms, then blame Seth 🙂

Summer of Code, the end of the tunnel

Thursday, August 25th, 2005

We are the 25th of august, the projects are due for the 1st of september, that means i have 6 days left to track down minor issues, and cleanup the thing.

In the meantime, as a teaser, here are two screenshots, i won’t comment them yet, i must sleep ! (click for full size)

Rhythmbox Buddy Source
Rythmbox Buddy Music source

Gaim Plugin
Gaim Plugin in IM windows

DBus tutorial, another one

Sunday, August 14th, 2005

I finished writing this nice little tutorial about dbus activation, i hope it will be useful at least for some people !

If there are any corrections/infos/additions to make feel free to contact me, also if you want to include it somewhere, feel free, credit is appreciated 🙂

BreakMyGentoo, Nattraverso

Monday, August 8th, 2005

BreakMyGentoo is back

You did miss the sleepless nights when you couldn’t do anything else than b0rking your system ? Be happy, is back !

I have become a co-maintainer there, so i will provide some help and ebuilds, starting with the gnome 2.11 beta ebuilds, and some more mono related stuff. The overlay is not quite ready yet, but we are testing each ebuild for dependencies and things like that.


This is the first product for the summer of code, an UPNP-NAT-traversal library, in python. I’m using it in my streamer, and i’m sure it could benefit other gnome applications since twisted has a gtk event loop, beside other type of loops. As i said before i’m not taking full credit for this, i borrowed code from Shtoom, but that’s open-source 🙂

I put up a page on this site, where you can download the package and see examples, there is also a full documentation in the package itself, generated with epydoc, because documenting code is Good.

I need feedback, cause i just tested it with my device, i need to see how much of the code works everywhere, and which parts need to be generalized, cause XML and SOAP sucks. Can you run the examples in the package and send me the debug log, if the thing didn’t work, so i have a trace of the xml exchanges, that would be great !

Beta packages, Summer of code

Monday, August 1st, 2005

Gnome beta portage overlay

Today i have been struggling to create all the necessary stuff to make portage install Gnome beta 2.11.90
The result is an overlay which you can download here (the name sucks, i know). If you don’t know what an overlay is, you most probably don’t want to try this thing, else just search the net on how to set this up. There is also a package.unmask file whose content should be added to /etc/portage/package.unmask, and maybe even more, just try..

Be warned that installing these ebuilds will most likely break things, beside the fact that this is a beta release, the ebuilds are mostly copied from existing ones, so they may be doing wrong things, don’t blame me 🙂

Don’t try evolution, evolution-data-server, gtkhtml !

I also included most recent dbus and hal from gentopia overlay, for completeness. If you know any more appropriate place for this, just tell me, or feel free to copy them anywhere you want, i don’t care.

I managed to compile everything here, and am now the proud owner of a beta gnome desktop which, of course, rocks !

Python bindings for libsexy

I made python bindings for libsexy which are documented as much as the original library, not at all ! The standard procedure ./configure; make && make install applies. I submitted the packages to Chris Chipx86 Hammond, so it should soon land in the libsexy SVN repository

Summer of code

I am participating to the google summer of code with gnome as mentoring organisation, Johan “jdahlin” Dahlin is my mentor, and he rocks. The project was the “Shared music spaces” bounty, but the actual end goal isn’t quite defined yet.

For the moment i have:

  • A streaming server, which accept http connections and serve music from a gstreamer pipeline, that’s quite like flumotion, but simpler.
  • A python library that allows to play with upnp devices, get external ip, add port mappings. The code is stolen and adapted from Shtoom, maybe we can turn this in a shared lib, so we don’t maintain two version of the code.
  • A gstreamer element that dump metadata from the stream on dbus, in a hashtable. This can then be retreived for any “Now Playing” needs, as well as an element that would write back tags from dbus to the stream, for example in the stream server.

The initial goal which is mainly achieved was to have a simple streaming server taking as input any sound that comes out the speakers and streaming that with any metadata to people connecting to the server via simple http streaming.

The most obvious problem with this approach is the firewall/NAT issue, while some NATs can be activated through upnp, passing a TCP connection through a firewall is nearly impossible. Maybe there should be a relay server hosted at gnome, but this is quite impossible too due to legal issues, and bandwidth costs. So basically it works if you have direct internet connection with no firewall, indirect connection through an upnp NAT and no firewall (or upnp-esque firewall), and that’s about it, i don’t know how large this part of the gnome users is…

I’m waiting for more instructions/discussions (*hint*) to continue this thing, in the meantime i fix bugs and polish the code.

I didn’t hear anything from the other gnome SoC’ers, maybe you should do some status report too, would be great 🙂